OLS results

Problem

\(e_i\) are the OLS residuals and \({\hat{y}}_i\) are the OLS fitted values.

a) Show that

\[\sum_{i=1}^{n}{ x_{i,j}e_i }=0\]

b) Show that if \(x_{i,1}=1\)

\[\sum_{i=1}^{n}{ e_i }=0\]

c) Show that

\[\bar{y}=\bar{\hat{y}}\]

d) Show that

\[\sum_{i=1}^{n}{ e_i{\hat{y}}_i }=0\]

Solution

a) From the first order condition of the least squares problem we have

\[X'e=0\]

Both sides are \(k×1\) . If you do the matrix multiplication of \(X'e\) then the first row of this equation is

\[\sum_{i=1}^{n}{ x_{i,1}e_i }=0\]

Similarly, row \(j\) , where \(1≤j≤k\) , is

\[\sum_{i=1}^{n}{ x_{i,j}e_i }=0\]

b) Follows immediately from a)

c) \(y=\hat{y}+e\) . Therefore,   \(\bar{y}=\bar{\hat{y}}+\bar{e}=\bar{\hat{y}}\) since \(\bar{e}=0\) .

d) \({\hat{y}}_i=x'_ib\) so

\[\sum_{i=1}^{n}{ e_i {\hat{y}}_i }=\sum_{i=1}^{n}{ e_ix'_ib }=\left( \sum_{i=1}^{n}{ e_ix'_i } \right)b=0\]

since

\[\sum_{i=1}^{n}{ e_ix'_i }=\sum_{i=1}^{n}{ e_i\left( x_{i,1}, \ldots ,x_{i,k} \right) }=\left( \sum_{i=1}^{n}{ e_ix_{i,1} }, \ldots ,\sum_{i=1}^{n}{ e_ix_{i,k} } \right)=(0, \ldots ,0)\]