Worked example
Example: Illustrative 7 defectives in 120 at 95 %. The inputs, in the units selected above:
| Input | Value |
|---|---|
| Successes (or defectives) observed | 7.0000 - |
| Trials (sample size) | 120.00 - |
| Confidence level | 95 % |
Applying the formula below gives:
| Result | Value |
|---|---|
| Point estimate x/n | 5.8333 % |
| Wilson lower limit | 2.8541 % |
| Wilson upper limit | 11.553 % |
| Wald lower limit (clipped at 0) | 1.6400 % |
| Wald upper limit (clipped at 1) | 10.027 % |
Open this example in the calculator and change any input.
Formula
\(p_{L,U} = \frac{\hat p + \frac{z^2}{2n} \mp z\sqrt{\frac{\hat p(1-\hat p)}{n} + \frac{z^2}{4n^2}}}{1 + \frac{z^2}{n}}\)
Variables
| Symbol | Meaning | SI unit |
|---|---|---|
| \(x\) | Successes (or defectives) observed | - |
| \(n\) | Trials (sample size) | - |
| \(1-\alpha\) | Confidence level | - |
| \(\hat p\) | Point estimate x/n | - |
| \(p_L\) | Wilson lower limit | - |
| \(p_U\) | Wilson upper limit | - |
| \(p_{L,Wald}\) | Wald lower limit (clipped at 0) | - |
| \(p_{U,Wald}\) | Wald upper limit (clipped at 1) | - |
Method and standards
Wilson interval.
Where it is used
- Defect, failure and pass rates from samples.
- Survey and test result reporting.
Common mistakes
- Using the Wald interval for small samples.
- Entering a percentage instead of counts.
Assumptions and limits
- Independent trials with a constant probability.
References
- Wilson score interval
Questions and answers
Why not the simple ± formula?
The Wald interval has poor coverage for small samples or proportions near 0 or 1, and gives zero width when nothing is observed.
What if no failures were seen?
Wilson still gives an upper limit; for 0 of n the 95 % upper limit is close to the rule of three, 3/n.
What do the defaults represent?
An illustrative 7 defectives in a sample of 120, at 95 % confidence.
Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.
Sources
Wilson, Probable Inference, the Law of Succession, and Statistical Inference, J. Am. Stat. Assoc. 22 (1927)