Chi-squared confidence interval for variance

chi-squared-distributionconfidence intervalhighest-density-regionoptimization

When constructing, for example, a $90\%$ confidence interval for the population variance using the chi-squared distribution, we have:

\begin{align}
& P\left(a<\frac{(n-1)S^2}{\sigma^2}<b\right) \\
= {} & P\left(\frac{\sum(\bar{X}-X_i)^2}{b}<\sigma^2<\frac{\sum(\bar{X}-X_i)^2}{a}\right)=0.9, \\ & \text{ where } \frac{(n-1)S^2}{\sigma^2}\sim\chi_{n-1}^2.
\end{align}

In my course, we then find $a, b$ such that $$P(\chi_{n-1}^{2}<a)=P(\chi_{n-1}^{2}>b)=0.05.$$

My question is, given that the chi-squared distribution is asymmetric for small $n,$ why do we pick $0.05$ for both sides? Surely we’d have a shorter confidence interval if we weighted more of the $0.1$ probability to one of the sides, instead of splitting equally?

Best Answer

Because the chi-squared distribution is skewed, the sample variance is not generally at the center of a 95% CI for the variance (for normal data).

You are correct to say that you can often get a narrower interval by taking something like probability 2% from one tail and 3% from the other, than by taking 2.5% from each tail.

For practical purposes, the narrowest 95% interval may put almost all of the 5% probability in one tail, thus becoming nearly a one-sided interval. This may or may not be useful.

Thus, it has become more or less standard to use probability-symmetric intervals in general practice. If you are not showing a probability-symmetric interval, it is a good idea to report that you are not, and to explain why.

Example: Consider a normal sample of size $n=20$ with variance $\sigma^2 = 25.$

set.seed(2022)
x = rnorm(20, 50, 5)
v = var(x);  v
[1] 25.01484

Seven 2-sided 95% CIs for $\sigma^2$ and their widths:

CI.1 = 19*v/qchisq(c(.97, .02), 19)
CI.1; diff(CI.1)
[1] 14.77971 55.47799
[1] 40.69828

CI.2 = 19*v/qchisq(c(.975, .025), 19)
CI.2; diff(CI.2)
[1] 14.46722 53.36339
[1] 38.89617    # probability-symmetric

CI.3 = 19*v/qchisq(c(.98, .03), 19)
CI.3; diff(CI.3)
[1] 14.10859 51.65860
[1] 37.55002

CI.4 = 19*v/qchisq(c(.99, .04), 19)
CI.4; diff(CI.4)
[1] 13.13265 49.00681
[1] 35.87417

CI.5 = 19*v/qchisq(c(.995, .045), 19)
CI.5; diff(CI.5)
[1] 12.31867 47.93333
[1] 35.61466   # shortest on this list           

CI.6 = 19*v/qchisq(c(.999, .049), 19)
CI.6; diff(CI.6)
[1] 10.84618 47.16119      
[1] 36.31501   # longer than above

CI.7 = 19*v/qchisq(c(.99999, .04999), 19)
CI.7; diff(CI.7)
[1]  8.284141 46.980289
[1] 38.69615   # 'almost' one sided

Note: The relevant one-sided 95% CI would give the upper bound $46.97848.$ Depending on the application, that might be exactly what you want.

Related Question