I can show that $\sum(Y_iX_i) - \bar{Y}(\sum X_i) $ is equal to $\sum(Y_i - \bar{Y})(X_i - \bar{X})$. I cant, however seem to go from the LHS to the RHS or at least make it make sense to myself.
It was suggested that I add zero by adding and subtracting $\bar{X}\sum Y_i$ giving me
$\sum Y_iX_i - \bar{Y}\sum X_i + \bar{X}\sum Y_i - \bar{X}\sum Y_i$
I try to work through it but keep getting stuck. Im just not sure how it helps. If I expand the RHS on the first line I'm left with the LHS but cant get the LHS with the added zero to agree with the right.
Maybe im doing something wrong? Maybe I cant see the distribution backwards? Either way, any help explaining this would be greatly appreciated.
-Andrew