
Population least-squares coefficient from second moments (ESL eq. 2.16)
Source:R/Epetheor.R
Epetheor.RdHastie, Tibshirani and Friedman (2009), The Elements of Statistical Learning, 2nd ed., Springer, Section 2.4, book pp. 18-19 (PDF pp. 37-38).
Details
EPE(f) = E(Y - f(X))^2 (2.9) and beta = [E(XX')]^-1 E(XY) (2.16), the latter obtained by plugging the linear model (2.15) into (2.9) and differentiating. (2.16) is a population statement; the sample moment matrices (1/N) X'X and (1/N) X'y are substituted here, which is exactly the identification the book makes on p. 19 between (2.16) and (2.6).
No intercept is added: (2.16) has none. Supply a constant column in X.