Apr 23

Ordinary least squares (OLS) in regression - 9 minute screencast

by David Harper, CFA, FRM, CIPM


FRM | CFA |

image

Here I try to show how the slope and intercept are calculated in the OLS approach. Please note the following:

  • The residual (e) is the difference between observed Y and fitted Y (the regression line)
  • The OLS line passes through (average X, average Y)
  • The average of the residuals is zero
  • The sum of squared residuals (51.89 below) is the residual sum of squares (RSS). By definition, the OLS approach minimizes this value. For example, if you were to try and draw another line, it would most likely produce a larger RSS. In the way, the RSS is sort of the "driver" of the OLS regression line.

 

rss_shot3 

Here is the screencast:


Comments

  1. Be the first to leave a comment!

Leave a Comment