How to use the variance confidence interval calculator
- Choose to start from the sample size and standard deviation, or from raw data.
- Enter the sample size and the sample standard deviation (with n - 1 in the denominator), or paste at least two values.
- Choose the confidence level and whether the interval is two-sided, an upper bound only or a lower bound only.
- Read the interval for the variance and the interval for the standard deviation.
Formula
(n - 1) s^2 / sigma^2 follows a chi-square distribution with n - 1 degrees of freedom
Two-sided interval for the variance: (n - 1) s^2 / chi2(1 - alpha/2) to (n - 1) s^2 / chi2(alpha/2)
One-sided upper bound: (n - 1) s^2 / chi2(alpha). Lower bound: (n - 1) s^2 / chi2(1 - alpha)
The interval for the standard deviation is the square root of each end
Here chi2(q) is the point with a share q of the chi-square distribution below it. The interval is not symmetric around s squared, because the chi-square distribution is skewed.
A sample of 10 with a standard deviation of 2
The sample variance is 4 with 9 degrees of freedom, so (n - 1) s^2 = 36. The 95 percent chi-square points are 2.7004 and 19.023, which give a variance interval of 36 / 19.023 = 1.8925 to 36 / 2.7004 = 13.331. The standard deviation interval is 1.3757 to 3.6512.
For a sample of 25 with a standard deviation of 3.2, the 95 percent one-sided upper bound for the variance is 17.746. Eight readings of 12.1, 11.8, 12.6, 12.0, 11.5, 12.3, 12.2 and 11.9 have a standard deviation of 0.33381, and their 90 percent interval for the variance is 0.055448 to 0.35989.
Wide intervals are normal
Spread is estimated much less precisely than a mean. With 10 values, the 95 percent interval for the standard deviation runs from about 0.69 to 1.83 times the sample value. You need around 50 values for the upper end to come within 25 percent of the estimate. Plan sample sizes with that in mind.
For an interval for a mean or a proportion, see the confidence interval calculator. To find the standard deviation of raw data, use the standard deviation calculator.
Normality matters here
This interval is based on a chi-square distribution that holds only when the data come from a normal distribution, and it is much less forgiving of departures from normality than an interval for the mean. If the data are skewed or have heavy tails, the interval can be far off. Check the shape first, or use a method such as the bootstrap.
To plan how many observations you need for the precision you want, use the sample size calculator.
Assumptions and limits
- The data are a random sample from a normal distribution.
- The standard deviation is the sample version with n - 1 in the denominator.
- The sample size is at least 2, and the standard deviation is above 0.
- The confidence level is chosen before looking at the data.
Frequently asked questions
How do I find a confidence interval for a variance?
Divide (n - 1) times the sample variance by the upper and lower chi-square points. The page does this for you.
Why is the interval not symmetric?
The chi-square distribution is skewed, so the upper limit is farther from the sample variance than the lower limit.
How do I get an interval for the standard deviation?
Take the square root of each end of the variance interval. For a variance of 4 with n = 10 it is 1.3757 to 3.6512.
What if my data are not normal?
The interval can be wrong, sometimes by a lot. Use a bootstrap interval or collect more data and check the shape.