Why Boundary Proportions Need Care
A confidence interval for a population proportion should reflect uncertainty about an unknown proportion \(p\), which must lie between 0 and 1. The familiar Wald interval uses the sample proportion \(\hat{p}\) as its estimate of \(p\), and also uses \(\hat{p}\) to estimate the standard error. When the observed proportion is close to either boundary, that estimated standard error can be misleadingly small. The resulting interval may extend below 0 or above 1, or, in an extreme case, have zero width.
The Wald interval is not automatically unusable whenever \(\hat{p}\) is somewhat near a boundary. The concern is that its normal approximation can perform poorly when the data contain few successes or few failures. The Wilson score interval is a widely used alternative. It is based on the same binomial model but handles uncertainty near the boundaries more reliably.
The Wald Interval and Its Boundary Problem
For a two-sided confidence interval with confidence level \(1-\alpha\), let \(z^*\) be the standard normal critical value with central probability \(1-\alpha\). The Wald interval is
Its estimated standard error is \(\sqrt{\hat{p}(1-\hat{p})/n}\). This plug-in estimate is convenient, but it can be unstable near the boundaries. In particular, if \(X=0\), then \(\hat{p}=0\) and the estimated standard error is zero; the interval is just \([0,0]\), regardless of the sample size. Observing no successes does not establish that the population success probability is exactly zero. Likewise, when \(X=n\), the Wald interval is just \([1,1]\).
Even when the observed count is not exactly zero or \(n\), the Wald interval can have a negative lower limit or an upper limit greater than 1. Those values are impossible for a population proportion and signal that the approximation is not behaving well. Simply truncating such an interval to \([0,1]\) does not fix the underlying problem with its coverage. The Wilson score interval addresses the problem through a different construction.
Worked Example: One Success in a Small Sample
Suppose a hypothetical independent sample of \(n=20\) people contains \(X=1\) person with a specified characteristic. Calculate a 95% Wald interval and check whether it is plausible.
The sample proportion is \(\hat{p}=1/20=0.05\). For 95% confidence, use \(z^*=1.96\). The Wald standard error is
The margin of error is \(1.96(0.04873)\approx 0.09552\), so the interval is
The lower limit is negative, which is impossible for a population proportion. Here there is only one success, so the normal approximation behind the Wald procedure is especially questionable. This calculation is a warning to use a more suitable interval, not a reason to interpret a negative proportion.
Deriving the Wilson Score Interval
The Wilson interval is obtained by asking which candidate population proportions \(p_0\) are consistent with the observed data under a score-test criterion. For a candidate \(p_0\) strictly between 0 and 1, the standardized score statistic is
A two-sided score test at critical value \(z^*\) does not reject \(p_0\) when the absolute value of this statistic is at most \(z^*\). Inverting the test means keeping all candidate values \(p_0\) that satisfy this inequality; the resulting set is the confidence interval. Squaring both sides and substituting \(p\) for the candidate value gives
Expanding and collecting terms in \(p\) gives a quadratic inequality:
Because the coefficient of \(p^2\) is positive, the values satisfying the inequality lie between the two roots. Applying the quadratic formula and simplifying those roots gives the Wilson limits:
The plus sign gives the upper limit and the minus sign gives the lower limit. This inversion explains why the Wilson formula includes \(p\)-dependent uncertainty in the test statistic rather than estimating the standard error solely by plugging \(\hat{p}\) into it. The interval is an approximate, nominal confidence interval, not an exact guarantee of coverage in every sample.
Calculating and Interpreting Wilson Limits
The following examples use 95% confidence, so \(z^*=1.96\) and \((z^*)^2=3.8416\). The same calculation applies at other confidence levels after choosing the corresponding critical value. Check that the model and sampling assumptions are reasonable before interpreting the interval: the formula does not repair a biased sample or dependence that was ignored in the design.
Worked Example: No Successes Observed
In a hypothetical independent sample of \(n=30\) people, suppose there are no observed successes, so \(X=0\) and \(\hat{p}=0\). Compare the Wald result with the 95% Wilson interval.
The Wald standard error is \(\sqrt{0(1-0)/30}=0\), giving the interval \([0,0]\). That result claims no sampling uncertainty despite there being only 30 observations.
For the Wilson calculation, the center and half-width are
Thus the Wilson interval is approximately \([0,\ 0.1135]\). In this boundary case the lower limit is zero, while the upper limit is positive: the sample provides evidence compatible with a small success probability, but does not rule out all positive values. For these data and assumptions, we are 95% confident that the population proportion is between 0 and about 0.1135.
Worked Example: Comparing Intervals Away From the Boundary
Suppose a hypothetical independent sample of 40 people has 8 successes. Then \(\hat{p}=8/40=0.20\). Calculate both 95% intervals to see how the methods compare when the observed proportion is less extreme.
For the Wald interval,
The Wald limits are \(0.20-0.1240=0.07604\) and \(0.20+0.1240=0.3240\), approximately \([0.07604,\ 0.3240]\).
For Wilson, the denominator is \(1+3.8416/40=1.09604\). The center is
and the half-width is
The Wilson interval is therefore approximately \([0.1050,\ 0.3476]\). Both intervals are within the possible range, but they are not identical: Wilson accounts for the score-test construction and is not required to be centered at \(\hat{p}\). The 95% Wilson interval estimates the population proportion of people with the specified characteristic, not the proportion in some other population or time period.
When to Use Wilson and What to Watch For
The Wald interval is simple, and it may be adequate when both successes and failures are numerous enough for the normal approximation to be dependable. Near a boundary, however, the Wilson interval is generally a more stable choice. It remains within \([0,1]\) and avoids the zero-width Wald result at \(X=0\) or \(X=n\). For example, when \(X=0\), its upper limit simplifies to \((z^*)^2/(n+(z^*)^2)\), which is positive for a finite positive sample size.
An interval method cannot compensate for flaws in how data were collected. Wilson limits do not make a convenience sample representative, make dependent observations independent, or remove measurement error. State the population and outcome clearly, and verify that the binomial sampling model is plausible before interpreting the numerical limits.
Check Your Understanding
Answer these questions using the definitions and methods above.
- What happens to the Wald standard error and interval when \(X=0\)? Why is that result concerning?
- For a two-sided 95% Wilson interval, what value of \(z^*\) is used, and what is the role of that critical value?
- In the Wilson derivation, what does it mean to invert the score test?
- Why is truncating a negative Wald lower limit to zero not, by itself, a solution to the boundary problem?
- A hypothetical sample has \(n=50\) and \(X=49\). What feature of the Wald interval should you check before interpreting it, and which alternative interval could you calculate?