so I need to be able to prove that, given the residual is given by ei=yi-y(hat)i, the mean of the residuals, ie e-bar, is always equal to zero
but that's false, if your model is
However it is true if the model does include the constant term, say
In that second case, which using matrices is a lot easier we have... from http://en.wikipedia.org/wiki/Regression_analysis