1. ## Stats help!

So the sum of the residuals for a linear regression=0, which makes sense thinking about it, but how would I go about proving this???
That is r(i)=y(i)-ý(i) (the second y is y hat) and the sum of all of these = 0.

Any help would be greatly appreciated!

2. Originally Posted by Jar23
So the sum of the residuals for a linear regression=0, which makes sense thinking about it, but how would I go about proving this???
That is r(i)=y(i)-ý(i) (the second y is y hat) and the sum of all of these = 0.

Any help would be greatly appreciated!
In linear regression we find $\displaystyle a$ and $\displaystyle b$ such that:

$\displaystyle \sum (y_i-(ax_i+b))^2$

is minimised

Therefore

$\displaystyle \frac{\partial}{\partial b}\sum (y_i-(ax_i+b))^2=0$

which means:

$\displaystyle -\ \sum 2(y_i-(ax_i+b))=0$

simplifying:

$\displaystyle \sum (y_i-(ax_i+b))=\sum (y_i - \hat{y}_i)=0$

RonL

3. Thanks so much. i thought it was something simple that had to do with minimizing the linear regression equation.