0

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

  • 1
    If you have a proof that the RHS equals the LHS, then can you not reverse the steps to get a proof that the LHS equals the RHS? – A.M. Feb 16 '22 at 19:04
  • @A.M. A fair point. I can do as you say but am stopped at the end of working backwards (the beginning of working forwards) by not understanding how the added zero hits. To be clear I can write the math to show the proof but don't feel like I really can logically prove it. – Andrew Igdal Feb 16 '22 at 19:07
  • If you multiply both expressions by $1/n$, this is just the standard identity $\text{Cov}(X,Y)=E[XY]-E[X]E[Y]$ applied to a sample. There are likely several proofs online if you are stuck. – Golden_Ratio Feb 16 '22 at 19:10
  • @AndrewIgdal could you write a proof that the LHS equals the RHS and ask specifically "why does line X follow from line Y?"? – A.M. Feb 16 '22 at 22:51

1 Answers1

1

There's a useful idea to keep in mind here and when dealing with more complicated parameters like skewness. To make it easier to prove identities, we can do a two-step process:

  1. Prove that the identity is valid when $\overline X = \overline Y = 0$.
  2. Prove that both sides change in the same way (or don't change at all) when we translate $X$ or $Y$.

Step 1 is very easy here: when $\overline X = \overline Y = 0$, both sides simplify to $\sum Y_i X_i$.

For step 2, consider that:

  • If we replace every $X_i$ by $X_i + k$ in $\sum(Y_iX_i) - \bar{Y}(\sum X_i)$, the first sum increases by $k \sum Y_i$, while the second sum increases by $\bar{Y} \sum k = \frac1n \sum(Y_i) (nk) = k \sum Y_i$. Overall, there is no change.
  • If we replace every $X_i$ by $X_i + k$ in $\sum(Y_i - \bar{Y})(X_i - \bar{X})$, then $\bar X$ also changes to $\bar X + k$, so $(X_i - \bar{X})$ remains the same, and there is no change.
  • If we replace every $Y_i$ by $Y_i + k$ in $\sum(Y_iX_i) - \bar{Y}(\sum X_i)$, then the first sum increases by $k \sum X_i$, and (because $\bar Y$ changes to $\bar Y+k$) so does the second sum. Overall, there is no change.
  • If we replace every $Y_i$ by $Y_i + k$ in $\sum(Y_i - \bar{Y})(X_i - \bar{X})$, then $\bar Y$ also changes to $\bar Y + k$, so $(Y_i - \bar{Y})$ remains the same, and there is no change.

We can use step 2 to reduce every instance of the sum to the case in step 1. Simply replace every $X_i$ by $X_i - \overline X$, and replace every $Y_i$ by $Y_i - \overline Y$.

Misha Lavrov
  • 142,276