0
$\begingroup$

In solving the following problem:

Let $X$ be the number of 1's and Y the number of 2's that occur in
$n$ rolls of a fair die. Compute $Cov( X, Y)$.

I cam up with this solution:

$ Cov( X, Y) = E[ XY] - E[ X]E[ Y]\\ = -\sum\limits_1^n x p(x) \sum\limits_1^n y p(y)\\ = -\sum\limits_1^n x \frac{ 1}{ 6} \sum\limits_1^n y \frac{ 1}{ 6}\\ = -\frac{ 1}{ 36} \sum\limits_1^n x \sum\limits_1^n y\\ = -\frac{ 1}{ 36} \frac{ 1}{ 4} n^2 (n + 1)^2\\ = -\frac{ 1}{ 144} n^2 (n + 1)^2\\$

However, the answer in the back of the book and a work solution here (Problem 7.36) indicate the solution is $-\frac{ n}{36}$ and I do not understand why?

Specifically, I do not understand why they are treating the problem as the covariance of sequences?

  • 0
    I see it now thanks guys.2012-07-20

1 Answers 1

2

For every $k\geqslant1$, consider the random variables $U_k$ and $V_k$ defined by $U_k=1$ if the $k$th roll is $1$, $U_k=0$ otherwise, $V_k=1$ if the $k$th roll is $2$, $V_k=0$ otherwise. Then $\mathrm E(U_k)=\mathrm E(V_k)=x$ with $x=\frac16$ and $X=\sum\limits_{k=1}^nU_k$ and $Y=\sum\limits_{k=1}^nV_k$.

Thus, $\mathrm E(X)=\mathrm E(Y)=nx$ and $\mathrm E(XY)$ is a sum of expectations $\mathrm E(U_iV_j)$ which we now compute. For every $i$, $U_iV_i=0$ hence $\mathrm E(U_iV_i)=0$. For every $i\ne j$, $U_i$ and $V_j$ are independent hence $\mathrm E(U_iV_j)=x^2$ where $x=\mathrm E(U_i)=\mathrm E(V_j)=\frac16$. There are $n(n-1)$ terms with $i\ne j$ in the sum defining $\mathrm E(XY)$ hence $\mathrm E(XY)=n(n-1)x^2$.

Finally, $\mathrm{Cov}(X,Y)=\mathrm E(XY)-\mathrm E(X)\mathrm E(Y)=n(n-1)x^2-(nx)^2=-nx^2=-\frac1{36}n$.