Sample size for tolerance intervals (normal and nonparametric)

Updated

Sample size for tolerance intervals tells you how many units to test so that an interval built from them contains at least a stated proportion of all individual values (the coverage, such as 99%) with a stated confidence (such as 95%). For normal data, the interval is x̄ ± k·s and the sample size controls the factor k. Without a distribution assumption, the interval runs from the smallest to the largest value, and an exact binomial argument gives the sample size, which is where the familiar numbers 59 and 93 come from.

When to use it

  • A customer, standard or validation protocol asks you to show that, say, 99% of parts fall inside the specification with 95% confidence.
  • You are setting a specification or an acceptance limit from data and need it to cover nearly all future values.
  • You want a distribution-free demonstration and need the minimum number of samples.

How it works

Normal data. A two-sided tolerance interval is x̄ ± k s. The factor k depends on n, the coverage p and the confidence γ. It is always larger than the normal quantile z₍₁₊p₎/₂, because both x̄ and s are uncertain, and it shrinks toward that quantile as n grows. The exact k is found by numerical integration (Odeh and Owen's method); Howe's approximation, k ≈ z₍₁₊p₎/₂ √((n − 1)(1 + 1/n)/χ²₁₋γ,n−1), is within about 0.5% for n ≥ 10. A one-sided bound x̄ + k s uses k = t′γ(n − 1, z_p√n)/√n, a quantile of the noncentral t.

nTwo-sided 95%/95%Two-sided 99%/95%One-sided 95%/95%
103.3934.4372.911
152.9653.8852.566
202.7603.6212.396
302.5553.3552.220
502.3823.1292.065
1002.2342.9361.927
limit1.9602.5761.645

The two-sided values were computed by numerical integration and checked by simulation: for n = 20 and k = 2.760, 2,000,000 simulated samples (NumPy, seed 7) gave 95.00% confidence.

Nonparametric. Take the smallest and largest of n values. The probability that they enclose at least a fraction p of the population does not depend on the distribution:

Two-sided [min, max]: confidence = 1 − n pⁿ⁻¹ + (n − 1) pⁿ One-sided (max only): confidence = 1 − pⁿ → n ≥ ln(1 − γ) / ln(p)

The two-sided formula is the probability that at least two of the n values fall outside the central fraction p, a binomial count with success probability 1 − p.

Coverage / confidenceTwo-sided nOne-sided n
90% / 90%3822
95% / 95%9359
95% / 99%13090
99% / 95%473299

Example

A turned shaft has a diameter specification of 12.00 ± 0.09 mm. The process is centered, with σ ≈ 0.024 mm and a normal distribution in past studies. The customer wants a two-sided 99%/95% tolerance interval inside the specification.

Normal method. The interval x̄ ± k s fits if k s ≤ 0.09 mm, so k must be at most 0.09/0.024 = 3.75. From the exact factors, n = 17 gives k = 3.761 (too large) and n = 18 gives k = 3.709. That is the smallest n that can work.

But s and x̄ will vary, so the interval you get may not fit even when the process is exactly as planned. A simulation of 200,000 studies of a centered process with σ = 0.024 mm (NumPy, seed 42) shows how often the 99%/95% interval falls inside 11.91 to 12.09 mm:

nkChance the interval fits
183.70946%
203.62151%
303.35574%
503.12994%

With 18 shafts the study is close to a coin toss. If you want a 90% or better chance of passing, plan about 50.

Nonparametric method. Without assuming normality, 99%/95% coverage needs 473 shafts, all inside the specification.

Tolerance factor k versus sample size234k factorTwo-sided 99%/95%Two-sided 95%/95%One-sided 95%/95%1015203050100Sample size n
Tolerance factor k versus sample size

How to read the results

  • k falls fast up to about 30 and slowly after. Most of the gain from more samples comes early.
  • "Smallest n that can work" is not "n that will work". Size for the chance of success you need, by simulation, as in the table above.
  • Normality is worth a lot. The normal method needs tens of units where the nonparametric one needs hundreds. Check the distribution with a normality test and a probability plot, and do not assume it without evidence.
  • The nonparametric plan is a pass/fail plan. Test 59 units for a one-sided 95%/95% bound; if all are within the limit, the claim holds. One failure and the plan needs more units.

Common mistakes

  • Confusing tolerance and confidence intervals. A confidence interval for the mean shrinks to a point as n grows; a tolerance interval approaches the population range x̄ ± z σ.
  • Using two-sided factors for a one-sided limit, or the reverse. They differ a lot: 2.760 against 2.396 at n = 20.
  • Testing consecutive parts only. Coverage claims are about the whole population, so sample across lots, shifts and tools.
  • Applying the 59 or 93 rule with a failure in the sample. The formulas assume the interval runs from the minimum to the maximum; with order statistics further in, the required n grows.

Frequently asked questions

Why are 59 and 93 such common sample sizes?

They are the smallest n for 95% coverage with 95% confidence: 59 for a one-sided bound (1 − 0.95⁵⁹ = 0.952) and 93 for the two-sided range of the sample. They need no distribution assumption.

Is 59 the same as a zero-failure reliability demonstration?

Yes, mathematically. Testing 59 units with no failures demonstrates at least 95% reliability with 95% confidence, which is the same one-sided binomial statement.

Can I use the normal method with a transformation?

Yes. If the data are normal after a log or Box-Cox transformation, compute the interval on the transformed scale and transform its ends back.

What if the process is not centered?

Then the interval must fit on the side closer to the limit, which needs a smaller k and more units. A simulation with the expected offset is the simplest way to size it.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab