<s>[INST] Your evil probability professor has an urn with 9 balls. Your evil probability professor has an urn with 9 balls:  2 red, 3 white and 4 blue.  He draws two balls from the urn without replacement.  Let X be the number of red balls drawn and Y the number of white balls.
a) Determine the joint probability mass function of X and Y. 
b) Are X and Y independent random variables? 
c) Compute the covariance between X and Y.  
For point A:  
$P(0,0)=\frac{4}{9} \cdot \frac{3}{8} = \frac{1}{6}$ That is correct for the solution. 
$P(0,1)=\frac{4}{9} \cdot \frac{3}{8} + \frac{3}{9} \cdot \frac{4}{8} = \frac{1}{3}$ That is correct for the solution. 
$P(1,0)=\frac{2}{9} \cdot \frac{4}{8} + \frac{4}{9} \cdot \frac{2}{8}= \frac{2}{9}$ That is correct for the solution.  
$P(1,1)=\frac{2}{9} \cdot \frac{3}{8} +  \frac{3}{9} \cdot \frac{2}{8}= \frac{1}{6}$  That is correct for the solution. 
$P(2,0)=\frac{2}{9} \cdot \frac{1}{8} = \frac{1}{36}$ That is correct for the solution. 
$P(0,2)=\frac{3}{9} \cdot \frac{2}{8} = \frac{1}{12}$ That is correct for the solution. 
For point B to check the independancy I have just to check if for example $P(X=0,Y=0) = P(X=0) \cdot P(Y=0)$. 
$\frac{1}{6} \neq (\frac{7}{9} \cdot \frac{6}{8}) \cdot (\frac{6}{9} \cdot \frac{5}{8})$. 
So X and Y are not independent. 
For point C I know that the covariance $Cov(X,Y)=E[X \cdot Y]-E[X]\cdot E[Y]$, but how can compute the expectations, do I have to figure put with distribution is? How can I do it?
Can someone help me?
Thanks in advance, Fabio!
 [/INST] Another way to check dependence (i.e. part B only) is that if $X,Y$ are independent then for any values $x,y$ we have $P(Y=y) = P(Y=y | X=x)$.  However, clearly if there are 2 red balls then there cannot be any white balls, i.e. $P(Y > 0) > 0$ but $P(Y > 0 | X=2) = 0$.  This might be a more intuitive example demonstrating dependence.
</s>