you can prove this geometrically. Let C(X) be the column space of the matrix [1,X] consisting of 2 columns (1st column is n-dimensional vector where all the entries are 1, and 2nd column is your n-dimensional vector X, so the matrix is of size n by 2) now yhat - ybar belongs to C(X) and ehat is orthogonal to C(X) so the sum in the question is nothing but the dot product between them so it equals 0 since they're orthogonal. Hope this helps!




Reply With Quote