# Binomial random variable with number of trials being a Poisson random variable

Let $Y$ be the number of heads in a an $X$ toss sequence of flipping a coin with probability $p$ of heads. Show that $Y \sim \mathrm{Pois}(p \lambda)$ if $X \sim \mathrm{Pois}(\lambda)$.

-
This looks a lot like homework, and if so, please add the homework tag. Hint: Use the law of total probability to calculate $P\{Y = k\}$ from $P\{Y = k\mid X = n\}$ and the known values of $P\{X = n\}$. –  Dilip Sarwate Feb 19 '13 at 13:54
Sure. Right, so that's what I have been doing, but it's not obvious. –  darksky Feb 19 '13 at 13:56
Further hint: Can you tell what is the value of $P\{Y=10\mid X = 4\}$? How about $P\{Y=10\mid X=15\}$? You will need to use the fact that for a specific $k$, $P\{Y=k\mid X=n\}$ is zero for some choices of $n$, cancel some factorial terms in the rest, and sum a series. –  Dilip Sarwate Feb 19 '13 at 14:02

Note that $Y\mid X=x\sim\mathrm{bi}(x,p)$ for $x=0,1,\ldots$ and so $$P(Y=k\mid X=x)=\binom{x}{k}p^k(1-p)^{x-k},\quad k=0,\ldots,x.$$ Thus $$P(Y=k)=\sum_{x=k}^\infty P(Y=k\mid X=x)P(X=x)=\sum_{x=k}^\infty\frac{x!}{k!(x-k)!}p^k(1-p)^{x-k}\frac{\lambda^x}{x!}e^{-\lambda},$$ which by letting $x!$ cancel out we can write as $$\frac{p^k}{k!}e^{-\lambda}\sum_{x=k}^\infty \frac{1}{(x-k)!}(1-p)^{x-k}\lambda^x.$$ Now write $\lambda^x$ as $\lambda^{x-k}\lambda^k$ and do a change of index so the sum starts at $x=0$. Then you should end up with $$\frac{(p\lambda)^k}{k!}e^{- p\lambda}.$$

-
Well, your expression is actually incorrect. It should be $e^{- \lambda}$ –  darksky Feb 19 '13 at 14:27
@darksky: You're right. I edited it, and it should be correct now. –  Stefan Hansen Feb 19 '13 at 14:32
Can you please show some outline of the steps needed to go from second to the third line? –  darksky Feb 19 '13 at 14:34
@darksky The sum can be written as $$e^{-\lambda}{p^k\lambda^k\over k!}\sum_{j=0}^\infty {\bigl[((1-p)\lambda\bigr]^j\over j!}.$$(First cancel the $x!$. Then factor out $p^k e^{-\lambda}/k!$ and change indices in the sum.) –  David Mitra Feb 19 '13 at 14:35
Thanks David! This is what I needed help with. –  darksky Feb 19 '13 at 14:39

It is easiest to use probability generating functions $\mathcal{P}_Z(t) = \sum_{m=0}^\infty t^m \mathbb{P}\left(Z=m\right) = \mathbb{E}\left(t^Z\right)$. The probability generating function of a binomial random variable equals $\left(1-p + p t \right)^n$. Thus: $$\mathcal{P}_Y(t) = \mathbb{E}\left(t^Y\right) = \mathbb{E}\left(\mathbb{E}\left(t^Y|X\right)\right) = \mathbb{E}\left( (1-p+t p)^X\right) = \mathcal{P}_X(1-p+ t p) = \exp\left(\lambda \left( \left(1-p + t p \right) -1 \right) \right) = \exp\left(\lambda p (t-1) \right)$$ The latter is the probability generating function of $\operatorname{Poi}\left(\lambda p \right)$.

-
Unfortunately, we haven't learned probability generating functions yet. –  darksky Feb 19 '13 at 14:22