y�i = b1 + b2xi
The vertical distances from each point to the fitted line are the least squares residuals. They are given by
êi = yi - y�i = yi - b1 + b2xi
The least squares estimators:
b2 =
∑(X -X )(y -y )
∑(X -X )2
b1 = y - b2x
Where y ∑ y N
and x =
∑ X N
are the sample means of the observations
on y and x.
- Coefficient of determination (R2)
From equation 2.22 we can derive that:
yi - y�i = êi
yi - y = (y�i - y ) + êi
∑(yi - y )2 = ∑(y�i - y )2 + ∑ êi 2
where
∑(yi - y )2 = Total sum of squares: SST (total variation in y)
∑(y�i - y )2 = Sum of squares due to the regression: SSR (explained sum of squares)
∑ êi = Sum of squares due to error: SSE (unexplained sum of squares)
From these abbreviations then comes;
SST = SSR + SSE