What a confidence interval tells you
A sample mean is an estimate. Take another sample and you would get a slightly different number. A confidence interval gives a range that captures this uncertainty: with a 95% interval, the method used would contain the true population mean in 95% of repeated samples. The width depends on three things: the spread of the data, the sample size and the confidence level you choose.
The formulas
- Standard error of the mean: SE = s ÷ √n
- Margin of error: E = z* × SE
- Interval: mean − E to mean + E
The critical value z* depends on the confidence level: 1.645 for 90%, 1.960 for 95%, 2.326 for 98%, 2.576 for 99% and 3.291 for 99.9%.
Worked example
A food delivery service times 64 orders. The average delivery takes 32 minutes, with a standard deviation of 8 minutes.
- Standard error: 8 ÷ √64 = 1 minute.
- Margin of error at 95%: 1.96 × 1 = 1.96 minutes.
- 95% confidence interval: 30.04 to 33.96 minutes.
- At 99% the interval widens to 29.42 to 34.58 minutes; at 90% it narrows to 30.36 to 33.64.
Sample size and precision
Because the standard error shrinks with the square root of n, halving the margin of error takes four times as many observations:
| Sample size | Margin of error (95%) | Interval |
|---|---|---|
| 16 | ±3.92 | 28.08 to 35.92 |
| 64 | ±1.96 | 30.04 to 33.96 |
| 100 | ±1.57 | 30.43 to 33.57 |
| 400 | ±0.78 | 31.22 to 32.78 |
| 1,000 | ±0.50 | 31.50 to 32.50 |
Small samples: use the t distribution
The calculator uses the normal (z) distribution, which is accurate for samples of about 30 or more. For smaller samples, replace z* with the t value for n − 1 degrees of freedom, which gives a wider interval:
| Sample size | t* at 95% |
|---|---|
| 5 | 2.776 |
| 10 | 2.262 |
| 15 | 2.145 |
| 20 | 2.093 |
| 30 | 2.045 |
| Large | 1.960 |
For a proportion, such as a poll result, use the margin of error calculator instead.
Common misreadings
- A 95% interval does not contain 95% of the individual values. That would be the much wider range mean ± 1.96 × s.
- It does not say there is a 95% probability that the true mean is in this particular interval; the true mean is fixed and either is or is not inside.
- Two overlapping intervals do not prove that two means are equal. Use a proper test of the difference.