# Math Help - Regression Proof Question

1. ## Regression Proof Question

Show that Ybar = Yhat bar, that is the average of actual Y values and the average of estimated Y values are the same.

No clue where to start...any help greatly appreciated!

2. This is not clearly stated. I assume you're using the simple linear regression model $y=\beta_0+\beta_1 x+\epsilon$.

Multiplying by n, what you want to show is that $\sum_{i=1}^ny_i=\sum_{i=1}^n\hat y_i$.

Or, the sum of the residuals, $\sum_{i=1}^ne_i=\sum_{i=1}^ny_i-\hat y_i=0$.

The residuals sum to zero in the model $y=\beta_0+\beta_1 x+\epsilon$.

But they don't sum to zero if you drop the $\beta_0$ term in your model, because the vector of all ones
is no longer in the column space of the design matrix.

Here's a simple proof in this case....
Just substitute $\hat\beta_0= \bar y-\hat\beta_1\bar x$ into the model...

$\hat y_i=\hat\beta_0 +\hat \beta_1 x_i =(\bar y-\hat\beta_1\bar x )+\hat \beta_1 x_i =\bar y +\hat\beta_1\bigl(x_i-\bar x\bigr)$.

Now take the sum of this and note that

$\sum_{i=1}^n\bigl(x_i-\bar x\bigr)=0$ leads you to your conclusion.