# Co-variance of dependent binomial random variables.

We roll a dice n times , let X (random variable) be the number of times we get 2 and Y- the number of times we get 3. I know that $X,Y$~$bin(n,\frac{1}{6})$, I need to find Cov(X,Y). I thought about first calculating $\mathbb{E}(XY)$. But i'm stuck .

Let $X_i$ take value $1$ if by the $i$-th roll the die shows a 2, and let it take value $0$ otherwise.

Let $Y_i$ take value $1$ if by the $i$-th roll the die shows a 3, and let it take value $0$ otherwise.

Then by bilinearity of covariance we find: $$\mathsf{Cov}(X,Y)=\mathsf{Cov}(\sum_{i=1}^nX_i,\sum_{j=1}^nY_j)=\sum_{i=1}^n\sum_{j=1}^n\mathsf{Cov}(X_i,Y_j)$$

It is evident that $X_i$ and $Y_j$ are independent if $i\neq j$ so that in that case $\mathsf{Cov}(X_i,Y_j)=0$.

Also it is evident that $\mathsf{Cov}(X_i,Y_i)=\mathsf{Cov}(X_1,Y_1)$ for every $i$, so we end up with:

$$\mathsf{Cov}(X,Y)=n\mathsf{Cov}(X_1,Y_1)$$

Can you find $\mathsf{Cov}(X_1,Y_1)$ yourself?

• Cov(X,Y)=n(n−1)Cov(X1,Y2)+nCov(X1,Y1) Why is that? – Eran Dec 26 '17 at 14:59