# Verifying independence for two Random Variables

Could you please give me some hints for the exercise below?

Suppose we toss a coin once and let $p$ be the probability of heads. Let $X$ denote the number of heads and let $Y$ denote the number of tails. I have to first show that

• $X$ and $Y$ are dependent

• and afterwards if we let $N\sim$Poisson $(\lambda)$ and toss the coin $N$ times, that $X$ and $Y$ are independent.

The first part follows from the fact that two events are disjoint if we toss the coin just once. For the second part, I can see that the vector $(X,Y)$ follows the multinomial distribution with paramemeters $N$, $p$, and $(1-p)$. Therefore:

$$P\left( X=x,Y=y,N=n \right)=\binom{n}{x\ \ y } p^x (1-p)^y \times \frac { e^{-\lambda}\lambda^n}{n!}$$

for $x+y=n$ and $x,y \geq 0$

I understand that the marginal distributions are binomial but I do not immediately see how I could proceed.

I would appreciate some advice here. Thank you.

• Have you obtained explicit formulas for the marginal distributions? If so, they will tell you what the joint distribution of $(X,Y)$ should look like assuming independence. How does that compare to the distribution you have? Alternatively, can you write $P(x,y)$ ($n$ is not an argument because it depends on $x$ and $y$) as a product of a factor depending only on $x$ and another factor depending only on $y$? – whuber Jul 24 '14 at 17:35
• @whuber Thank you. I realised that this joint pmf can be factored as a product of two nonnegative functions involving $X$ and $Y$ respectively, which is both a necessary and sufficient condition for independence. That way, though I do not see the role $N$ plays, is that important? Also, $X$ is binomial with parameters $N$ and $p$ and $Y$ is binomial with $N$ and $1-p$. Should I then find the product $P(X=x,N=n) \times P(Y=y,N=n)?$ – JohnK Jul 24 '14 at 17:46
• There is no "$n$" in any of the formulas after you replace it with "$x+y$". – whuber Jul 24 '14 at 19:13
• @whuber Indeed, thank you. But now unless I am mistaken the support of either $X$ or $Y$ is all $\mathbb{Z_+}$, yes? – JohnK Jul 24 '14 at 19:46

Since you already see one solution, another solution is to apply the coloring theorem for Poisson processes, which tells you that $X$ and $Y$ are independently Poisson distributed with rates $p\lambda$ and $(1-p)\lambda$.