Independence of $X$ and $Y$ in derivation of covariance?

10 Views Asked by At

I am trying to derive the equation of covariance, as was done in this Wikipedia article. I get to here and then I get stuck:

$$\begin{align} \text{Cov}(X, Y) &= E[(X - E[X])(Y - E[Y])] \\ &= E[XY] - XE[Y] - YE[Y] + E[X]E[Y]] \\ &= E[XY] - E[XE[Y]] - E[YE[X]] + E[E[X]E[Y]] \end{align}$$

If $X$ and $Y$ are independent, then we would have that $E[XY] = E[X]E[Y]$, and this would lead to the desired result. But I don't see anything said in the article about $X$ and $Y$ necessarily being independent. Can someone please clear this up for me? Thank you.

1

There are 1 best solutions below

1
On BEST ANSWER

$EX$ and $EY$ are not random, they are just constants. So they can be pulled out of the expectation: $E(XEY)=(EY)(EX)$ etc.