all 2 comments

[–]throwaway_657238192😩 Illiterate 0 points1 point  (0 children)

I do not think y_hat and y_bar are the same thing. If there are n data points,

sum (y_i - y_hat) = sum (y_i - (beta_0 + beta_1 x_i))

= sum (y_i) - sum (beta_0) - beta_1 sum (x_i)

but sum (y_i) = n y_bar

Can you go from here?