Solution (source code)

= Solution

Let $\chi^2_{\nu,p}$ denote the $p$-quantile of the <chi-squared distribution>. Since $S_{XX}/\sigma^2\sim\chi^2_{n-1}$, inversion of the central probability event gives
$$
\boxed{
\left[
\frac{S_{XX}}{\chi^2_{n-1,1-\alpha/2}},
\frac{S_{XX}}{\chi^2_{n-1,\alpha/2}}
\right]}
$$
as a $100(1-\alpha)\%$ confidence interval for $\sigma^2$.