Statistics
Confidence interval for a standard deviation
A sample standard deviation is an estimate, and it has its own uncertainty. Enter the sample SD and the sample size to get a confidence interval for the population standard deviation and variance, calculated with the chi-square method.
Show the working, step by step
For normal data, (n − 1)s² ÷ σ² follows a chi-square distribution with n − 1 = 19 degrees of freedom.
(n − 1)s² = 19 × 0.42² = 3.3516
Find the chi-square values that cut off 0.025 in each tail.
χ²(0.025 upper) = 32.852 χ²(0.975 upper) = 8.9065
Divide and take square roots. The larger chi-square value gives the lower limit.
σ lower = √(3.3516 ÷ 32.852) = 0.319406 σ upper = √(3.3516 ÷ 8.9065) = 0.61344
The interval is not symmetric around s = 0.42: it reaches further up than down, because the chi-square distribution is skewed. It is also sensitive to non-normal data, much more so than the t interval for a mean.
Why a standard deviation needs an interval
Most reports put a confidence interval around the mean and leave the standard deviation bare. But s changes from sample to sample as well, and in small samples it changes a lot. If a specification, a capability index such as Cpk, or a sample size calculation depends on the SD, the uncertainty in s feeds straight into the answer.
This calculator puts an interval around σ itself. For an interval around the mean, use the confidence interval calculator. To work out the SD behind a published interval for a mean, use the standard error calculator.
The formula
For normally distributed data, (n − 1)s² / σ² follows a chi-square distribution with n − 1 degrees of freedom. Inverting that gives the interval:
√( (n − 1)s² / χ²(α/2, upper) ) ≤ σ ≤ √( (n − 1)s² / χ²(1 − α/2, upper) )
The larger chi-square value goes with the lower limit. Leave out the square roots and you have the interval for the variance σ².
A worked example
Twenty fill weights from a filling line have a sample standard deviation of 0.42 g. These are the values loaded in the calculator above. At 95% confidence:
- Degrees of freedom: n − 1 = 19, so (n − 1)s² = 19 × 0.42² = 3.3516.
- The chi-square values with 0.025 in each tail are 32.852 and 8.9065.
- Lower limit: √(3.3516 ÷ 32.852) = 0.3194 g.
- Upper limit: √(3.3516 ÷ 8.9065) = 0.6134 g.
The process SD could plausibly be anywhere from 0.32 g to 0.61 g, nearly a factor of two. At 99% confidence the interval widens to 0.2947 to 0.6998 g. If you are about to set tolerances or a Cpk target from s = 0.42, plan for the upper end.
How precision improves with n
The 95% interval as a multiple of the sample SD:
| n | Lower limit | Upper limit |
|---|---|---|
| 5 | 0.599 s | 2.874 s |
| 10 | 0.688 s | 1.826 s |
| 20 | 0.760 s | 1.461 s |
| 50 | 0.835 s | 1.246 s |
| 100 | 0.878 s | 1.162 s |
| 500 | 0.942 s | 1.066 s |
With five observations the true SD could be almost three times the one you measured. That is a good reason not to set limits from a handful of pilot runs.
When not to use it
- Clearly non-normal data. Skewed or heavy-tailed data break the chi-square assumption, and the interval will be too narrow. A bootstrap interval is safer.
- Data that aren't independent. Autocorrelated process data, such as consecutive readings from a drifting instrument, understate the long-run spread.
- Grouped or rounded data. Heavy rounding makes s itself unreliable before any interval is put around it.
Related calculators
-
Confidence interval for a mean
The t interval for x̄, from its mean, SD and n.
-
Standard error
Recover an SD from a published standard error or confidence interval.
-
Sample standard deviation
Get s from your raw values first.
-
Critical value
Chi-square critical values at any α and df.
Common questions
How do you find a confidence interval for a standard deviation?
Use the chi-square distribution with n − 1 degrees of freedom. The limits are
√((n − 1)s² / χ²upper) and √((n − 1)s² / χ²lower), where the two
chi-square values cut off α/2 in each tail. With s = 0.42 and n = 20 at 95%, that gives
0.3194 to 0.6134.
Why is the interval not symmetric around s?
The chi-square distribution is skewed to the right, so the interval reaches further above the sample SD than below it. In the example above, s = 0.42 sits 0.10 above the lower limit and 0.19 below the upper one. The asymmetry is largest in small samples.
Does this interval need normal data?
Yes, and it depends on that more than the t interval for a mean does. The central limit theorem does not rescue a variance the way it rescues a mean. With heavy-tailed data the true coverage can fall well below the stated 95%. Check a histogram first, or use a bootstrap interval if the data are clearly not normal.
Is this the same as recovering an SD from a confidence interval?
No. That is the reverse job: a paper reports a confidence interval for a mean and you want the standard deviation behind it. The standard error calculator does that. This page puts a confidence interval around the standard deviation itself.
How large a sample do I need for a precise SD?
Larger than most people expect. At 95% confidence the interval runs from 0.76s to 1.46s at n = 20, and from 0.88s to 1.16s at n = 100. Getting within about ±10% takes a few hundred observations.