Respuesta :
Definition of covariance:
[tex]\mathrm{Cov}(X,Y)=\mathbb E\bigg[(X-\mathbb E[X])(Y-\mathbb E[Y])\bigg]=\displaystyle{\sum\sum}\limits_{(x,y)}(x-\mathbb E[X])(y-\mathbb E[Y])f_{X,Y}(x,y)[/tex]
We're given that [tex]f_{X,Y}(x,y)=\dfrac16[/tex] for all [tex](x,y)[/tex].
We can compute the expectation of [tex]X[/tex] and [tex]Y[/tex]:
[tex]f_X(x)=\displaystyle\sum_yf_{X,Y}(x,y)[/tex]
[tex]f_X(x)=\mathbb P(X=x\mid Y=0)\mathbb P(Y=0)+\mathbb P(X=x\mid Y=1)\mathbb P(Y=1)+\mathbb P(X=x\mid Y=2)\mathbb P(Y=2)[/tex]
[tex]\implies f_X(x)=\begin{cases}\dfrac12&\text{for }x=0\\\\\dfrac13&\text{for }x=1\\\\\dfrac16&\text{for }x=2\\\\0&\text{otherwise}\end{cases}[/tex]
We'd find an identical PMF for [tex]Y[/tex]. So we have
[tex]\mathbb E[X]=\displaystyle\sum_xxf_X(x)=0\cdot\frac12+1\cdot13+2\cdot16=\frac23[/tex]
and similarly [tex]\mathbb E[Y]=\dfrac23[/tex].
So the covariance is
[tex]\mathrm{Cov}(X,Y)=\displaystyle\frac16{\sum\sum}\limits_{(x,y)}\left(x-\dfrac23\right)\left(y-\dfrac23\right)[/tex]
[tex]\mathrm{Cov}(X,Y)=\dfrac16\left(\left(0-\dfrac23\right)\left(0-\dfrac23\right)+\left(1-\dfrac23\right)\left(0-\dfrac23\right)+\left(2-\dfrac23\right)\left(0-\dfrac23\right)+\left(0-\dfrac23\right)\left(1-\dfrac23\right)+\left(1-\dfrac23\right)\left(1-\dfrac23\right)+\left(0-\dfrac23\right)\left(2-\dfrac23\right)\right)[/tex]
[tex]\implies\mathrm{Cov}(X,Y)=-\dfrac5{18}[/tex]
[tex]\mathrm{Cov}(X,Y)=\mathbb E\bigg[(X-\mathbb E[X])(Y-\mathbb E[Y])\bigg]=\displaystyle{\sum\sum}\limits_{(x,y)}(x-\mathbb E[X])(y-\mathbb E[Y])f_{X,Y}(x,y)[/tex]
We're given that [tex]f_{X,Y}(x,y)=\dfrac16[/tex] for all [tex](x,y)[/tex].
We can compute the expectation of [tex]X[/tex] and [tex]Y[/tex]:
[tex]f_X(x)=\displaystyle\sum_yf_{X,Y}(x,y)[/tex]
[tex]f_X(x)=\mathbb P(X=x\mid Y=0)\mathbb P(Y=0)+\mathbb P(X=x\mid Y=1)\mathbb P(Y=1)+\mathbb P(X=x\mid Y=2)\mathbb P(Y=2)[/tex]
[tex]\implies f_X(x)=\begin{cases}\dfrac12&\text{for }x=0\\\\\dfrac13&\text{for }x=1\\\\\dfrac16&\text{for }x=2\\\\0&\text{otherwise}\end{cases}[/tex]
We'd find an identical PMF for [tex]Y[/tex]. So we have
[tex]\mathbb E[X]=\displaystyle\sum_xxf_X(x)=0\cdot\frac12+1\cdot13+2\cdot16=\frac23[/tex]
and similarly [tex]\mathbb E[Y]=\dfrac23[/tex].
So the covariance is
[tex]\mathrm{Cov}(X,Y)=\displaystyle\frac16{\sum\sum}\limits_{(x,y)}\left(x-\dfrac23\right)\left(y-\dfrac23\right)[/tex]
[tex]\mathrm{Cov}(X,Y)=\dfrac16\left(\left(0-\dfrac23\right)\left(0-\dfrac23\right)+\left(1-\dfrac23\right)\left(0-\dfrac23\right)+\left(2-\dfrac23\right)\left(0-\dfrac23\right)+\left(0-\dfrac23\right)\left(1-\dfrac23\right)+\left(1-\dfrac23\right)\left(1-\dfrac23\right)+\left(0-\dfrac23\right)\left(2-\dfrac23\right)\right)[/tex]
[tex]\implies\mathrm{Cov}(X,Y)=-\dfrac5{18}[/tex]