Cover without text: a caliper and machined shafts lined up on an inspection bench with a subtle green accent.

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
Visual map 202: Confidence Interval Calculation: Formula and Worked Example. Click the map to see it full size.Download the map as PNG

Confidence interval formula for the mean

CI = x̄ ± t × (s ÷ √n)

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.

  1. Standard error = 0.12 ÷ √16 = 0.12 ÷ 4 = 0.030 mm.
  2. Degrees of freedom = 16 − 1 = 15; for 95%, t = 2.131.
  3. Margin of error = 2.131 × 0.030 = 0.064 mm.
  4. 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.

Advertisement

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:

Confidencet (15 df)Margin (mm)Interval (mm)
90%1.7530.05325.347 to 25.453
95%2.1310.06425.336 to 25.464
99%2.9470.08825.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

Advertisement

When to use it on the shop floor

Common mistakes

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).

Advertisement

Sources

  1. MONTGOMERY, D. C.; RUNGER, G. C. Applied Statistics and Probability for Engineers. Wiley.
  2. MONTGOMERY, D. C. Introduction to Statistical Quality Control. Wiley.
  3. 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
Photo of Vagner Soares

About the author

Vagner Soares

Lean Manufacturing & Behavioral Management Specialist

Over 20 years in the automotive and metalworking industries (GM and Dana), Lean Manufacturing practitioner since 2006. SENAI instructor and mentor in Brazil’s Brasil Mais Produtivo program, delivering consulting, training and audits for 50+ companies, combining quality, productivity and people development.