To create a confidence interval for \(\sigma^2\) first consider an interval of the form
\begin{equation*}
E_1 \lt \sigma^2 \lt E_2
\end{equation*}
and determine values for the boundaries so that the likelihood of this being true is high. For this case, since the chi-square distribution only has a positive domain and is not symmetrical, you will not expect to determine a symmetrical confidence interval. Therefore, consider
\begin{equation*}
P (E_1 \lt \sigma^2 \lt E_2 ) = 1 - \alpha
\end{equation*}
and by playing around with algebra you get
\begin{equation*}
P \left ( \frac{E_1}{(n-1)S^2} \lt \frac{\sigma^2}{(n-1)S^2} \lt \frac{E_2}{(n-1)S^2} \right ) = 1 - \alpha
\end{equation*}
or by inverting the inequality yields
\begin{equation*}
P \left ( \frac{(n-1)S^2}{E_2} \lt \frac{(n-1)S^2}{\sigma^2} \lt \frac{(n-1)S^2}{E_1} \right ) = 1 - \alpha .
\end{equation*}
Using the previous theorem, note that the inside variable can be replaced with a chi-square variable. If F is the distribution function for chi-square, then you get
\begin{equation*}
F \left ( \frac{(n-1)S^2}{E_1} \right ) - F \left ( \frac{(n-1)S^2}{E_2} \right ) = 1 - \alpha .
\end{equation*}
For a given value of \(\alpha\) there are many possible choices but often one often utilized is one in which
\begin{equation*}
F(\chi^2_{1-\alpha/2} ) = F \left ( \frac{(n-1)S^2}{E_1} \right ) = 1 - \alpha / 2
\end{equation*}
and
\begin{equation*}
F(\chi^2_{\alpha/2} ) = F \left ( \frac{(n-1)S^2}{E_2} \right ) = \alpha / 2.
\end{equation*}
Using the inverse chi-square gives values for the expression on the inside and algebra can be used to solve for each of \(E_1, E_2\text{.}\) Indeed,
\begin{equation*}
E_1 = \frac{(n-1)S^2}{\chi^2_{1-\alpha/2}}
\end{equation*}
and
\begin{equation*}
E_2 = \frac{(n-1)S^2}{\chi^2_{\alpha/2}}
\end{equation*}