- Question it answers
- How well does my sample pin down the true value?
- Key output
- An estimate with a margin of error at a stated confidence level
- Width depends on
- Sample size (square root), variation, and confidence level
- Do not confuse
- Confidence (parameter), prediction (next item), tolerance (population share)
- Assumptions
- Random sample; roughly normal data for means with small n
- Excel
- CONFIDENCE.T, T.INV.2T, CHISQ.INV.RT, BETA.INV
- Minitab
- Graphical Summary; 1-Sample t; 1 Proportion; Tolerance Intervals
- Next step
- Sample size and power
The Idea in Plain Language
A sample gives you one number, such as an average of 500.1 g, but the true process average is unknown. A confidence interval turns that single number into a range of plausible values, so you can see how well the sample pins down the truth. It has two parts: a best estimate (the center) and a margin of error (the half-width).
The 95% describes the method, not one interval. If you drew many samples and built an interval from each, about 95% of those intervals would contain the true value. Any single interval either contains it or it does not.
Which Interval Do You Need? Confidence, Prediction, and Tolerance
Three intervals sound alike and answer different questions. Quality work mixes them up often.
| Interval | Answers | For the example (n = 20, mean 500.14, s = 1.51) |
|---|---|---|
| Confidence interval for the mean | Where is the true process average? | (499.43, 500.85) g |
| Prediction interval | Where will the next single fill fall? | (496.90, 503.38) g |
| Tolerance interval (99% of fills, with 95% confidence) | What range holds almost all of the output? | (494.67, 505.61) g (approximate) |
| Confidence interval for the standard deviation | How variable is the process? | (1.15, 2.21) g |
The confidence interval for the mean is narrow because an average of 20 fills is stable. The prediction interval is much wider, because it covers one new fill, with all its own scatter. The tolerance interval is wider still, because it must cover nearly the whole population. Using the confidence interval to say “all fills fall within 499.4 to 500.8 g” would be badly wrong.
How It Works
| Interval for | Formula | Notes |
|---|---|---|
| A mean | x̄ ± tα/2, n−1 × s / √n | t replaces z because s is estimated; needs roughly normal data or a large sample |
| A proportion (Wald) | p̂ ± z √(p̂(1 − p̂)/n) | Simple, but poor for small counts or rates near 0 or 1 |
| A proportion (Wilson) | (p̂ + z²/2n ± z√(p̂(1 − p̂)/n + z²/4n²)) / (1 + z²/n) | Better coverage; a good default |
| A proportion (exact) | Clopper-Pearson, from the binomial distribution | Guaranteed coverage; conservative; used when counts are small |
| A standard deviation | s √((n − 1)/χ²upper) to s √((n − 1)/χ²lower) | Assumes normal data; sensitive to non-normality |
| A difference of two means | (x̄1 − x̄2) ± t × SE | See the t-test page |
| A regression slope | b ± t × SE(b) | See Simple Linear Regression |
| To get a narrower interval | You can | At the cost of |
|---|---|---|
| Halve the width | Quadruple the sample | Time and money |
| Narrower for the same data | Use a lower confidence level (90% instead of 95%) | More chance the interval misses the truth |
| Narrower without more data | Reduce measurement error and process variation | Process work |
Worked Example
Twenty fills were weighed: 502.7, 497.2, 500.8, 499.6, 499.8, 500.0, 497.9, 500.0, 499.3, 504.3, 500.6, 499.9, 500.0, 499.5, 499.0, 499.8, 500.9, 500.0, 501.4, 500.1.
1. Interval for the mean
- Summary. n = 20, x̄ = 500.140 g, s = 1.511 g.
- Standard error = 1.511 / √20 = 0.338.
- Critical value t0.025, 19 = 2.093, so the margin of error is 2.093 × 0.338 = 0.707 g.
- Interval: 500.140 ± 0.707 = (499.433, 500.847) g. A 99% interval is wider: (499.173, 501.107).
2. Interval for the standard deviation
With χ²0.025,19 = 8.907 and χ²0.975,19 = 32.852: lower = 1.511 √(19/32.852) = 1.149, upper = 1.511 √(19/8.907) = 2.208. The 95% interval for the standard deviation is (1.149, 2.208) g. Note how wide it is relative to the estimate: a standard deviation needs much more data to pin down than a mean.
3. Interval for a proportion
In a different check, 7 of 120 parts were defective: p̂ = 0.0583 (5.83%). Three methods give different intervals:
| Method | 95% interval for the defect rate | Note |
|---|---|---|
| Wald | 1.64% to 10.03% | Narrower than the exact interval and shifted low |
| Wilson | 2.85% to 11.55% | Good coverage; a sensible default |
| Exact (Clopper-Pearson) | 2.38% to 11.65% | Conservative; guaranteed coverage |
Run It in Excel and Minitab
ExcelStep by step
- Put the 20 weights in A2:A21. Compute , , and .
- Mean: margin of error (0.7074); the interval is the mean ± that. Or .
- Standard deviation: lower , upper .
- Proportion (Wilson): compute z with , then use the formula in the table above. The exact interval needs and .
- Prediction interval: .
- Tolerance interval: , with k from Howe’s formula using and .
Excel has no built-in tool for proportion, standard deviation, prediction, or tolerance intervals. Use the formulas, or Minitab.
MinitabStep by step
- Mean and standard deviation: . Choose the variable and the confidence level. The summary shows intervals for the mean, median, and standard deviation, with a histogram.
- Mean only: gives the interval for the mean.
- Proportion: . Click Options to choose the exact method or the normal approximation.
- Standard deviation: .
- Tolerance interval: , then choose the proportion of the population and the confidence level.
- Prediction interval: use a regression with no predictors, or the Predict option in regression.
Minitab’s defaults for proportions and variances can use methods that differ from the textbook ones. Check the Options and report which method you used.
Descriptive Statistics: Fill Weight
Mean 500.140
StDev 1.511
Variance 2.285
N 20
95% Confidence Interval for Mean (499.433, 500.847)
95% Confidence Interval for Median (499.6, 500.6)
95% Confidence Interval for StDev (1.149, 2.208)Reading and Reporting
- Report the estimate with its interval and the confidence level: “500.1 g (95% CI 499.4 to 500.8).”
- Say what is inside the interval. If a target or a limit falls inside, you cannot tell it apart from the estimate.
- Say which method: t interval, Wilson, exact.
- Match the interval to the question: confidence for a parameter, prediction for the next item, tolerance for the population.
| Common misreading | Why it is wrong |
|---|---|
| “There is a 95% probability that the true mean is in this interval.” | The true mean is fixed. The 95% refers to how often the method captures it |
| “95% of the data lie in the interval.” | That is a tolerance or prediction interval, not a confidence interval |
| “Two overlapping intervals mean no difference.” | Overlap does not equal non-significance; compare the interval for the difference |
| “A wide interval means the estimate is wrong.” | It means the estimate is uncertain; get more data or reduce variation |
Common Mistakes
| Mistake | Why it misleads | Better |
|---|---|---|
| Using the confidence interval to judge individual items | It is for the mean only | Use a prediction or tolerance interval |
| Using the Wald interval for small counts | Poor coverage near 0 and 1 | Use Wilson or exact |
| Using z instead of t for small samples | Too narrow | Use t with n − 1 df |
| Checking only whether intervals overlap | Misses real differences | Calculate the interval for the difference |
| Reporting a 95% interval without the sample size | Reader cannot judge reliability | Report n |
| Assuming normality for a standard deviation interval | It is sensitive to skew | Check the plot; consider a bootstrap |
| Calling a 90% interval “95%” | Overstates certainty | State the level |
Try It Yourself
In an audit, 3 of 40 invoices had errors. In a sample of 25 delivery times, the mean was 3.2 days and the standard deviation was 0.8 days.
- Give a 95% Wilson interval for the error rate.
- Give a 95% interval for the mean delivery time.
- What would you use to say when 95% of deliveries will arrive?
Show the answer
Error rate: p̂ = 0.075. Wilson interval = 2.6% to 19.9%. (The Wald interval would give -0.7% to 15.7%, even dropping below zero.)
Delivery time: 3.2 ± 0.33 gives 2.87 to 3.53 days.
To say when 95% of deliveries will arrive, you need a tolerance interval, or a prediction interval for one delivery, not the confidence interval for the mean.
Confidence Intervals: Frequently Asked Questions
What does 95% confidence mean?
If you repeated the sampling and built an interval each time, about 95% of the intervals would contain the true value. It describes the reliability of the method. For one interval, the true value is either inside it or not.
What is the difference between a confidence interval and a prediction interval?
A confidence interval is for a parameter, such as the mean. A prediction interval is for one future observation, so it also includes the scatter of individual values and is wider.
When should I use a tolerance interval?
When you need a range that will contain a stated share of all items, such as 99% of parts, with a stated confidence. It is the right tool for comparing a process with specification limits when the data are normal.
How do I get a narrower interval?
Collect more data (width falls with the square root of n), reduce the variation in the process or the measurement, or accept lower confidence. A larger sample is the usual answer, but quadrupling the data only halves the width.
Why not always use the Wald interval for proportions?
It works only for large samples and rates not close to 0 or 100%. For small counts it can be far too narrow and even extend below zero. Wilson or exact intervals are safer.
Can two intervals overlap and still be different?
Yes. Two 95% intervals can overlap slightly while the difference between the means is still significant. The right check is the interval for the difference, or the test.
Sources and Further Reading
- NIST/SEMATECH, e-Handbook of Statistical Methods, sections on confidence intervals and tolerance intervals (itl.nist.gov/div898/handbook).
- Lawrence D. Brown, T. Tony Cai, and Anirban DasGupta, “Interval estimation for a binomial proportion,” Statistical Science, 2001.
- Gerald J. Hahn and William Q. Meeker, Statistical Intervals: A Guide for Practitioners, Wiley.
- Douglas C. Montgomery and George C. Runger, Applied Statistics and Probability for Engineers, Wiley.
- Minitab Support, “Methods and formulas for Tolerance Intervals and 1 Proportion” (support.minitab.com).
This content is educational. Worked examples use made-up data. Menu names for Minitab follow recent versions of Minitab Statistical Software and can differ slightly in older releases; Excel steps use Microsoft 365 and the Analysis ToolPak.