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.

True mean Interval for the mean (each from a new sample of 10) 23 of 24 intervals contain the true mean; the 1 in red miss it
Twenty-four intervals from twenty-four samples. Most capture the true mean of 100. One misses it, which is about what a 95% method should do.
Confidence intervals are the most useful number in a report. They show the size of an effect, the uncertainty, and whether the null value is plausible, all at once. A p-value alone shows only the last.

Which Interval Do You Need? Confidence, Prediction, and Tolerance

Three intervals sound alike and answer different questions. Quality work mixes them up often.

IntervalAnswersFor the example (n = 20, mean 500.14, s = 1.51)
Confidence interval for the meanWhere is the true process average?(499.43, 500.85) g
Prediction intervalWhere 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 deviationHow 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.

For specifications, use the tolerance interval. Comparing specification limits with a confidence interval for the mean tells you only about the average. If you need to show that nearly all individual items will meet the limits, use a tolerance interval, or capability indices with their own intervals.

How It Works

Interval forFormulaNotes
A meanx̄ ± tα/2, n−1 × s / √nt 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 distributionGuaranteed coverage; conservative; used when counts are small
A standard deviations √((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 × SESee the t-test page
A regression slopeb ± t × SE(b)See Simple Linear Regression
n = 5 ± 12.4 n = 10 ± 7.2 n = 20 ± 4.7 n = 40 ± 3.2 n = 80 ± 2.2 n = 160 ± 1.6 Half-width of the interval (units of the data)
The width of an interval falls with the square root of the sample size. To halve the margin of error, you need four times as much data.
To get a narrower intervalYou canAt the cost of
Halve the widthQuadruple the sampleTime and money
Narrower for the same dataUse a lower confidence level (90% instead of 95%)More chance the interval misses the truth
Narrower without more dataReduce measurement error and process variationProcess 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

  1. Summary. n = 20, x̄ = 500.140 g, s = 1.511 g.
  2. Standard error = 1.511 / √20 = 0.338.
  3. Critical value t0.025, 19 = 2.093, so the margin of error is 2.093 × 0.338 = 0.707 g.
  4. 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:

Method95% interval for the defect rateNote
Wald1.64% to 10.03%Narrower than the exact interval and shifted low
Wilson2.85% to 11.55%Good coverage; a sensible default
Exact (Clopper-Pearson)2.38% to 11.65%Conservative; guaranteed coverage
Conclusion. The mean fill weight is 500.1 g (95% CI 499.4 to 500.8 g), so the true mean is plausibly on the 500 g target. The standard deviation is 1.51 g (95% CI 1.15 to 2.21 g). The defect rate is 5.8%, plausibly between 2.4% and 11.6%.

Run It in Excel and Minitab

ExcelStep by step

  1. Put the 20 weights in A2:A21. Compute =AVERAGE(A2:A21), =STDEV.S(A2:A21), and =COUNT(A2:A21).
  2. Mean: margin of error =CONFIDENCE.T(0.05, s, n) (0.7074); the interval is the mean ± that. Or =T.INV.2T(0.05, n-1)*s/SQRT(n).
  3. Standard deviation: lower =s*SQRT((n-1)/CHISQ.INV.RT(0.025, n-1)), upper =s*SQRT((n-1)/CHISQ.INV.RT(0.975, n-1)).
  4. Proportion (Wilson): compute z with =NORM.S.INV(0.975), then use the formula in the table above. The exact interval needs =BETA.INV(0.025, x, n-x+1) and =BETA.INV(0.975, x+1, n-x).
  5. Prediction interval: =mean ± T.INV.2T(0.05,n-1)*s*SQRT(1+1/n).
  6. Tolerance interval: =mean ± k*s, with k from Howe’s formula using =NORM.S.INV((1+p)/2) and =CHISQ.INV(1-conf, n-1).

Excel has no built-in tool for proportion, standard deviation, prediction, or tolerance intervals. Use the formulas, or Minitab.

MinitabStep by step

  1. Mean and standard deviation: Stat > Basic Statistics > Graphical Summary. Choose the variable and the confidence level. The summary shows intervals for the mean, median, and standard deviation, with a histogram.
  2. Mean only: Stat > Basic Statistics > 1-Sample t gives the interval for the mean.
  3. Proportion: Stat > Basic Statistics > 1 Proportion. Click Options to choose the exact method or the normal approximation.
  4. Standard deviation: Stat > Basic Statistics > 1 Variance.
  5. Tolerance interval: Stat > Quality Tools > Tolerance Intervals, then choose the proportion of the population and the confidence level.
  6. 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.

Minitab Graphical Summary text (typed excerpt, simplified)
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

  1. Report the estimate with its interval and the confidence level: “500.1 g (95% CI 499.4 to 500.8).”
  2. Say what is inside the interval. If a target or a limit falls inside, you cannot tell it apart from the estimate.
  3. Say which method: t interval, Wilson, exact.
  4. Match the interval to the question: confidence for a parameter, prediction for the next item, tolerance for the population.
Common misreadingWhy 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
A sentence you can use. The mean fill weight was 500.14 g (n = 20, SD = 1.51 g; 95% confidence interval 499.43 to 500.85 g).

Common Mistakes

MistakeWhy it misleadsBetter
Using the confidence interval to judge individual itemsIt is for the mean onlyUse a prediction or tolerance interval
Using the Wald interval for small countsPoor coverage near 0 and 1Use Wilson or exact
Using z instead of t for small samplesToo narrowUse t with n − 1 df
Checking only whether intervals overlapMisses real differencesCalculate the interval for the difference
Reporting a 95% interval without the sample sizeReader cannot judge reliabilityReport n
Assuming normality for a standard deviation intervalIt is sensitive to skewCheck the plot; consider a bootstrap
Calling a 90% interval “95%”Overstates certaintyState 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.