How to calculate a confidence interval
- Enter the sample mean, the sample standard deviation and the sample size.
- Choose the confidence level, usually 95%, and whether to use t (usual) or z.
- Read the interval, the margin of error and the critical value used.
Critical values
| Confidence | z | t (n = 10) | t (n = 30) |
|---|---|---|---|
| 90% | 1.645 | 1.833 | 1.699 |
| 95% | 1.960 | 2.262 | 2.045 |
| 99% | 2.576 | 3.250 | 2.756 |
The t values use n − 1 degrees of freedom and approach the z values as the sample grows.
Worked example
A sample of 25 parts has a mean length of 50 mm and a standard deviation of 10 mm. The standard error is 10 ÷ √25 = 2. With 24 degrees of freedom the 95% t value is 2.064, so the margin of error is about 4.13 and the interval runs from about 45.87 to 54.13 mm.
Assumptions
The interval assumes a random sample and a roughly normal population, or a sample large enough (often taken as 30 or more) for the mean to be close to normal anyway. Heavily skewed data with a small sample can make the interval misleading.