Show the result of the following infinite sum, based on a binomial random variable conditioned on a Poisson random variable

$$\sum_{n=0}^\infty \binom{n}{k}p^k(1-p)^{n-k}\frac{\lambda^ne^{-\lambda}}{n!} = \frac{(\lambda p)^ke^{-\lambda p}}{k!}$$

That is, given a random variable $X$ with Poisson distribution $X \sim \operatorname{Poisson}(\lambda)$, and, given $X = n$, random variable $Y$ is distributed by a binomial such that $Y \sim B(n,p): p \in [0,1]$. Given $n$, $P(Y = k|X = n) = \binom{n}{k}p^k(1-p)^{n-k}$. Given $\lambda$, $P(X=n) = \dfrac{\lambda^ne^{-\lambda}}{n!}$. Therefore, $P(Y = k|\lambda) = \sum_{n=0}^\infty P(Y = k | X = n)P(X = n | \lambda) = \sum_{n=0}^\infty \binom{n}{k}p^k(1-p)^{n-k}\dfrac{\lambda^ne^{-\lambda}}{n!}$. What properties and identities can be used to demonstrate the equality above?


A start: We want $\Pr(Y=k)$, so we should end up with an expression that involves $k$. Let $m=n-k$. Effectively we are summing from $m=0$ to $\infty$.

Take the terms that involve only $k$, $\lambda$, and $p$ to the outside, not forgetting that $\lambda^n=\lambda^{m+k}=\lambda^k\lambda^m$ and $\binom{m+k}{k}\cdot \frac{1}{(m+k)!}=\frac{1}{k!}\cdot\frac{1}{m!}$. The stuff that remains on the inside looks like $$\sum_{m=0}^\infty \frac{(\lambda(1-p))^m}{m!}.$$ From the familiar series expansion of $e^x$, we see that this sum is $e^{\lambda(1-p)}$.

Remark: The above approach is crudely computational. A much better conceptual justification has been given in the answer by Robert Israel.


Consider a "compound Poisson process": you have a Poisson process with rate $\lambda$, but each event, independently, is type A with probability $p$. Let $Y$ be the number of events of type A in the time interval $[0,1]$. Then $Y$ has a Poisson distribution with parameter $\lambda p$. This can be seen because the type A events form a Poisson process with rate $\lambda p$.