= Solution
A $(1-\alpha)$ <prediction interval> is a pair of statistics $L(Y),U(Y)$ such that, for every $\beta$ and $\sigma^2>0$, an independent future response $Y^*$ at the specified input satisfies
$$
\Pr_{\beta,\sigma^2}\{L(Y)\leq Y^*\leq U(Y)\}=1-\alpha.
$$
In the <normal linear model>, assume $X$ has full column rank and write
$$
\widehat\beta=(X^TX)^{-1}X^Ty,
\qquad
s^2=\frac{\|y-X\widehat\beta\|_2^2}{n-p}.
$$
For a new observation
$$
Y^*=x^{*T}\beta+\varepsilon^*,
\qquad
\varepsilon^*\sim N(0,\sigma^2),
$$
independent of the training sample, the prediction error is
$$
Y^*-x^{*T}\widehat\beta
=\varepsilon^*-x^{*T}(\widehat\beta-\beta).
$$
The two terms on the right are independent centered <normal random variables>, while
$$
\operatorname{Var}(\widehat\beta)=\sigma^2(X^TX)^{-1}.
$$
Consequently, with the new-point <regression leverage>
$$
h^*=x^{*T}(X^TX)^{-1}x^*,
$$
we have
$$
\frac{Y^*-x^{*T}\widehat\beta}{\sigma\sqrt{1+h^*}}\sim N(0,1).
$$
The assumption in the question gives
$$
\frac{(n-p)s^2}{\sigma^2}
=\frac{\|y-X\widehat\beta\|_2^2}{\sigma^2}
\sim\chi^2_{n-p}.
$$
This variable is independent of $\widehat\beta$; it is also independent of the new error $\varepsilon^*$. Therefore it is independent of the standardized prediction error, and the defining normal-over-chi-square representation of <Student's t-distribution> gives
$$
\frac{Y^*-x^{*T}\widehat\beta}{s\sqrt{1+h^*}}
\sim t_{n-p}.
$$
If $t_{n-p,1-\alpha/2}$ is the corresponding upper quantile, symmetry yields
$$
\Pr\left(
\left|\frac{Y^*-x^{*T}\widehat\beta}{s\sqrt{1+h^*}}\right|
\leq t_{n-p,1-\alpha/2}
\right)=1-\alpha.
$$
Solving these inequalities for $Y^*$ proves that the <prediction interval in a normal linear model> is
$$
\boxed{
x^{*T}\widehat\beta
\mathbin\pm t_{n-p,1-\alpha/2}
s\sqrt{1+x^{*T}(X^TX)^{-1}x^*}.}
$$
Its center and endpoints depend only on the observed data and $x^*$, and the pivotal calculation proves the required coverage uniformly in the unknown $\beta$ and $\sigma^2$.
Back to article page