Summary and Resources


  1. You can fit a regression with statsmodels or sklearn
  2. You can view the results visually or numerically of your model with either method
  3. You can measure the goodness of fit on a regression
  4. You can interpret the mechanical meaning of the coefficients for
  5. You understand what a t-stat / p-value does and does not tell you
  6. You are aware of common regression analysis pitfalls and disasters

Extra reading and practice on the topic

  1. Chapters 22-24 of R 4 Data Science are an excellent overview of the thought process of modeling
  2. Use statsmodels.api to make nice regression tables by following this guide (you can use different data though). I used this to create the table on the goodness of fit page
  3. Arthur Turrell's chapter on regression and python.


  • The demo on diamonds is borrowed from R4DS.
  • DS100
  • Alberto Rossi provided excellent lecture notes