Solution to a covariance problem

710 Views Asked by At

Roll two dice, let $X$ be their sum, and $Y$ be the second roll subtracted from the first. Compute $\text{Cov}[X,Y]$.

Brute-force calculating $\text{Cov}[X,Y]=E[XY]-E[X]E[Y]$ is fairly horrible, so instead I look for

$$\text{Var}[X+Y]=\text{Var}[X]+\text{Var}[Y]+2\text{Cov}[X,Y]$$

Letting $A$ be the first die roll and $B$ the second, because $A+B=X$ and $A-B=Y$, $X+Y=2A$. Hence

$$4\text{Var}[A]=2\text{Var}[A]+2\text{Var}[B]+2\text{Cov}[X,Y]$$

or

$$\text{Cov}[X,Y]=\text{Var}[A]-\text{Var}[B]$$

since $A$ and $B$ are independent results of the same experiment, $\text{Var}[A]=\text{Var}[B]$, and

$$\text{Cov}[X,Y]=0$$

which I think is wrong. So what did I mess up?

2

There are 2 best solutions below

1
On BEST ANSWER

Every roll $(a,b)$ has another roll $(b,a)$ with the same $X$ and negative $Y$. So $E[Y]=0$ and $E[XY]=0$.

0
On

Since $E[A] = E[B]$ and $E[A^2] = E[B^2]$, we can use the "horrible" way...

$$\text{Cov}[X,Y]=E[XY]-E[X]E[Y] = \\ =E[(A+B)(A-B)]-E[A+B]E[A-B]=\\ =E[A^2 - B^2] - (E[A]+E[B])(E[A]-E[B]) = \\ =E[A^2] - E[A^2] - (E[A]+E[A])(E[A]-E[A]) = 0$$