# Show that s^2 is an unbiased estimator for sigma^2

#### statgirl11

##### New Member
I am trying to complete a proof showing that s^2 = sum(Yi - Yi hat)^2/(n-2) is unbiased for sigma^2

In other words, show that E[s^2] = sigma^2

I have...

E[s^2] = E [sum(yi - yi hat)^2/(n-2)]

which is equivalent to...

E[s^2(n-2)] = E[sum(yi - yi hat)^2]

From here,

E[sum(yi - yi hat)^2] = Var(Yi - Yi hat) + [E(Yi - Yi hat)]^2

So now I have to show that Var(Yi - Yi hat) + [E(Yi - Yi hat)]^2 = sigma^2(n-2), but I keep getting stuck at this point, especially in terms of taking the variance...should I make a substitution for yi hat? Anything I try doesn't seem to get me where I want!

If anyone can provide me with some direction that would be great, thanks

#### statgirl11

##### New Member
I looked at your solution, however you have...

Subtracting (2) from (1) gives
(3) (Y_i – Ybar) = Beta1(X_i – Xbar) + (u_i – ubar), and go from there...

however, there is a difference in that you are using Y_i - Ybar, rather than Y_1 - Yhat, which is what I am trying to do...

#### Dragan

##### Super Moderator
I looked at your solution, however you have...

however, there is a difference in that you are using Y_i - Ybar, rather than Y_1 - Yhat, which is what I am trying to do...
I think you mean: Y_i - Yhat_i (?).

This is what e_i is in (4) and (5)...i.e. e_i = Y_i - Yhat_i

#### statgirl11

##### New Member
Yes that is what I meant, and I see what you mean now, thank you!

I'm going to try and work through your other post and see if I can figure it out from there.

Thanks a lot