0

In this answer, it says that in general the sum of the variances is not equal to the variance of the sum.

I tried to work it out by myself, and I think I got a different result, namely that the variance of the sum is equal to the sum of the variances. Do I have incorrect work here for random variables in general? Am I missing some assumption I made?

\begin{eqnarray*} Var(X+Y) & = & E[(X+Y)^{2}]-(E[X+Y])^{2}\\ & = & E[X^{2}+Y^{2}+XY]-(E[X]+E[Y])^{2}\\ & = & E[X^{2}]+E[Y^{2}]+E[XY]-(E[X])^{2}-(E[Y])^{2}-E[X]E[Y]\\ & = & E[X^{2}]-(EX)^{2}+E[Y^{2}]-(EY)^{2}\\ & = & Var(X)+Var(Y) \end{eqnarray*}

Hatshepsut
  • 1,429
  • 4
  • 15
  • 26
  • 1
    You also miss something here $E[(X+Y)^2]=E(X^2+2XY+Y^2)$. Your case is correct only when $X$ and $Y$ are independent. – Deep North Oct 01 '15 at 00:04
  • @DeepNorth You're saying that equation in your comment is only true when X and Y are independent?? – Hatshepsut Oct 01 '15 at 03:01
  • Yes, if $X$ and $Y$ are independent then $E(XY)=E(X)E(Y)$ then the $Cov(X,Y)=0$ – Deep North Oct 01 '15 at 03:11
  • @DeepNorth Ok. I see how $E(XY) = E(X)E(Y)$ implies uncorrelatedness ( I think that's the definition of uncorrelatedness...), but I don't understand how $E[(X+Y)^2]=E(X^2+2XY+Y^2)$ implies $E(XY) = E(X)E(Y)$. The former equation seems like it's just basic algebra. Am I wrong, or misinterpreting something? – Hatshepsut Oct 01 '15 at 03:22
  • It is not from $E[(X+Y)^2]=E(X^2+2XY+Y^2)$ it is an assumption you have to make. – Deep North Oct 01 '15 at 03:45
  • Clarification. $E[XY] = E[X]E[Y]$ is not *only* true when $X$ and $Y$ are independent, it just *is* true when they are independent. It's not an if and only if. – Matthew Drury Oct 01 '15 at 14:16

1 Answers1

3

On your third line, you implicitly assume the relation

$$E[XY] - E[X]E[Y] = 0$$

and use it to cancel the cross term. This relation is untrue for general $X$ and $Y$. Note that if it were true, it would follow that

$$ E[X^2] = E[X \times X] = E[X]E[X] = E[X]^2 $$

and all the other terms in your relation would also cancel. So, under your implicit assumption, you've actually shown that

$$ Var(X + Y) = 0 $$

Which I don't think I have to convince you is untrue.

Note that, given the general failure of

$$ E[XY] - E[X]E[Y] = 0 $$

it pays to measure it's failure for any given two random variables. This leads to the definition of covariance

$$ Cov(X, Y) = E[XY] - E[X]E[Y] $$

Matthew Drury
  • 33,314
  • 2
  • 101
  • 132