Skip to content
Omnikalc

Confidence interval for a variance or standard deviation, with a chi-square test

From a sample standard deviation and size, get the chi-square confidence interval of the population variance and SD, and test them against a reference value.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Confidence interval of σ, lower bound

3.075

Confidence interval of σ, upper bound

6.624

Confidence interval of σ², lower bound
9.455
Confidence interval of σ², upper bound
43.87
Sample variance s²
17.64
Test statistic χ² = (n − 1)s² ÷ σ₀²
9.878
Two-sided p-value for σ = σ₀
0.458
The data are compatible with σ = σ₀

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.

Frequently asked questions

How do I compute a confidence interval for a standard deviation?

Compute the interval of the variance with chi-square quantiles, then take the square root of both bounds.

Why is the interval not symmetric?

Because the chi-square distribution is skewed; the interval extends further above the sample SD than below.

Is the variance confidence interval robust?

No. It is very sensitive to non-normal data; use a bootstrap interval for skewed or heavy-tailed data.

How do I test whether σ equals a target value?

Compute χ² = (n − 1)s² ÷ σ₀² and compare it with chi-square with n − 1 degrees of freedom.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.