would appreciate your help with this question:
a regular die is being thrown 21 times. we define:
$x_1$ - the number of throws we obtained 1 or 2.
$x_2$ - the number of throws we obtained 3,4,5,6.
$y_i = (-1)^{x_i}$ for i=1,2
how to calculate the covariance of $y_1$ and $y_2$?
my attempt:
we see that $y_1 = (-1)^{x_1}$ and $y_2 = (-1)^{x_2}$, which means that: $cov(y_1,y_2) = E[(y_1 -E[y_1])(y_2-E[y_2])]$. so when i plugged $y_1$ and $y_2$ into $E[X] = \sum_x x p_X(x)$ it becomes a huge mess and i'm no where near a solution. is there an elegeant way to solve it without getting to a huge mess?
thank you very much for your help, really hoping to learn how to approach this kind of questions efficiently without getting into a huge mess.
would really appreciate learning the correct way.
Observe that $Y_1Y_2=-1$ and $Y_1+Y_2=0$
So that $$\mathsf{Cov}(Y_1,Y_2)=\mathsf EY_1Y_2-\mathsf EY_1\mathsf EY_2=-1+(\mathsf EY_1)^2$$
It remains to find $\mathsf EY_1$.
$$\mathsf EY_1=\sum_{k=0}^{21}(-1)^kP(X_1=k)=\cdots$$
Can you take it from here?