We throw the symmetric dice $n$ times. Let $X$ - the number of received ones, $Y$ - the number of received sixes. Find $\text{Cov}(X,Y)$.
My solution:
We know that $\text{Cov}(X,Y)= \mathbb{E}(XY)-\mathbb{E}(X)\mathbb{E}(Y)$ and $\mathbb{E}(X)=\mathbb{E}(Y)=\frac{n}{6}$.
How can I find $\mathbb{E}(XY)$?
We first define several new random variables:
Now observe that $$ X = \sum_{i=1}^n X_i \\ Y = \sum_{i=1}^n Y_i $$
And we have \begin{align} &\mathbb{E}[XY] \\ =\ &\mathbb{E}[(X_1 + \cdots + X_n)(Y_1 + \cdots + Y_n)] \\ =\ &\mathbb{E}[\sum_{i=1}^n X_iY_i + \sum_{i=1}^n\sum_{j\neq i}X_iY_j] \\ =\ &\mathbb{E}[\sum_{i=1}^n\sum_{j\neq i}X_i Y_j]\\ =\ &\sum_{i=1}^n\sum_{j\neq i}\mathbb{E}[X_iY_j] \\ =\ &\sum_{i=1}^n\sum_{j\neq i} \frac{1}{36} \\ =\ &\frac{n(n-1)}{36} \end{align}
In the third equality, since $i$th throw can not be $1$ and $6$ at the same time, we must have $X_iY_i = 0$, thus we can ignore those terms here.