Residuals and fitted values

Summary

  • Given data x1,x2,,xn and y1,y2,,yn and the OLS linear trendline

y=b1+b2x

  • ( b1 and b2 are calculated using the OLS formula)
  • The OLS fitted values are defined as

y^i=b1+b2xii=1,,n

  • The OLS residuals are defined as

ei=yiy^i=yib1b2xii=1,,n

  • The OLS RSS (residual Sum of Squares) is defined as

RSS=i=1nei2