# Why is $\bar y=\hat\beta_1 + \hat\beta_2\bar x$ and not $\frac{y_i}{n}=\frac{\hat\beta_1 + \hat\beta_2 x_i + \varepsilon}{n}$?

I know what I wrote is false, but I think I'm undergoing a Cartesian doubt crisis at the moment on $\bar y$

If $y_i =\hat\beta_1 + \hat\beta_2 x_i + \varepsilon_i$

Why is $$\bar y=\hat\beta_1 + \hat\beta_2\bar x$$

And not $$\frac{y_i}{n}=\frac{\hat\beta_1 + \hat\beta_2 x_i + \varepsilon_i}{n}$$?

Maybe in the same way:

if $x'=x_i - \bar x$

Why is $$\bar x'=0$$ and not $$= \frac{x_i-\bar x}{n}$$?

• I think you are asking why the regression line always goes through the mean. You can find proof of this online, such as here. Jan 7 '16 at 17:45

@user777 is of course right, but one shot at the reason for OP's crisis might be that he overlooked that $\bar y$ is defined as $\frac{1}{n}\sum_{i=1}^ny_i$, not $\frac{y_i}{n}$, and the same of course for $\bar x$.
As a matter of notation, it would be good to write $\hat{\epsilon}_i$ instead of $\epsilon$ to emphasize that it is the residual belonging to observation $i$. It drops out when taking averages as the residuals have average zero when the regression includes a constant (as it does here).
It is. Just multiply both sides by $n$.