
- What a confidence interval is
- Confidence interval visual map
- Confidence interval formula for the mean
- Worked example: shaft diameter
- How confidence level and n change the width
- Confidence interval for a proportion
- How to interpret it correctly
- When to use it on the shop floor
- Common mistakes
- Frequently asked questions
What a confidence interval is
A confidence interval is a range of values that, at a chosen confidence level (usually 95%), contains the true process mean or proportion. It exists because you measure a sample, not the whole production, and the sample mean changes every time you sample.
Instead of reporting "the mean is 25.40 mm", you report "the mean lies between 25.34 and 25.46 mm with 95% confidence". The width of the range shows how much the sample can support. To decide how many parts to measure, see sample size.
Confidence interval visual map
The map summarizes the formula, the worked example with 16 parts, and the effect of confidence level and sample size.

Confidence interval formula for the mean
CI = x̄ ± t × (s ÷ √n)
- x̄: sample mean.
- s: sample standard deviation.
- n: number of parts measured.
- s ÷ √n: standard error of the mean.
- t: Student's t value for the confidence level and n − 1 degrees of freedom.
- t × standard error: margin of error.
Use t when the standard deviation comes from the sample itself, which is the usual case on the shop floor. Use z (1.645 for 90%, 1.960 for 95%, 2.576 for 99%) when the process sigma is known from long history or n is large. The assumption is roughly normal data, which you check with a histogram and the normal distribution.
Worked example: shaft diameter
Fictional example. An operator measures the diameter of 16 shafts taken from the line. The mean is 25.40 mm and the sample standard deviation is 0.12 mm.
- Standard error = 0.12 ÷ √16 = 0.12 ÷ 4 = 0.030 mm.
- Degrees of freedom = 16 − 1 = 15; for 95%, t = 2.131.
- Margin of error = 2.131 × 0.030 = 0.064 mm.
- 95% CI = 25.40 ± 0.064 = 25.336 to 25.464 mm.
Reading: with 95% confidence, the process mean is between 25.336 and 25.464 mm. If the mean must be within 25.30 to 25.50 mm, the whole interval is inside. That does not say every part is within tolerance; for that use Cp and Cpk.
How confidence level and n change the width
With the same data (x̄ = 25.40; s = 0.12; n = 16), changing the confidence level changes t:
| Confidence | t (15 df) | Margin (mm) | Interval (mm) |
|---|---|---|---|
| 90% | 1.753 | 0.053 | 25.347 to 25.453 |
| 95% | 2.131 | 0.064 | 25.336 to 25.464 |
| 99% | 2.947 | 0.088 | 25.312 to 25.488 |
More confidence means a wider range. To narrow it without losing confidence you must measure more parts. If the same s = 0.12 came from n = 64, the standard error would drop to 0.12 ÷ 8 = 0.015 mm and the 95% margin (t = 1.998) to about 0.030 mm, half the previous one. Quadrupling n halves the margin, because it shrinks with the square root of n.
Confidence interval for a proportion
CI = p ± z × √[p × (1 − p) ÷ n]
Fictional example: out of 200 inspected parts, 8 were defective, so p = 8 ÷ 200 = 0.04. The standard error is √(0.04 × 0.96 ÷ 200) = 0.0139. The 95% margin is 1.96 × 0.0139 = 0.0272. The 95% CI runs from 1.3% to 6.7% defective. The range is wide: with 200 parts the data cannot separate a 2% process from a 6% one. This approximation works when n × p and n × (1 − p) exceed 5 to 10; with very few defects, use exact methods. To track fraction defective over time, see the p chart.
How to interpret it correctly
- What 95% means: if you repeated the sampling many times and built an interval each time, about 95% of the intervals would contain the true mean. It is not "a 95% chance that the mean is in this particular interval".
- Mean is not part: the CI of the mean is narrow; individual values vary far more. Do not compare the CI with the part tolerance.
- Comparing groups: if two intervals do not overlap, the difference is real; if they overlap, the formal answer is a hypothesis test.
- Precision target: set the acceptable margin first and compute n from it.
When to use it on the shop floor
- Machine setup: check whether the lot mean is centered on nominal.
- Before and after: compare the mean after an improvement with the previous one.
- Lot audit: estimate fraction defective by sampling, related to the AQL sampling plan.
- Control limits: do not confuse it with the limits of an X-bar and R chart, which describe expected variation of sample means, not uncertainty about the true mean.
Common mistakes
- Using z with small n and an estimated s: the interval comes out too narrow. Use t.
- Computing the CI from an uncontrolled gauge: measurement uncertainty ends up in the result. See MSA and Gauge R&R and calibration and measurement uncertainty.
- Mixing shifts, lots or machines in one sample while the process is unstable.
- Reading the CI of the mean as the spread of individual parts.
- Rounding t: use the table value for the right degrees of freedom.
- Concluding with n = 4 without noticing that t is large (3.182 for 3 degrees of freedom) and the range becomes huge.
Frequently asked questions
What is a confidence interval?
It is a range calculated from a sample that, at a stated confidence level, contains the true value of a parameter such as the process mean.
What is the confidence interval formula for the mean?
CI = x̄ ± t × s ÷ √n, with t for n − 1 degrees of freedom.
When should I use t instead of z?
When the standard deviation comes from the sample, especially with n below 30. With large n, t and z are very close.
What does 95% confidence mean?
That the method produces intervals containing the true value in 95% of repeated samples.
How do I make the interval narrower?
Increase the sample size, reduce process variation, or accept a lower confidence level. Quadrupling n halves the margin.
Is the confidence interval the part tolerance?
No. It describes the mean, not individual parts. For tolerance use capability (Cp and Cpk).
Sources
- MONTGOMERY, D. C.; RUNGER, G. C. Applied Statistics and Probability for Engineers. Wiley.
- MONTGOMERY, D. C. Introduction to Statistical Quality Control. Wiley.
- WHEELER, D. J. Understanding Variation: The Key to Managing Chaos. SPC Press.
Keep studying: trusted sources and links
Save this address: Manufatura Enxuta is your school for lean manufacturing. Come back whenever you need to study, with a complete article, a visual map and trusted sources. Follow one of the learning paths or check the A–Z glossary.
Want to measure what really matters?
Download the free e-book on performance indicators and track the losses in your operation.
Download the e-book
