# Deriving OLS estimates using method of moments

I've worked the slope all the way down to $\sum [x_i(y_i - \bar{y})] = \hat\beta_1 \sum[x_i(x_i - \bar{x})]$

But I can not figure out how to show the steps for:

$\sum[x_i(y_i - \bar{y})] = \sum(x_i - \bar{x})(y_i - \bar{y})$

and

$\hat \beta_1 \sum[x_i(x_i - \bar{x})] = \hat \beta_1 \sum(x_i - \bar{x})^2$

• Probably $x_i$ are centralised ( Original variable is subtracted by its mean value). If that is the case $\bar{x} =0$. Mar 27 '12 at 3:51
• @vinux, usually if some term is in the equation it is assumed that it is not zero. Mar 27 '12 at 7:25

$$\sum[x_i(y_i-\bar y)]=\sum[(x_i-\bar x+\bar x)(y_i-\bar y)]=\sum[(x_i-\bar x)(y_i-\bar y)]+\sum [\bar x(y_i-\bar y)].$$
$$\sum [\bar x(y_i-\bar y)]=\bar x\sum [y_i-\bar y]=\bar x\left[\sum y_i-n\bar y\right]=0,$$
where $n$ is the number of the terms in the sum. Apply the same trick for the second equation.