1

Two cards are drawn without replacement from a pack of cards. The random variable $X$ measures the number of heart cards drawn, and the random variable $Y$ measures the number of club cards drawn. Find the covariance and correlation of $X$ and $Y$:

I did the following:

Y/X        0               1                2
0   (26/52)*(25/51) (13/52)*(26*51) (13/52)*(12/51)
1   (13/52)*(26*51) (13/52)*(13/51)        0
2   (13/52)*(12/51)        0               0
Em.
  • 15,981

1 Answers1

1

Now sum up the rows and the columns to get the marginal distribution. For instance $P(Y=0)= (26/52)\cdot (25/51) +2\cdot (13/52)\cdot (26\cdot 51) +(13/52)\cdot (12/51)$


With these probabilities you can calculate the expected value of $X$ and $Y$.

$E(Y)=\mu_y=0\cdot P(Y=0)+1\cdot P(Y=1)+2\cdot P(Y=2)$. Similar calculation for $\mu_x$


The covariance is

$$Cov(X,Y)=\left[\sum_{x=0}^2 \sum_{y=0}^2 x\cdot y\cdot P(X=x,Y=y)\right]-\mu_x\cdot \mu_y$$

The first four summands of the brackets are

$0\cdot 0\cdot P(X=0, Y=0)+0\cdot 1\cdot P(X=0, Y=0)+0\cdot 2\cdot P(X=0, Y=2)+1\cdot 0\cdot P(X=1, Y=0)+\ldots$

$=0\cdot 0\cdot (26/52)\cdot (25/51)+0\cdot 1\cdot 2 \cdot (13/52)\cdot (26/ 51)+0\cdot 2 \cdot (13/52)\cdot (12/51) +1\cdot 0\cdot 2\cdot (13/52)\cdot (26/ 51)+\ldots $


The correlation coefficient is

$Corr(X,Y)=\frac{Cov(X,Y)}{\sqrt{Var(X)\cdot Var(Y)}}$

with $Var(X)=\sum_{x=0}^2 P(X=x)\cdot (x-\mu_x)^2$


enter image description here

callculus42
  • 30,550
  • I kind of did the same thing but the answer is not matching i am getting the answer as Covariance = -0.03 but the correct answer is Covariance = -0.123 – Prabir Acharya Jul 07 '16 at 19:10
  • @PrabirAcharya I will be back in 3 hours. I´m focused on the Semi-final of the euro cup at the moment. – callculus42 Jul 07 '16 at 19:14
  • @PrabirAcharya Oh I missed that your table wasn´t right for three value. You can draw heart ($H$) and no club and no heart ($X$) in two ways $HX$ and $XH$. Similar situation if you draw one heart and one club: $HC$ and $CH$. Thus you have to multiply the corresponding probabilities by two. I have made an edit and I have inserted the modified table. – callculus42 Jul 08 '16 at 00:15
  • 1
    The expected values are $\mu_x=\mu_y=0.5$ If you calculate the covariance the product of $x, y$ and $P(X=x,Y=y)$ is almost always $0$. Only at $x=y=1$ the result is not zero. Therefore the covariance is just $1\cdot 1\cdot 2\cdot (13/52)\cdot (13/51)-0.5^2=-0.12255\approx-0.123$ – callculus42 Jul 08 '16 at 01:06
  • 1
    thank you!! i got my mistake... really appreciate your help – Prabir Acharya Jul 08 '16 at 04:16
  • @PrabirAcharya You´re welcome. – callculus42 Jul 08 '16 at 04:22