MoonSay /Tutorials/Machine Learning Interview #14
Contents
  1. 01Introduction
  2. 02Least squares
  3. 03Unbiasedness
  4. 04Least variance
  5. 05Distribution and confidence
  6. 06Interview follow-ups
  7. 07Common misconceptions
  8. 08Interview questions and model answers
  9. 09Summary
  10. References

09Summary

  • Least squares. \hat\beta=(X^\top X)^{-1}X^\top y minimizes \sum_i(y_i-x_i^\top\beta)^2, with no assumptions. Body mass index: slope 10.2.
  • Unbiasedness. (1) A model linear in \beta (free; curves via x^2) and (2) \E[\varepsilon\mid X]=0 give \E[\hat\beta]=\beta: over repeated studies, right on average. An omitted variable that matters and is correlated with x adds \beta_2\delta_1: blood pressure 2.46\to1.38.
  • Least variance. Add (3) constant variance and (4) independent errors, and least squares is BLUE, with variance \sigma^2(X^\top X)^{-1}. Standard error 0.67; but our residuals fan out like a funnel (heteroscedasticity), and White’s robust standard error, 0.61, and the bootstrap agree on a smaller spread.
  • Distribution and confidence. Add (5) normal errors: \hat\beta is exactly normal, (\hat\beta_j-\beta_j)/\mathrm{SE}(\hat\beta_j)\sim t_{n-p-1}, and \hat\beta_j\pm1.97\,\mathrm{SE} is a 95\% interval for large n. Our slope: 9.0 to 11.4, t\approx17, a strong association, not proof of cause. For large n the central limit theorem covers non-normal errors.
  • Follow-ups. Squares are maximum likelihood under normal errors. Collinearity inflates the variance by 1/(1-R_j^2). Check the residuals and the VIFs.