4 No R required Recall that fitted values and residuals from
Solution
Yi = a + bxi + ei where the last term represents the error terms.
We have, the sum of errors minimised, so,
(Yi - yh )2 = ei2 = [ Yi - ( a + bxi ) ]2
Partially differentiating with respect to a,
Since, the amount of sum of squares is minimum, the partial derivative must be zero.
Thus,
-2 * [ summation of ( Yi - ( a + bxi ) ) = 0
summation of [Yi - ( a + bxi ) ] = 0
summation of [ ei ] = 0 (Thus, 3 is proved)
4)
from 3,
summation of [Yi - ( a + bxi ) ] = 0
thus,
summation of [Yi ] = summation of (a + bxi ) = summation of yh
Thus, 4 is proved.
5)
Partially differentiate w.r.t b.
We get,
-2 * [ summation of (Yi - a - bxi ) xi ] = 0
But : (Yi - a - bxi ) = ei
Thus, summation of (eixi ) = 0
Thus, 5 is proved.
6)
Yh = a + bxi
Summation of ( Yh * ei )
= a * summation of (ei ) + b * summation of (xiei )
= 0 + 0 (from 3 and 5)
Hope this helps.
Note: here a = Beta0
b = Beta1
Ask in case of doubts
