Let's say we have a simple linear regression model with OLS estimators, how do we go about proving the following:

$$\sum_{i = 1}^{n}(\hat{y}_{i} - \bar{y})e_{i} = 0$$

My textbook does not a terribly good job at explaining how it comes to this conclusion



Assuming that the $e_i$, $i=1,..,n$ are the residuals of the OLS fitted values, you can write $$ \sum (\hat{y}_i - \bar{y}_n)^2e_i = 2\sum \hat{y}^2_ie_i - 2\bar{y}_n\sum \hat{y}_ie_i + \bar{y}^2_n\sum e_i. $$ Note that $e$ is orthogonal to $\hat{y}$ (can you prove/see it?), then the first two summands are zero. The third one equals zero as a result of the F.O.C., namely, by taking the derivative of $\sum ( y_i - \beta_0 - \beta_1x_i)^2$ w.r.t. $\beta_0$ you get $\sum e_i =0$.

  • $\begingroup$ Thank you for the explanation! Would this work without the squared term as well? $\endgroup$ – Macterror Feb 12 '18 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.