Proof regarding simple linear regression

89 Views Asked by At

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

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

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$.