What a confidence interval is
A confidence interval is a range of plausible values for the true population mean, built from your sample. A 95% confidence level means that if you repeated the sampling many times, about 95% of the intervals built this way would contain the true mean.
CI = x̄ ± z* × σ ÷ √n (σ known)
Worked example
A sample of 30 has mean 72.5 and standard deviation 8.4. For 95% confidence with 29 degrees of freedom, t* = 2.045. The margin of error is 2.045 × 8.4 ÷ √30 = 3.137, so the interval is 69.36 to 75.64.
Critical values
| Level | z* | t* (df = 9) | t* (df = 29) |
|---|---|---|---|
| 90% | 1.645 | 1.833 | 1.699 |
| 95% | 1.96 | 2.262 | 2.045 |
| 99% | 2.576 | 3.25 | 2.756 |
t values are larger than z values for small samples, which widens the interval to account for the extra uncertainty in estimating the standard deviation. As n grows, t approaches z.
t or z?
Use t whenever the standard deviation comes from your sample, which is nearly always. Use z only when the population standard deviation is genuinely known in advance. The interval also assumes a random sample and either roughly normal data or a reasonably large n.
What makes an interval wider
- A higher confidence level (99% is wider than 95%)
- More variable data (bigger s)
- A smaller sample
Formulas follow the NIST/SEMATECH e-Handbook of Statistical Methods: confidence limits for the mean.
Frequently asked questions
Does a 95% interval mean there is a 95% chance the mean is inside it?
Strictly, no. The true mean is fixed; the 95% describes the method. Across many repeated samples, 95% of intervals built this way would contain it.
What is the margin of error?
Half the width of the interval: critical value × standard error. The interval is the sample mean plus and minus the margin of error.
How do I make the interval narrower?
Collect a larger sample or accept a lower confidence level. Quadrupling the sample size roughly halves the margin of error.