Why Use the Wilson Score Interval?
For a binomial sample, the Wald interval estimates a proportion by taking the observed sample proportion and adding and subtracting a margin based on its estimated standard error. Its simplicity is useful, but the interval can behave poorly, particularly when the estimate is based on limited information. The Wilson score interval uses a different construction: it asks which hypothesized population proportions would not be rejected by a large-sample score test.
This change in construction affects both the interval's center and its width. In general, the Wilson interval is not centered at the observed sample proportion. Its endpoints come from the same test inequality, so the margin depends on the uncertainty under each hypothesized proportion rather than treating the estimated standard error as fixed. The method is aligned with the SOA VEE Mathematical Statistics syllabus.
Deriving the Wilson Interval
Under the null hypothesis that the success probability is \(p_0\), the binomial variance of the sample proportion is \(p_0(1-p_0)/n\). The large-sample score statistic therefore standardizes the difference between the observed proportion and \(p_0\) using this null-hypothesis variance. A candidate \(p_0\) is retained in a two-sided interval when the absolute value of this statistic is no greater than \(z\).
Squaring both sides is valid because both sides of the absolute-value inequality are nonnegative. Multiplying by \(p_0(1-p_0)/n\), which is nonnegative for \(0\le p_0\le1\), gives a quadratic inequality in \(p_0\). Its two roots are the interval endpoints.
\(n(\hat p-p_0)^2\le z^2p_0(1-p_0)\).
Expanding and moving everything to the left gives \((n+z^2)p_0^2-(2n\hat p+z^2)p_0+n\hat p^2\le0\).
The quadratic opens upward, so the accepted values lie between its two roots. Completing the square, or using the quadratic formula, yields the center and half-width below.
Here \(C_W\) is the Wilson center and \(H_W\) is its half-width. The factor \(1+z^2/n\) appears in the denominator of both expressions. The terms involving \(z^2\) are consequences of solving the test inequality; they are not an optional adjustment to the Wald formula.
Calculating and Interpreting the Interval
For a 95% interval, \(z=1.96\) and \(z^2=3.8416\). Once \(n\) and \(x\) are known, calculate \(\hat p=x/n\), then evaluate the center and half-width. Keep adequate precision during the arithmetic and round the endpoints only at the end. The Wilson center is generally shifted from \(\hat p\) toward \(1/2\): the \(z^2/(2n)\) term pulls the numerator in that direction, while the denominator also adjusts the result. The size of the shift depends on the sample size and the observed proportion.
Worked Example: A Hypothetical Screening Program
A hypothetical screening program records positive results for 12 of 50 independent participants. Assume each participant has the same probability \(p\) of a positive result. Find the 95% Wilson interval for \(p\).
Method. Use the binomial model with \(n=50\), \(x=12\), \(\hat p=12/50=0.24\), and \(z=1.96\), so \(z^2=3.8416\).
Center. The denominator is \(1+3.8416/50=1.076832\). The numerator is \(0.24+3.8416/(2\cdot50)=0.24+0.038416=0.278416\). Thus
Half-width. The quantity under the square root is \(0.24(0.76)/50+3.8416/(4\cdot50^2)=0.003648+0.00038416=0.00403216\). Its square root is approximately \(0.0634993\). Therefore
The endpoints are \(0.258551-0.115578=0.142973\) and \(0.258551+0.115578=0.374129\). Rounded to four decimal places, the interval is \((0.1430,\,0.3741)\). As a check, the center is the average of the unrounded endpoints, and the half-width is half their difference. The method avoids treating the Wald standard error, which is based only on \(\hat p\), as the standard error for every candidate \(p_0\).
Worked Example: A Small Quality Audit
A hypothetical audit checks 25 independently selected seals from a production batch and finds that 3 fail a pressure test. Assume each seal has the same failure probability \(p\). Calculate the 95% Wilson interval for \(p\), and explain where its center lies relative to the observed failure proportion.
Here \(n=25\), \(x=3\), \(\hat p=3/25=0.12\), and \(z=1.96\), with \(z^2=3.8416\). The common denominator in the Wilson formulas is \(1+3.8416/25=1.153664\).
The center numerator is \(0.12+3.8416/(2\cdot25)=0.12+0.076832=0.196832\), so
For the half-width, \(0.12(0.88)/25=0.004224\), and \(3.8416/(4\cdot25^2)=3.8416/2500=0.00153664\). The sum is \(0.00576064\), whose square root is approximately \(0.075899\). Hence
The endpoints are \(0.170615-0.128947=0.041668\) and \(0.170615+0.128947=0.299562\). Rounded to four decimal places, the interval is \((0.0417,\,0.2996)\). Its center, approximately \(0.1706\), exceeds \(\hat p=0.12\) and is shifted toward \(1/2\). The check is that the endpoint average is approximately \(0.1706\), with half their difference approximately \(0.1289\). The shift is part of the score-test inversion, not a change to the observed proportion.
Worked Example: Comparing Wilson and Wald Intervals
A hypothetical reliability study records 54 successful operating cycles out of 120 independent cycles, each with the same success probability \(p\). Find the 95% Wilson interval and compare it with the 95% Wald interval.
The data give \(n=120\), \(x=54\), and \(\hat p=54/120=0.45\). For Wilson, \(1+3.8416/120=1.0320133\). Its center numerator is \(0.45+3.8416/240=0.4660067\), so \(C_W\approx0.451551\).
The term under the Wilson square root is \(0.45(0.55)/120+3.8416/(4\cdot120^2)=0.0020625+0.0000666944=0.0021291944\). Its square root is approximately \(0.0461432\). Thus the half-width is \(1.96(0.0461432)/1.0320133\approx0.087639\), giving the Wilson interval \((0.3639,\,0.5392)\), rounded to four decimal places.
For comparison, the Wald interval uses \(\hat p\pm1.96\sqrt{\hat p(1-\hat p)/n}\). Here its standard error is \(\sqrt{0.45(0.55)/120}=\sqrt{0.0020625}\approx0.045415\), and its margin is \(1.96(0.045415)\approx0.089013\). The Wald endpoints are \(0.45-0.089013=0.360987\) and \(0.45+0.089013=0.539013\), or \((0.3610,\,0.5390)\) to four decimal places.
The Wald interval is centered exactly at \(0.45\); the Wilson interval is centered at approximately \(0.4516\), slightly closer to \(1/2\). Their widths also differ: the Wilson half-width is about \(0.0876\), while the Wald margin is about \(0.0890\). This comparison illustrates the formulas; it does not establish that Wilson must always be wider or always be narrower.
Common Mistake: Using the Wald Standard Error
A frequent error is to invert the score test but substitute \(\hat p(1-\hat p)/n\) for the variance at every candidate \(p_0\). That substitution changes the test: it fixes the standard error at its estimate rather than using the null value. It produces the Wald interval, not the Wilson interval.
For the seal audit above, the incorrect Wald calculation would be \(0.12\pm1.96\sqrt{0.12(0.88)/25}\). Since the square root is \(\sqrt{0.004224}\approx0.064992\), the margin is approximately \(0.127384\), giving \((-0.0074,\,0.2474)\). The correct Wilson calculation instead gives approximately \((0.0417,\,0.2996)\). The negative Wald endpoint is a warning that the Wald construction can behave awkwardly; it is not a reason to alter the score-test derivation or to report a different formula as Wilson.
Check Your Understanding
For each problem, use the stated binomial model and confidence level. Round interval endpoints to four decimal places.
- A hypothetical seed trial observes 20 germinations among 40 independently selected seeds, each with the same germination probability. Find the 95% Wilson interval. (Answer: approximately \((0.3520,\,0.6480)\))
- A hypothetical service desk resolves 18 of 60 independently selected requests on the first contact. Assuming a common resolution probability, find the 95% Wilson interval. (Answer: approximately \((0.1990,\,0.4251)\))
- A hypothetical materials test finds 28 passing specimens among 80 independent specimens with a common pass probability. Find the 90% Wilson interval using \(z=1.645\). (Answer: approximately \((0.2685,\,0.4413)\))
- A hypothetical audit finds 3 defective items among 25 independent items with a common defect probability. Find the 95% Wilson interval and state whether its center is above or below the observed proportion. (Answer: approximately \((0.0417,\,0.2996)\); the center is about \(0.1706\), above \(\hat p=0.12\))
- A hypothetical device test records 65 successful trials among 100 independent trials with a common success probability. Find the 95% Wilson interval and the Wald interval, and compare their centers. (Answer: Wilson approximately \((0.5525,\,0.7364)\); Wald approximately \((0.5565,\,0.7435)\); Wilson center about \(0.6445\), compared with Wald center \(0.6500\))