This lecture shows how to derive confidence intervals for the variance of a normal distribution.
We analyze two different cases:
when the mean of the distribution is known;
when the mean is unknown.
For these two cases we derive the level of confidence and we show how to adjust it.
Two solved exercises can be found at the end of the lecture.
The theory needed to understand the derivations is presented in the page on interval estimation.
We start with the case in which the mean is known.
The sample is made of independent draws from a normal distribution.
Specifically, we observe the realizations of independent random variables , ..., , all having a normal distribution with:
known mean ;
unknown variance .
We use the following estimator of variance:
The confidence interval iswhere and are strictly positive constants and . The choice of these constants is discussed below.
The coverage probability of the confidence interval iswhere is a Chi-square random variable with degrees of freedom.
The coverage probability can be written aswhere we have definedIn the lecture on variance estimation, we have shown that has a Gamma distribution with parameters and , given the assumptions on the sample made above. Multiplying a Gamma random variable with parameters and by , we obtain a Chi-square random variable with degrees of freedom, which in this case is the distribution of .
The coverage probability does not depend on the unknown parameter .
Therefore, the level of confidence of the interval estimator coincides with the coverage probability:where is a Chi-square random variable with degrees of freedom.
Note thatwhere is the distribution function of a Chi-square random variable with degrees of freedom.
If is the desired level of confidence, then we need to choose and so as to solve the equation
As this is a single equation in two unknowns, there are infinitely many choices of and that solve the equation.
Possible choices are:
set , which implies and ;
numerically search for a couple of values and that not only solve the equation, but also minimize the length of the confidence interval.
We now relax the assumption that the mean of the distribution is known.
The sample is made of the realizations of independent variables , ..., , all having a normal distribution with:
unknown mean ;
unknown variance .
To construct interval estimators of the variance , we use the sample meanand either the unadjusted sample varianceor the adjusted sample varianceWe consider the following confidence interval for the variance:where and are strictly positive constants and .
Below we will see how to choose and .
The coverage probability iswhere is a Chi-square random variable with degrees of freedom.
The coverage probability can be written aswhere we have definedIn the lecture on variance estimation, we have proved that the unadjusted sample variance has a Gamma distribution with parameters and . Therefore, has a Gamma distribution with parameters and whereBut a Gamma distribution with parameters and is the same as a Chi-square distribution with degrees of freedom, which in this case is the distribution of .
The coverage probability does not depend on the unknown parameters and .
Therefore, the level of confidence is equal to the coverage probability:where is a Chi-square distribution with degrees of freedom.
The level of confidence is the same found for the case of known mean. The only difference is in the number of degrees of freedom.
Therefore, the methods to choose and are those already illustrated above.
Below you can find some exercises with explained solutions.
Suppose that you observe a sample of 100 independent draws from a normal distribution having known mean and unknown variance .
Denote the 100 draws by , ..., .
Suppose that:
Find a confidence interval for at 90% confidence.
Hint: the distribution function of a Chi-square random variable with 100 degrees of freedom is such that
Consider the confidence intervalThe level of confidence iswhere is a Chi-square random variable with degrees of freedom and are strictly positive constants. If we setthenwhich is equal to our desired level of confidence. Thus, the confidence interval for is
Suppose that you observe a sample of 100 independent draws from a normal distribution having unknown mean and unknown variance .
Denote the 100 draws by , ..., .
Suppose that their adjusted sample variance is
Find a confidence interval for . Set the level of confidence at 99%.
Hint: a Chi-square random variable with degrees of freedom has a distribution function such that
Let the confidence interval beThen, the level of confidence iswhere is a Chi-square random variable with degrees of freedom and are strictly positive constants. If we setthenwhich is equal to the desired level of confidence. Thus, the confidence interval for is
Please cite as:
Taboga, Marco (2021). "Confidence interval for the variance", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/fundamentals-of-statistics/set-estimation-variance.
Most of the learning materials found on this website are now available in a traditional textbook format.