Linear model – confidence interval for $\sigma$ I'd like to derive a $100\%(1-\alpha)$ confindence interval for $\sigma$ in a linear model $Y=X\beta+\epsilon$, $X$ - $n\times p$. I thought that I could make use of the fact that:
$\frac{RSS}{\sigma}=\frac{\sum_1^n(Y_i-X_i\beta)^2}{\sigma}\sim \mathcal X_{n-p}^2 $
and take it as a pivot, then:
$\mathbb P(a<\frac{\sum_1^n(Y_i-X_i\beta)^2}{\sigma}<b)=1-\alpha$
and get constants $a,b$ somehow. Am I right or not really?
 A: Consider the model
$$Y=X\beta+\varepsilon\,,$$
where $Y$ is an $n\times 1$ response vector, $X$ is an $n\times p$ matrix of covariates (fixed) with full column rank, $\beta$ is a $p\times 1$ vector of parameters and $\varepsilon$ is an $n\times 1$ error vector. Also assume $n>p$.
The residual sum of squares is then
$$\text{RSS}=(Y-X\hat\beta)^T(Y-X\hat\beta)\,,$$
where $\hat\beta$ is the OLS estimator of $\beta$.
If $\varepsilon \sim N_n(0,\sigma^2 I_n)$, then an appropriate pivot for $\sigma^2$ is
$$\frac{\text{RSS}}{\sigma^2} \sim \chi^2_{n-p}$$
This implies
$$P\left(\chi^2_{1-\alpha/2,n-p}<\frac{\text{RSS}}{\sigma^2}<\chi^2_{\alpha/2,n-p}\right)=1-\alpha\quad,\forall\,\sigma^2$$
where $\chi^2_{\alpha,n-p}$ is an upper quantile of a $\chi^2_{n-p}$ distribution, i.e. $P(\chi^2_{n-p}>\chi^2_{\alpha,n-p})=\alpha$
In this setup, a $100(1-\alpha)\%$ confidence interval for $\sigma^2$ is
$$\left(\frac{\text{RSS}}{\chi^2_{\alpha/2,n-p}},\frac{\text{RSS}}{\chi^2_{1-\alpha/2,n-p}}\right)$$
The corresponding interval for $\sigma$ is
$$\left(\sqrt\frac{\text{RSS}}{\chi^2_{\alpha/2,n-p}},\sqrt\frac{\text{RSS}}{\chi^2_{1-\alpha/2,n-p}}\right)$$
A: Yes you are on the good path.
a is $\chi^2_{1-\frac{\alpha}2, n-p}$ and bis $\chi^2_{\frac{\alpha}2, n-p}$ 
You can find an example here
