Hints for problem 2.5

(a) Change the order of the expectations (why are you allowed to do this?) and write out the squared expression: 

\(EPE(x_0) = E_{T} \big[ E_{y_0 \mid x_0}[y_0^2] + E_{y_0 \mid x_0}[\hat{y}_0^2] -2 E_{y_0 \mid x_0}[y_0\hat{y}_0] \big]\).

Consider each of the terms within the outer expectation separately, using the variance formula 

\(Var(Z) = E[Z^2] - E[Z]^2 \text{ (for some random variable $Z$)}\)

and equation (3.8).

(b) In addition to the hints given in the problem, note that \(x_0^T ({X}^T {X})^{-1} x_0\) is a scalar and thus equal to its own trace.

Published Aug. 7, 2025 9:38 AM - Last modified Aug. 7, 2025 9:38 AM