0
$\begingroup$

This Wolfram covariance note says that

$$cov(X,Y)=\langle (X-\mu_X)(Y-\mu_y)\rangle$$ $$=\langle X Y\rangle-\mu_x\mu_y$$

However, my deduction doesn't agree with it:

$$\langle (X-\mu_X)(Y-\mu_Y)\rangle=\sum\limits_{i=1}^N\frac{(x_i-\mu_x)(y_i-\mu_y)}{N}$$ $$\langle X Y\rangle-\mu_x\mu_y=\sum\limits_{i=1}^N\frac{x_iy_i-\mu_x\mu_y}{N}$$

From this, obviously the above two equations are not equal.

Is my deduction correct?

  • 0
    Try using the definitions of $\mu_{x}$ and $\mu_{y}$ and simplify.2017-01-16

1 Answers 1

2

For covariance, we have that: \begin{align*} \text{Cov}(X,Y) & = E[(X-\mu_X)(Y-\mu_Y)] \\ & = E[XY-\mu_YX-\mu_XY+\mu_X\mu_Y] \end{align*} Now, we can apply linearity of expectation to get that: $$\text{Cov}(X,Y) = E[XY]-\mu_YE[X]-\mu_XE[Y]+\mu_X\mu_Y$$ Now, recall that $\mu_X = E[X]$, and we get that: $$\text{Cov}(X,Y) = E[XY]-E[Y]E[X]-E[X]E[Y]+E[X]E[Y] = E[XY]-E[X]E[Y]$$