binomial proportion confidence interval
{{short description|Statistical confidence interval for success counts}}
In statistics, a binomial proportion confidence interval is a confidence interval for the probability of success calculated from the outcome of a series of success–failure experiments (Bernoulli trials). In other words, a binomial proportion confidence interval is an interval estimate of a success probability when only the number of experiments and the number of successes are known.
There are several formulas for a binomial confidence interval, but all of them rely on the assumption of a binomial distribution. In general, a binomial distribution applies when an experiment is repeated a fixed number of times, each trial of the experiment has two possible outcomes (success and failure), the probability of success is the same for each trial, and the trials are statistically independent. Because the binomial distribution is a discrete probability distribution (i.e., not continuous) and difficult to calculate for large numbers of trials, a variety of approximations are used to calculate this confidence interval, all with their own tradeoffs in accuracy and computational intensity.
A simple example of a binomial distribution is the set of various possible outcomes, and their probabilities, for the number of heads observed when a coin is flipped ten times. The observed binomial proportion is the fraction of the flips that turn out to be heads. Given this observed proportion, the confidence interval for the true probability of the coin landing on heads is a range of possible proportions, which may or may not contain the true proportion. A 95% confidence interval for the proportion, for instance, will contain the true proportion 95% of the times that the procedure for constructing the confidence interval is employed.
{{cite web
|last = Sullivan |first = Lisa
|date = 2017-10-27
|title = Confidence Intervals
|id = BS704
|type = course notes
|website = sphweb.bumc.bu.edu
|place = Boston, MA
|publisher = Boston University School of Public Health
|url = http://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_Confidence_Intervals/
}}
Problems with using a normal approximation or "Wald interval" {{anchor|Normal approximation interval|Wald interval}}
File:Normal_approx_interval_and_logistic_example.png reveals problems of overshoot and zero-width intervals.]]
A commonly used formula for a binomial confidence interval relies on approximating the distribution of error about a binomially-distributed observation, , with a normal distribution.
{{cite journal
|last = Wallis |first = Sean A.
|year = 2013
|title = Binomial confidence intervals and contingency tests: Mathematical fundamentals and the evaluation of alternative methods
|journal = Journal of Quantitative Linguistics
|volume = 20 |issue = 3 |pages = 178–208
|doi = 10.1080/09296174.2013.799918 |s2cid = 16741749
|url = http://www.ucl.ac.uk/english-usage/staff/sean/resources/binomialpoisson.pdf
}}
The normal approximation depends on the de Moivre–Laplace theorem (the original, binomial-only version of the central limit theorem) and becomes unreliable when it violates the theorems' premises, as the sample size becomes small or the success probability grows close to either {{math|0}} or {{math|1}} .
{{cite journal
| last1 = Brown | first1 = Lawrence D. | author1-link = Lawrence D. Brown
| last2 = Cai | first2 = T. Tony | author-link2 = T. Tony Cai
| last3 = DasGupta | first3 = Anirban
| year = 2001
| title = Interval estimation for a binomial proportion
| journal = Statistical Science
| volume = 16 | issue = 2 | pages = 101–133
| doi = 10.1214/ss/1009213286 | mr = 1861069
| zbl = 1059.62533 | citeseerx = 10.1.1.50.3025
}}
Using the normal approximation, the success probability is estimated by
:
where is the proportion of successes in a Bernoulli trial process and an estimator for in the underlying Bernoulli distribution. The equivalent formula in terms of observation counts is
:
where the data are the results of trials that yielded successes and failures. The distribution function argument is the quantile of a standard normal distribution (i.e., the probit) corresponding to the target error rate For a 95% confidence level, the error so and
When using the Wald formula to estimate , or just considering the possible outcomes of this calculation, two problems immediately become apparent:
- First, for approaching either {{math|1}} or {{math|0}}, the interval narrows to zero width (falsely implying certainty).
- Second, for values of (probability too low / too close to {{math|0}}), the interval boundaries exceed (overshoot).
(Another version of the second, overshoot problem, arises when instead falls below the same upper bound: probability too high / too close to {{math|1}} .)
An important theoretical derivation of this confidence interval involves the inversion of a hypothesis test. Under this formulation, the confidence interval represents those values of the population parameter that would have large P-values if they were tested as a hypothesized population proportion.{{clarification needed|date=January 2024|reason=Hypothesis tests assume the population parameter value and derive values, probabilities, for observed estimates under the assumption of that hypothesis. Confidence interval gives those values such that, assuming the center of the confidence interval as null hypothesis, estimates falling within the interval would be assigned values too large to reject. Which is kind of what the above is saying but also not, hence why clarification is needed.}} The collection of values, for which the normal approximation is valid can be represented as
:
where is the lower quantile of a standard normal distribution, vs. which is the upper quantile.
Since the test in the middle of the inequality is a Wald test, the normal approximation interval is sometimes called the Wald interval or Wald method, after Abraham Wald, but it was first described by Laplace (1812).
{{cite book
|last = Laplace |first=P.S. |author-link = Pierre-Simon Laplace
|year = 1812
|title = Théorie analytique des probabilités |lang=fr
|trans-title = Analyitic Probability Theory
|publisher = Ve. Courcier
|page = 283
|url = https://archive.org/details/thorieanalytiqu00laplgoog
}}
= Bracketing the confidence interval =
Extending the normal approximation and Wald-Laplace interval concepts, Michael Short has shown that inequalities on the approximation error between the binomial distribution and the normal distribution can be used to accurately bracket the estimate of the confidence interval around
{{cite journal
|last = Short |first = Michael
|date = 2021-11-08
|title = On binomial quantile and proportion bounds: With applications in engineering and informatics
|journal = Communications in Statistics - Theory and Methods
|volume = 52 |issue = 12 |pages = 4183–4199
|doi = 10.1080/03610926.2021.1986540 |doi-access = free
|s2cid = 243974180 |issn = 0361-0926
}}
:
with
:
and where is again the (unknown) proportion of successes in a Bernoulli trial process (as opposed to that estimates it) measured with trials yielding successes, is the quantile of a standard normal distribution (i.e., the probit) corresponding to the target error rate and the constants and are simple algebraic functions of For a fixed (and hence ), the above inequalities give easily computed one- or two-sided intervals which bracket the exact binomial upper and lower confidence limits corresponding to the error rate
=Standard error of a proportion estimation when using weighted data=
Let there be a simple random sample where each is i.i.d from a Bernoulli(p) distribution and weight is the weight for each observation, with the(positive) weights normalized so they sum to {{math|1}} . The weighted sample proportion is: Since each of the is independent from all the others, and each one has variance for every the sampling variance of the proportion therefore is:{{cite web |title=How to calculate the standard error of a proportion using weighted data? |website = stats.stackexchange.com |id = 159220 / 253 |url=https://stats.stackexchange.com/a/159220/253 }}
:
The standard error of is the square root of this quantity. Because we do not know we have to estimate it. Although there are many possible estimators, a conventional one is to use the sample mean, and plug this into the formula. That gives:
:
For otherwise unweighted data, the effective weights are uniform giving The becomes leading to the familiar formulas, showing that the calculation for weighted data is a direct generalization of them.
Wilson score interval
File:Wilson_score_interval_and_logistic_example.png
The Wilson score interval was developed by E.B. Wilson (1927).
{{cite journal
| last = Wilson | first = E.B. | author-link = Edwin Bidwell Wilson
| year = 1927
| title = Probable inference, the law of succession, and statistical inference
| journal = Journal of the American Statistical Association
| volume = 22 | issue = 158 | pages = 209–212
| jstor = 2276774 | doi = 10.1080/01621459.1927.10502953
}}
It is an improvement over the normal approximation interval in multiple respects: Unlike the symmetric normal approximation interval (above), the Wilson score interval is asymmetric, and it doesn't suffer from problems of overshoot and zero-width intervals that afflict the normal interval. It can be safely employed with small samples and skewed observations. The observed coverage probability is consistently closer to the nominal value,
Like the normal interval, the interval can be computed directly from a formula.
Wilson started with the normal approximation to the binomial:
:
where is the standard normal interval half-width corresponding to the desired confidence The analytic formula for a binomial sample standard deviation is
Combining the two, and squaring out the radical, gives an equation that is quadratic in
:
\left(\ p - \hat{p} \ \right)^2 = \frac{\; z_\alpha^2\ }{ n }\ p\ \left(\ 1 - p\ \right)\ \qquad
or
p^2 - 2\ p\ \hat{p} + {\hat{p}}^2 = p\ \frac{\; z_\alpha^2\ }{ n } - p^2\ \frac{\; z_\alpha^2\ }{ n } ~.
Transforming the relation into a standard-form quadratic equation for treating and as known values from the sample (see prior section), and using the value of that corresponds to the desired confidence for the estimate of gives this:
\left(\ 1 + \frac{\; z_\alpha^2\ }{ n }\ \right)\ p^2 -
\left(\ 2\ {\hat p} + \frac{\; z_\alpha^2\ }{ n }\ \right)\ p +
\biggl(\ {\hat p}^2\ \biggr) = 0 ~,
where all of the values bracketed by parentheses are known quantities.
The solution for estimates the upper and lower limits of the confidence interval for Hence the probability of success is estimated by and with confidence bracketed in the interval
:
p \quad \underset{\approx}{\in}_\alpha \quad \bigl(\ w^- ,\ w^+\ \bigr) ~~ = ~~ \frac{ 1 }{~ 1 + z_\alpha^2\ / n ~} \Bigg(\ \hat p + \frac{\; z_\alpha^2\ }{ 2\ n }
~~ \pm ~~
\frac{\!\ z_\alpha\!\ }{\!\ 2\ n\!\ }\ \sqrt{\ 4\ n\ \hat p\ (1 - \hat p) + \ z_\alpha^2 ~} ~\Biggr)\
where is an abbreviation for
:
An equivalent expression using the observation counts and is
:
p \quad \underset{\approx}{\in}_\alpha \quad \frac{\ n_\mathsf{s} + \tfrac{\!\ 1\!\ }{ 2 }\ z_\alpha^2\ }{ n + z_\alpha^2 }
~ \pm ~ \frac{ z_\alpha }{\ n + z_\alpha^2\ }
\sqrt{
\frac{\ n_\mathsf{s}\ n_\mathsf{f}\ }{ n } + \frac{\; z_\alpha^2\ }{ 4 } ~}\ ,
with the counts as above: the count of observed "successes", the count of observed "failures", and their sum is the total number of observations
In practical tests of the formula's results, users find that this interval has good properties even for a small number of trials and / or the extremes of the probability estimate,
Intuitively, the center value of this interval is the weighted average of and with receiving greater weight as the sample size increases. Formally, the center value corresponds to using a pseudocount of the number of standard deviations of the confidence interval: Add this number to both the count of successes and of failures to yield the estimate of the ratio. For the common two standard deviations in each direction interval (approximately 95% coverage, which itself is approximately 1.96 standard deviations), this yields the estimate which is known as the "plus four rule".
Although the quadratic can be solved explicitly, in most cases Wilson's equations can also be solved numerically using the fixed-point iteration
:
p_{\!\ k+1} = \hat{p} \pm z_\alpha\ \sqrt{ \tfrac{\!\ 1\!\ }{ n }\ p_k\ \left(\ 1 - p_k\ \right) ~}
with
The Wilson interval can also be derived from the single sample z-test or Pearson's chi-squared test with two categories. The resulting interval,
:
\left\{ ~~ \theta \quad \Bigg| \quad \ y_\alpha ~~ \le ~~
\frac{\ \hat{p} - \theta\ }{\ \sqrt{ \tfrac{\!\ 1\!\ }{ n }\ \theta\ \left( 1 - \theta\right) ~}\ }
~~ \le ~~ z_\alpha ~~ \right\}\ ,
(with the lower quantile)
can then be solved for to produce the Wilson score interval. The test in the middle of the inequality is a score test.
=The interval equality principle=
File:Wilson score pdf and interval equality.png ({{sc|pdf}}) for the Wilson score interval, plus {{sc|pdf}}s at interval bounds. Tail areas are equal.]]
Since the interval is derived by solving from the normal approximation to the binomial, the Wilson score interval has the property of being guaranteed to obtain the same result as the equivalent z-test or chi-squared test.
This property can be visualised by plotting the probability density function for the Wilson score interval (see Wallis).
{{cite book
| last = Wallis | first = Sean A.
| year = 2021
| title = Statistics in Corpus Linguistics: A new approach
| place = New York, NY
| publisher = Routledge
| isbn = 9781138589384
| url = https://www.routledge.com/Statistics-in-Corpus-Linguistics-Research-A-New-Approach/Wallis/p/book/9781138589384
}}
{{rp|style=ama|pp= 297-313}}
After that, then also plotting a normal {{sc|pdf}} across each bound. The tail areas of the resulting Wilson and normal distributions represent the chance of a significant result, in that direction, must be equal.
The continuity-corrected Wilson score interval and the Clopper-Pearson interval are also compliant with this property. The practical import is that these intervals may be employed as significance tests, with identical results to the source test, and new tests may be derived by geometry.
=Wilson score interval with continuity correction=
The Wilson interval may be modified by employing a continuity correction, in order to align the minimum coverage probability, rather than the average coverage probability, with the nominal value,
Just as the Wilson interval mirrors Pearson's chi-squared test, the Wilson interval with continuity correction mirrors the equivalent Yates' chi-squared test.
The following formulae for the lower and upper bounds of the Wilson score interval with continuity correction are derived from Newcombe:
{{cite journal
| last = Newcombe | first = R.G.
| year = 1998
| title = Two-sided confidence intervals for the single proportion: Comparison of seven methods
| journal = Statistics in Medicine
| volume = 17 | issue = 8 | pages = 857–872
| pmid = 9595616
| doi = 10.1002/(SICI)1097-0258(19980430)17:8<857::AID-SIM777>3.0.CO;2-E
}}
:
w_\mathsf{cc}^- &= \max \left\{ ~~ 0\ , ~~
\frac{\ 2\ n\ \hat{p} + z_\alpha^2 - \left[\ z_\alpha\ \sqrt{ z_\alpha^2 - \frac{\ 1\ }{ n } + 4\ n\ \hat{p}\ \left(1 - \hat{p}\right) + \left( 4\ \hat{p} - 2 \right) ~}\ +\ 1\ \right]\ }{\ 2 \left( n + z_\alpha^2 \right) ~~}
\right\}\ ,\\
w_\mathsf{cc}^+ &= \min \left\{ ~~ 1\ , ~~
\frac{\ 2\ n\ \hat{p} + z_\alpha^2 + \left[\ z_\alpha\ \sqrt{ z_\alpha^2 - \frac{\ 1\ }{ n } + 4\ n\ \hat{p}\ \left( 1 - \hat{p} \right) - \left( 4\ \hat{p} - 2 \right) ~}\ +\ 1\ \right]\ }{\ 2 \left( n + z_\alpha^2 \right) ~~}
\right\} ,
\end{align}
for and
If then must instead be set to if then must be instead set to
:
~~ - ~~
\frac{\!\ z_\alpha\!\ }{\!\ 2\ n\!\ }\ \sqrt{\ 4\ n\ \hat p\ (1 - \hat p) + \ z_\alpha^2 ~} ~\Biggr)\ ,
where is the selected tolerable error level for Then
:
This method has the advantage of being further decomposable.
Jeffreys interval
The Jeffreys interval has a Bayesian derivation, but good frequentist properties (outperforming most frequentist constructions). In particular, it has coverage properties that are similar to those of the Wilson interval, but it is one of the few intervals with the advantage of being equal-tailed (e.g., for a 95% confidence interval, the probabilities of the interval lying above or below the true value are both close to 2.5%). In contrast, the Wilson interval has a systematic bias such that it is centred too close to
{{cite journal
| last = Cai | first = T.T. | author-link = T. Tony Cai
| year = 2005
| title = One-sided confidence intervals in discrete distributions
| journal = Journal of Statistical Planning and Inference
| volume = 131 | issue = 1 | pages = 63–88
| doi=10.1016/j.jspi.2004.01.005
}}
The Jeffreys interval is the Bayesian credible interval obtained when using the non-informative Jeffreys prior for the binomial proportion The Jeffreys prior for this problem is a Beta distribution with parameters a conjugate prior. After observing successes in trials, the posterior distribution for is a Beta distribution with parameters
When and the Jeffreys interval is taken to be the equal-tailed posterior probability interval, i.e., the and quantiles of a Beta distribution with parameters
In order to avoid the coverage probability tending to zero when or {{math|1}} , when the upper limit is calculated as before but the lower limit is set to {{math|0}} , and when the lower limit is calculated as before but the upper limit is set to {{math|1}} .
Jeffreys' interval can also be thought of as a frequentist interval based on inverting the p-value from the G-test after applying the Yates correction to avoid a potentially-infinite value for the test statistic.{{cn|date=March 2025}}
Clopper–Pearson interval
The Clopper–Pearson interval is an early and very common method for calculating binomial confidence intervals.
{{Cite journal
| last1 = Clopper | first1 = C.
| last2 = Pearson | first2 = E.S. | author-link2 = Egon Pearson
| year = 1934
| title = The use of confidence or fiducial limits illustrated in the case of the binomial
| journal = Biometrika
| volume = 26 | issue = 4 | pages = 404–413
| doi = 10.1093/biomet/26.4.404
}}
This is often called an 'exact' method, as it attains the nominal coverage level in an exact sense, meaning that the coverage level is never less than the nominal
The Clopper–Pearson interval can be written as
:
or equivalently,
:
with
:
and
:
where is the number of successes observed in the sample and is a binomial random variable with trials and probability of success
Equivalently we can say that the Clopper–Pearson interval is with confidence level if is the infimum of those such that the following tests of hypothesis succeed with significance
- H0: with HA:
- H0: with HA:
Because of a relationship between the binomial distribution and the beta distribution, the Clopper–Pearson interval is sometimes presented in an alternate format that uses quantiles from the beta distribution.
{{cite journal
|last = Thulin |first = Måns
|date = 2014-01-01
|title = The cost of using exact confidence intervals for a binomial proportion
|journal = Electronic Journal of Statistics
|volume = 8 |issue = 1 |pages = 817–840
|doi = 10.1214/14-EJS909 |issn = 1935-7524
|arxiv = 1303.1288 |s2cid = 88519382 |lang = en
}}
:
where is the number of successes, is the number of trials, and is the {{mvar|p}}th quantile from a beta distribution with shape parameters and
Thus, where:
:
\tfrac{\ \Gamma(n+1)\ }{\ \Gamma\!( x )\ \Gamma\!( n-x+1 )\ }\ \int_0^{ p_{\min}}\ t^{x-1}\ (1-t)^{n-x}\ \mathrm{d}\!\ t ~~ = ~~ \tfrac{\!\ \alpha\!\ }{ 2 }\ ,
:
\tfrac{\Gamma(n+1)}{\Gamma(x+1)\Gamma(n-x)}\ \int_0^{ p_{\max}}\ t^{x}\ (1-t)^{n-x-1}\ \mathrm{d}\!\ t ~ = ~ 1 - \tfrac{\!\ \alpha\!\ }{ 2 } ~.
The binomial proportion confidence interval is then as follows from the relation between the Binomial distribution cumulative distribution function and the regularized incomplete beta function.
When is either {{math|0}} or closed-form expressions for the interval bounds are available: when the interval is
:
and when
it is
The beta distribution is, in turn, related to the F-distribution so a third formulation of the Clopper–Pearson interval can be written using F quantiles:
:
\left(\ 1 + \frac{\ n - x + 1\ }{\ x \ F\!\left[\ \tfrac{\!\ \alpha\!\ }{ 2 }\ ;\ 2\ x\ ,\ 2\ (\ n - x + 1\ )\ \right]\ }\ \right)^{-1}
~~ < ~~ p ~~ < ~~
\left(\ 1 + \frac{\ n - x\ }{(x + 1)\ \ F\!\left[\ 1 - \tfrac{\!\ \alpha\!\ }{ 2 }\ ;\ 2\ (x + 1)\ ,\ 2\ (n - x\ )\ \right]\ }\ \right)^{-1}
where is the number of successes, is the number of trials, and is the quantile from an F-distribution with and degrees of freedom.
The Clopper–Pearson interval is an 'exact' interval, since it is based directly on the binomial distribution rather than any approximation to the binomial distribution. This interval never has less than the nominal coverage for any population proportion, but that means that it is usually conservative. For example, the true coverage rate of a 95% Clopper–Pearson interval may be well above 95%, depending on and Thus the interval may be wider than it needs to be to achieve 95% confidence, and wider than other intervals. In contrast, it is worth noting that other confidence interval may have coverage levels that are lower than the nominal i.e., the normal approximation (or "standard") interval, Wilson interval, Agresti–Coull interval,
{{cite journal
| last1 = Agresti | first1 = Alan | author-link1 = Alan Agresti
| last2 = Coull | first2 = Brent A.
| year = 1998
| title = Approximate is better than 'exact' for interval estimation of binomial proportions
| journal = The American Statistician
| volume = 52 | issue = 2 | pages = 119–126
| mr = 1628435 | jstor = 2685469
| doi=10.2307/2685469
}}
etc., with a nominal coverage of 95% may in fact cover less than 95%, even for large sample sizes.
The definition of the Clopper–Pearson interval can also be modified to obtain exact confidence intervals for different distributions. For instance, it can also be applied to the case where the samples are drawn without replacement from a population of a known size, instead of repeated draws of a binomial distribution. In this case, the underlying distribution would be the hypergeometric distribution.
The interval boundaries can be computed with numerical functions {{mono|qbeta}}
{{cite web
|title = The Beta distribution
|series = R Manual
|type = software doc
|website = stat.ethz.ch
|url=https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Beta.html
|access-date=2023-12-02
}}
{{cite report
|section= scipy.stats.beta
|title= SciPy Manual |edition = 1.11.4
|website = docs.scipy.org
|type = software doc
|section-url = https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.beta.html
|access-date = 2023-12-02
}}
in Python.
from scipy.stats import beta
import numpy as np
k = 20
n = 400
alpha = 0.05
p_u, p_o = beta.ppf([alpha/2, 1 - alpha/2], [k, k + 1], [n - k + 1, n - k])
if np.isnan(p_o):
p_o=1
if np.isnan(p_u):
p_u=0
Agresti–Coull interval
The Agresti–Coull interval is also another approximate binomial confidence interval.
Given successes in trials, define
:
and
:
Then, a confidence interval for is given by
:
\ p ~~ \approx ~~ \tilde p ~ \pm ~
z_\alpha\ \sqrt{ \frac{\!\ \tilde p\!\ }{ \tilde n }\ \left(\!\ 1 - \tilde p \!\ \right) ~}
where is the quantile of a standard normal distribution, as before (for example, a 95% confidence interval requires thereby producing ). According to Brown, Cai, & DasGupta (2001), taking instead of 1.96 produces the "add 2 successes and 2 failures" interval previously described by Agresti & Coull.
This interval can be summarised as employing the centre-point adjustment, of the Wilson score interval, and then applying the Normal approximation to this point.
:
Arcsine transformation
{{main|Arcsine transformation}}
{{further|Cohen's h}}
The arcsine transformation has the effect of pulling out the ends of the distribution.
{{cite web
|last=Holland|first=Steven
|title=Transformations of proportions and percentages
|url=http://strata.uga.edu/8370/rtips/proportions.html
|access-date=2020-09-08
|website=strata.uga.edu
}}
While it can stabilize the variance (and thus confidence intervals) of proportion data, its use has been criticized in several contexts.
{{cite journal
|last1 = Warton |first1 = David I.
|last2 = Hui |first2 = Francis K.C.
|date = January 2011
|title = The arcsine is asinine: The analysis of proportions in ecology
|journal = Ecology
|volume = 92 |issue = 1 |pages = 3–10
|doi = 10.1890/10-0340.1 |pmid = 21560670
|bibcode = 2011Ecol...92....3W |issn = 0012-9658
|hdl = 1885/152287 |hdl-access = free
|url = http://doi.wiley.com/10.1890/10-0340.1
|lang = en
}}
Let be the number of successes in trials and let The variance of is
:
Using the arc sine transform, the variance of the arcsine of is
{{cite book
|last = Shao |first = J.
|year = 1998
|title = Mathematical Statistics
|publisher = Springer
|place = New York, NY
}}
:
So, the confidence interval itself has the form
:
where is the quantile of a standard normal distribution.
This method may be used to estimate the variance of but its use is problematic when is close to {{math|0}} or {{math|1}} .
''t''<sub>''a''</sub> transform
{{unreferenced section|date=July 2017}}
Let be the proportion of successes. For
:
This family is a generalisation of the logit transform which is a special case with a = 1 and can be used to transform a proportional data distribution to an approximately normal distribution. The parameter a has to be estimated for the data set.
Rule of three — for when no successes are observed
The rule of three is used to provide a simple way of stating an approximate 95% confidence interval for in the special case that no successes () have been observed.
{{cite web
|first = Steve |last = Simon
|year = 2010
|title = Confidence interval with zero events
|series= Ask Professor Mean
|place = Kansas City, MO
|publisher = The Children's Mercy Hospital
|url = http://www.pmean.com/01/zeroevents.html
|archive-url = https://web.archive.org/web/20111015182854/http://www.childrensmercy.org/stats/
|archive-date=15 October 2011
}} [http://www.childrensmercy.org/stats/ Stats topics on Medical Research]
The interval is
By symmetry, in the case of only successes (), the interval is
Comparison and discussion
There are several research papers that compare these and other confidence intervals for the binomial proportion.
{{cite conference
|last1 = Sauro |first1 = J.
|last2 = Lewis |first2 = J.R.
|year = 2005
|title = Comparison of Wald, Adj-Wald, exact, and Wilson intervals calculator
|conference = Human Factors and Ergonomics Society, 49th Annual Meeting (HFES 2005)
|place = Orlando, FL
|pages = 2100–2104
|url = http://www.measuringusability.com/papers/sauro-lewisHFES.pdf
|archive-url = https://web.archive.org/web/20120618053914/http://www.measuringusability.com/papers/sauro-lewisHFES.pdf
|archive-date = 2012-06-18 |df = dmy-all
}}
{{cite journal
| last = Reiczigel | first = J.
| year = 2003
| title = Confidence intervals for the binomial parameter: Some new considerations
| url = http://www.zoologia.hu/qp/Reiczigel_conf_int.pdf
| journal = Statistics in Medicine
| volume = 22 | issue = 4 | pages = 611–621
| doi=10.1002/sim.1320
| pmid = 12590417 | s2cid = 7715293
}}
{{Cite journal
| last = Ross | first = T.D.
| year = 2003
| title = Accurate confidence intervals for binomial proportion and Poisson rate estimation
| journal = Computers in Biology and Medicine
| volume = 33 | issue = 6 | pages = 509–531
| doi = 10.1016/S0010-4825(03)00019-2 | pmid = 12878234
| url = https://zenodo.org/record/1259565
}}
point out that exact methods such as the Clopper–Pearson interval may not work as well as some approximations. The normal approximation interval and its presentation in textbooks has been heavily criticised, with many statisticians advocating that it not be used.
The principal problems are overshoot (bounds exceed ), zero-width intervals at or {{math|1}} (falsely implying certainty), and overall inconsistency with significance testing.
Of the approximations listed above, Wilson score interval methods (with or without continuity correction) have been shown to be the most accurate and the most robust, though some prefer Agresti & Coulls' approach for larger sample sizes. Wilson and Clopper–Pearson methods obtain consistent results with source significance tests, and this property is decisive for many researchers.
Many of these intervals can be calculated in R using packages like {{mono|binom}}.
{{cite report
|last = Dorai-Raj |first = Sundar
|date = 2022-05-02
|title = binom: Binomial confidence intervals for several parameterizations
|type = software doc.
|url = https://cran.r-project.org/web/packages/binom/index.html
|access-date = 2023-12-02 |df=dmy-all
}}
See also
References
{{reflist|25em}}
{{DEFAULTSORT:Binomial Proportion Confidence Interval}}