= Solution
The normal-model <log-likelihood> is $-\frac n2\log\sigma^2-\|Y-X\beta\|^2/(2\sigma^2)$ up to a constant. Differentiating gives the <maximum-likelihood estimators>
$$
\boxed{\widehat\beta=(X^TX)^{-1}X^TY,\qquad
\widehat\sigma^2=\frac1n\|Y-X\widehat\beta\|^2.}
$$
Let $P=X(X^TX)^{-1}X^T$. The fitted component $P\varepsilon$ and residual $(I-P)\varepsilon$ are orthogonal jointly normal projections and hence independent. Therefore
$$
\widehat\beta\sim N_p(\beta,\sigma^2(X^TX)^{-1}),\qquad
\frac{n\widehat\sigma^2}{\sigma^2}\sim\chi^2_{n-p},
\qquad \widehat\beta\ \text{and}\ \widehat\sigma^2\text{ are independent}.
$$
The prediction error $\widetilde y-y^*=x^{*T}(\widehat\beta-\beta)-\varepsilon^*$ is normal with mean zero and variance $\sigma^2\tau^2$, and is independent of the residual variance estimate. Dividing by the independent estimated standard deviation yields
$$
\boxed{\frac{\widetilde y-y^*}{\widetilde\sigma\tau}\sim t_{n-p}.}
$$
Thus the <prediction interval in a normal linear model> is
$$
\boxed{\widetilde y\ \pm\ t_{n-p,1-\alpha/2}\,\widetilde\sigma
\sqrt{1+x^{*T}(X^TX)^{-1}x^*}.}
$$
The extra $1$ includes the new observation's independent noise; omitting it would give a confidence interval for its conditional mean instead.
Back to article page