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 p when only the number of experiments n and the number of successes n𝗌 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.
Problems with using a normal approximation or "Wald interval"
A commonly used formula for a binomial confidence interval relies on approximating the distribution of error about a binomially-distributed observation, p̂ , with a normal distribution. 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 0 or 1 . Using the normal approximation, the success probability p is estimated by p ≈ p̂±zαn p̂(1−p̂) , where p̂≡n𝗌n is the proportion of successes in a Bernoulli trial process and an estimator for p in the underlying Bernoulli distribution. The equivalent formula in terms of observation counts is p ≈ n𝗌n±zαn n𝗌nn𝖿n , where the data are the results of n trials that yielded n𝗌 successes and n𝖿=n−n𝗌 failures. The distribution function argument zα is the 1−α2 quantile of a standard normal distribution (i.e., the probit) corresponding to the target error rate α . For a 95% confidence level, the error α = 1−0.95 = 0.05 , so that 1−α2=0.975 and z.05=1.96 . When using the Wald formula to estimate p , or just considering the possible outcomes of this calculation, two problems immediately become apparent:
First, for p̂ approaching either 1 or 0, the interval narrows to zero width (falsely implying certainty). Second, for values of p̂<11+n/zα2 (probability too low / too close to 0), the interval boundaries exceed [0,1] (overshoot). (Another version of the second, overshoot problem, arises when instead 1−p̂ falls below the same upper bound: probability too high / too close to 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. The collection of values, θ , for which the normal approximation is valid can be represented as {θ|yα ≤ p̂−θ1n p̂(1−p̂) ≤ zα} , where yα is the lower α2 quantile of a standard normal distribution, vs. zα , which is the upper ( i.e., 1−α2 ) 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).
Standard error of a proportion estimation when using weighted data To apply the principles of the weighted data correctly, you need to understand the type of the weight you are dealing with. For analytic weights, the following calculation can be applied. Let X1, …, Xn be such that each Xi is i.i.d from a Bernoulli( p ) distribution and weight wi is the weight for each observation, with the (positive) weights wi normalized so they sum to 1 . The weighted sample proportion is: p̂=∑i=1nwiXi . Since each of the Xi is independent from all the others, and each one has variance var{ Xi }=p(1−p) for every i=1, …, n ; the sampling variance of the proportion therefore is: var{ p̂ } = ∑i=1nvar{ wiXi } = p(1−p)∑i=1nwi2 . The standard error of p̂ is the square root of this quantity. Because we do not know p(1−p) , we have to estimate it. Although there are many possible estimators, a conventional one is to use p̂ , the sample mean, and plug this into the formula. That gives: SE{ p̂ } ≈ p̂(1−p̂)∑i=1nwi2 . For otherwise unweighted data, the effective weights are uniform wi=1n , giving ∑i=1nwi2=1n . The SE becomes 1n p̂(1−p̂) , leading to the familiar formulas, showing that the calculation for weighted data is a direct generalization of them. If the weights in question are the complex sampling design weights, appropriate statistical software (R package survey; Python package svy) needs to be used to obtain standard errors corrected for the survey sampling design. An extension of the § Clopper-Pearson interval presented below to the complex survey data is also known as the Korn-Graubard confidence interval.
Wilson score interval
… excerpt ends here. Continue reading the full article.



