I'm working on a problem set right now, and I'm sort of stump on the following queries. I'm not looking for answers, but tips/hints would be awesome.
Given x1,x,2,x3,x4, and y1,y2,y3,y4 as data points, let yhat = a1(xi) + a0, i = 1,2,3,4 be the estimates of the least squares fit.
The problem wants me to show that the mean of the residuals (yhat - y) is equal to 0.
I have:
[(a1x1 + a0 - y1) + (a1x2 + a0 - y2) + (a1x3 + a0 - y3) + (a1x4 + a0 - y4)]/4 as being equal to the mean. I guess you can simplify this to:
[a1(x1+x2+x3+x4) + 4a0 - (y1+y2+y3+y4)]/4
However, this is as far as I can get before I'm stumped. How would I go about showing that this is equal to 0 when no definite values are given for any of the variables?
Posts
Hint
http://mathworld.wolfram.com/LeastSquaresFitting.html
The answer to your problem is hidden somewhere between equation (1) and (6).
GFWL: studaud (for SF4)