A fair die is rolled, and then a coin with probability p of Heads is flipped as many times
as the die roll says, e.g., if the result of the die roll is a 3, then the coin is flipped 3
times. Let X be the result of the die roll and Y be the number of times the coin lands
Heads.
(a) Find the joint PMF of X and Y . Are they independent?
(b) Find the marginal PMFs of X and Y .
(c) Find the conditional PMFs of Y given X=x and of Y given X=x.