How it works
A confidence interval gives a range that's likely to contain the true population mean, based on your sample. Wider confidence (99% vs. 90%) means a bigger margin of error, since you're demanding more certainty.
margin of error = z × (standard deviation ÷ √n)
interval = sample mean ± margin of error
z = 1.645 (90%) · 1.96 (95%) · 2.576 (99%)
This uses the z-distribution, which is a good approximation whenever the sample size is reasonably large (n ≥ 30 is a common rule of thumb). For small samples, a t-distribution gives a more accurate (typically wider) interval.
Worked example
A sample of 100, mean 50, standard deviation 10, at 95% confidence.
- Divide the standard deviation by √n: 10 ÷ √100 = 10 ÷ 10 = 1.
- Multiply by the 95% z-value: 1.96 × 1 = 1.96.
Margin of error is ± 1.96, so the interval runs from 48.04 to 51.96.
Common questions
What does "95% confidence" actually mean?
If you repeated this sampling process many times and built an interval each time, about 95% of those intervals would contain the true population mean. It's a statement about the method's long-run reliability, not the probability that this one interval is correct.
Why does a higher confidence level widen the interval?
Being more certain of capturing the true mean requires casting a wider net — 99% confidence needs a bigger margin than 90%, for the same sample.
What if my sample size is small?
Below about n=30, the z-distribution underestimates the true margin of error. A t-distribution, which accounts for the extra uncertainty in small samples, is the more accurate choice there.