Confidence interval for a variance
The standard deviation of a sample estimates the variability of a whole population, such as the spread of a machine’s output, the precision of an instrument or the volatility of a process. Because a sample SD itself varies from sample to sample, a confidence interval shows how precisely it pins down the true value σ.
The formulas
If the data are normally distributed, (n − 1)s² ÷ σ² follows a chi-square distribution with n − 1 degrees of freedom. This gives:
(n − 1)s² ÷ χ²₁₋α/₂ ≤ σ² ≤ (n − 1)s² ÷ χ²α/₂
Take square roots for the interval of the standard deviation. The interval is not symmetric around s: it extends further on the high side, because the chi-square distribution is skewed.
Example
A sample of 15 parts has a standard deviation of 4.2:
- s² = 17.64, and (n − 1)s² = 246.96;
- the chi-square quantiles with 14 degrees of freedom are 5.63 and 26.12;
- 95% interval of σ²: 9.46 to 43.87;
- 95% interval of σ: about 3.07 to 6.62.
So with 15 values, the true SD could be anywhere from about 27% below to 58% above the sample value. Estimating variability precisely takes many more observations than estimating a mean.
Testing against a reference value
To check whether σ equals a target σ₀, such as a specification, compute χ² = (n − 1)s² ÷ σ₀² and compare it with the chi-square distribution. With σ₀ = 5, χ² = 9.88 and the two-sided p-value is about 0.46: the data are compatible with a true SD of 5.
One-sided versions are common in quality control: to show that a process is precise enough, test whether σ is below the maximum allowed value.
The normality assumption
Unlike intervals for a mean, which are fairly robust, this interval is very sensitive to non-normality. Heavy tails make the true coverage much lower than stated. Check the data with a histogram or a normal probability plot; for non-normal data, a bootstrap interval is safer.
Sample size and precision
| n | Upper bound ÷ s (95%) |
|---|---|
| 5 | 2.87 |
| 10 | 1.83 |
| 30 | 1.34 |
| 100 | 1.16 |
With 10 values, the true SD could be nearly twice the observed one. Keep this in mind when a sample SD feeds a sample size calculation or a capability index such as Cp.