36-465/665, Conceptual Foundations of Statistical Learning
4 February 2021 (Lecture 2)
\[ \newcommand{\Prob}[1]{\mathbb{P}\left( #1 \right)} \newcommand{\Expect}[1]{\mathbb{E}\left[ #1 \right]} \newcommand{\Var}[1]{\mathrm{Var}\left[ #1 \right]} \newcommand{\Cov}[1]{\mathrm{Cov}\left[ #1 \right]} \newcommand{\Risk}{r} \newcommand{\Loss}{\ell} \newcommand{\OptimalStrategy}{\sigma} \DeclareMathOperator*{\argmin}{argmin} \]
The risk of a strategy is its expected loss, averaging over \(X\) and \(Y\) \[ \Risk(s) = \Expect{\Loss(Y, s(X))} \]
Now minimize (and use Greek letters to mark the minimum): \[\begin{eqnarray} \beta_0 &= & \Expect{Y} - \beta_1 \Expect{X}\\ \beta_1 & = & \Cov{X,Y}/\Var{X}\\ s^*(x) & = & \beta_0 + \beta_1 x\\ & = & \Expect{Y} + \frac{\Cov{X,Y}}{\Var{X}}(x - \Expect{X}) \end{eqnarray}\] The expected squared error is \[ \Expect{(Y-s^*(X))^2} = \Var{Y} - \frac{(\Cov{X,Y})^2}{\Var{X}} = \Risk(s^*) \]
(Similarly for multivariate \(X\) but more linear algebra)