-1
$\begingroup$

Found this on Wolfram MathWorld:

Covariance provides a measure of the strength of the correlation between two or more sets of random variates. The covariance for two random variates $X$ and $Y$, each with sample size $N$, is defined by the expectation value \begin{align}\operatorname{Cov}(X,Y) =&\; \mathbb E[(X-\mu_X)(Y-\mu_Y)] \tag1\\[2ex] =&\; \mathbb E[XY]-\mu_X\mu_Y .\tag2\end{align}

A link is probably better. http://mathworld.wolfram.com/Covariance.html. I'm looking for a proof of equation $(2)$ on that page.

$\endgroup$
2
  • $\begingroup$ It seems like a definition, not something you would prove. $\endgroup$
    – Arthur
    Commented Apr 19, 2018 at 23:03
  • 2
    $\begingroup$ @Arthur I think the question is why the two expressions $E[(X - \mu_X) (Y - \mu_Y)]$ and $E[XY] - \mu_X \mu_Y$ are equal. $\endgroup$ Commented Apr 19, 2018 at 23:04

3 Answers 3

6
$\begingroup$

The proof is not that hard actually. Let $X$ and $Y$ be any two random variables. By definition, we have: $$\text{Cov}(X,Y) = \mathbb{E}[(X - \mathbb{E}(X))(Y - \mathbb{E}(Y))]$$ But we can simply rewrite this and use the linearity of the expactation to obtain: \begin{align*} \text{Cov}(X,Y) &= \mathbb{E}[(X - \mathbb{E}(X))(Y - \mathbb{E}(Y))] \\ &= \mathbb{E}[XY - \mathbb{E}(X)Y - X\mathbb{E}(Y) + \mathbb{E}(X)\mathbb{E}(Y)] \\ &= \mathbb{E}(XY) - \mathbb{E}(X)\mathbb{E}(Y) - \mathbb{E}(X)\mathbb{E}(Y) + \mathbb{E}(X)\mathbb{E}(Y) \\ &= \mathbb{E}(XY) - \mathbb{E}(X)\mathbb{E}(Y) \end{align*}

$\endgroup$
4
$\begingroup$

Call $\mu_X = \mathbb{E}[X]$ and $\mu_Y = \mathbb{E}[Y]$

\begin{eqnarray} {\rm Cov}(X, Y) &=& \mathbb{E}[(X - \mu_X)(Y - \mu_Y)] \\ &=& \mathbb{E}[X Y - \mu_Y X - \mu_X Y + \mu_X \mu_Y] \\ &=& \mathbb{E}[X Y] - \mathbb{E}[\mu_Y X] - \mathbb{E}[\mu_X Y] + \mathbb{E}[\mu_X \mu_Y] \\ &=& \mathbb{E}[X Y] -\mu_Y \mathbb{E}[X] - \mu_X\mathbb{E}[Y] + \mu_X \mu_Y \\ &=& \mathbb{E}[X Y] -\mu_Y \mu_X - \mu_X\mu_Y + \mu_X\mu_Y \\ &=& \mathbb{E}[X Y] -\mu_X \mu_Y \end{eqnarray}

$\endgroup$
3
$\begingroup$

Hint: Expand out the definition of covariance and use linearity of expectation.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .