# Derivation of Ordinary Least-Squares Slope Estimate

I understand the reasoning behind the fact that $$\hat{\beta}_1 \sim N(\beta_1,\frac{\sigma^2}{SSX})$$. However, in trying to prove the full formula for estimating $$\hat{\beta}_1$$, I am having issues/don't know the reasoning behind this part of the formula:

$$\sum_{i=1}^n (X_i - \bar{X})(Y_i - \bar{Y})$$ = $$\sum_{i=1}^n (X_i - \bar{X})Y_i$$

Can anyone help me out? Thanks!

• Nothing much to explain. Just expand the l.h.s and r.h.s separately. – StubbornAtom Oct 31 '18 at 8:13

\begin{align} \sum (X_i - \bar{X})(Y_i - \bar{Y}) &= \sum (X_i - \bar{X})Y_i - \sum (X_i - \bar{X})\bar{Y} \\ &=\sum (X_i - \bar{X})Y_i - \sum X_i\bar{Y} + n\bar{X}\bar{Y} \\ &= \sum (X_i - \bar{X})Y_i - n\bar{X}\bar{Y} + n\bar{X}\bar{Y}\\ &= \sum (X_i - \bar{X})Y_i \end{align}