# Joint probability mass function problem

So the question asks: An urn contains three balls (green,red,and blue)and three marbles(green,red,and blue). James draws two objects from the urn randomly. Let $X$ be number of green objects let $Y$ be the number of balls that were drawn. Calculate the joint probability mass function of $pX,Y (x, y)$

So so far I have: There are 3 possible outcomes of $X$ i.e {0,1,2} where by he can pick none, one or two greens objects; and similarly for Y there are 3 possible outcomes {0,1,2} i.e. none, one or two balls.

And I have the joint probability mass function : $$\dfrac {\binom{2}{x}\binom{4}{2-x}\binom{3}{y}\binom{3}{2-y}}{\binom{6}{2}}$$

But is it correct?

• I would do them one at a time until things become clear. For example, let's look at $x=2$, $y=2$. That can't happen. The formula does not agree. Commented Mar 3, 2016 at 23:57

$X$ is the count of green objects, $Y$ is the count of balls.
Then the margarine probabilities are:$$\Pr (X=x) = \dfrac{\binom 2 x ~ \binom 4 {2-x}}{\binom 6 2}~\mathbf 1_{x\in\{0,1,2\}}\\ \Pr(Y=y) = \dfrac{\binom 3 y ~ \binom 3 {2-y}}{\binom 6 2}~\mathbf 1_{y\in\{0,1,2\}}$$
Let $Z\in\{0,1\}$ be the count of green balls drawn.   Use Total Probability partitioned on whether a green ball is drawn or not.   Then consider ways to pick from the 1 green ball, 1 green marbles, 2 not-green balls, and 2 not-green marbles.
$$\Pr(X=x, Y=y) = \Pr(Z=0, X=x, Y=y) + \Pr(Z=1, X-Z=x-1, Y-Z=y-1) \\ =\frac{\binom{1}{0}\binom{1}{?}\binom{2}{?}\binom{2}{?}}{\binom 6 2}\mathbf 1_{x\in\{0,1\}, y\in\{0,1,2\}, x+y\leq 2}+\frac{\binom{1}{1}\binom{1}{?}\binom{2}{?}\binom{2}{?}}{\binom 6 2}\mathbf 1_{x\in\{1,2\},y\in\{1,2\}, x+y\leq 3}$$