What “95% confident” really means
Draw 40 samples of 15 from a population whose true mean is 100 (the vertical line). Each bar is one sample's 95% interval. Most catch the true mean; a few miss, shown in coral. The confidence level describes how often the method works, not any single interval.
Formulas used
Mean: x̄ ± tα/2, n−1 · s/√n. Proportion (Wilson): (p̂ + z²/2n ± z√(p̂(1−p̂)/n + z²/4n²)) / (1 + z²/n). The Wilson interval stays inside 0–100% and keeps close to its nominal coverage even for small n.
Confidence levels and critical values
| Confidence level | z* | t* (df = 10) | t* (df = 30) |
|---|---|---|---|
| 90% | 1.645 | 1.812 | 1.697 |
| 95% | 1.96 | 2.228 | 2.042 |
| 99% | 2.576 | 3.169 | 2.75 |
A higher confidence level gives a wider interval: you buy certainty with precision. To narrow the interval without lowering confidence, increase the sample size (see the sample size calculator).
Frequently asked questions
How do I calculate a confidence interval for a mean?
x̄ ± t* × s/√n, where t* is the critical value from the t distribution with n − 1 degrees of freedom. For n = 25, x̄ = 50, s = 10 at 95%: t* = 2.064, so 50 ± 4.13, or 45.87 to 54.13.
What does a 95% confidence level mean?
If you repeated the study many times and built an interval each time, about 95% of those intervals would contain the true value. It does not mean there is a 95% probability that this particular interval contains it.
Why use the Wilson interval for proportions?
The simple Wald interval (p ± z√(p(1−p)/n)) performs badly with small samples or proportions near 0 or 1, sometimes extending below 0%. Brown, Cai and DasGupta (2001) recommend the Wilson score interval instead.
When is z used instead of t?
Only when the population standard deviation is genuinely known, which is rare in research. With a sample SD, use t; for large n the two converge.