Statistics & Probability
Advanced

Wilson Score Interval

A confidence interval for a binomial proportion, obtained by inverting a score test. Assumes independent Bernoulli observations with a common success probability and n > 0; this is the version without continuity correction.

Formula

p^+z22n  ±  zp^(1−p^)n+z24n21+z2n\frac{\hat p+\frac{z^2}{2n}\;\pm\;z\sqrt{\frac{\hat p(1-\hat p)}{n}+\frac{z^2}{4n^2}}}{1+\frac{z^2}{n}}

Variables

\hat pObserved proportion x/n
xObserved successes (0 ≤ x ≤ n)
nNumber of independent trials
zStandard-normal quantile for the two-sided confidence level, approximately 1.96 for 95%

Example

18 successes in 20 trials give p̂ = 0.90. With z = 1.96, the Wilson interval is approximately [0.6990, 0.9721], or 69.90%–97.21%.

How it works

Eighteen successes out of twenty gives a sample rate of 90%, but a small sample does not pin down the underlying rate precisely. The Wilson interval expresses sampling uncertainty by inverting a binomial score test. Its centre is adjusted away from the raw observed proportion, helping it behave better near zero and one than a simple symmetric Wald interval.

When to use it

Estimate uncertainty in binary success rates from independent observations with a common success probability, such as a survey yes/no response or a test pass rate. It does not correct biased sampling, correlated reviews or five-star ratings treated as continuous scores.

Worked example, step by step

Step 1: Observe x = 18 successes in n = 20 independent trials. The sample proportion is p̂ = 18/20 = 0.90.

Step 2: For an approximate 95% two-sided interval, use z = 1.96 and z² = 3.8416.

Step 3: Denominator = 1 + 3.8416/20 = 1.19208.

Step 4: Adjusted centre = (0.90 + 3.8416/40)/1.19208 ≈ 0.835548.

Step 5: Half-width = 1.96 × √(0.90 × 0.10/20 + 3.8416/(4 × 20²))/1.19208 ≈ 0.136586.

Step 6: Bounds = 0.835548 ± 0.136586 ≈ [0.698962, 0.972134].

Final answer: approximately 69.90% to 97.21%.

Interpretation: the method has approximately the stated coverage over repeated samples. This does not mean there is a 95% frequentist probability that the fixed parameter lies inside this particular interval.

Common mistakes to avoid

  • Using a mean-rating interval for data that are not binary.
  • Reading a confidence level as a posterior probability for this one interval.
  • Forgetting to divide both the centre and the margin by 1 + z²/n.
  • Assuming the interval repairs sampling bias or dependent observations.

Did You Know?

Unlike the simple Wald interval, Wilson’s interval stays within the probability bounds even for samples with all successes or all failures.

Share this formula

Educational examples use simplified assumptions. Check units and applicability before using a result; health, financial and safety decisions need appropriate professional guidance. About FormulaWon · Report a correction