Distribution of a Random Sum The following experiment is performed: An observation is made of a Poisson random variable $N$ with parameter $ \lambda $. Then $N$ independent Bernoulli trials are performed, each with probability $p$ of success. Let $Z$ be the total number of successes observed in the $N$ trials. What is the distribution of $Z$? 
My attempt:
So I managed to work out $E(Z) = \lambda p$ and $V(Z) = \lambda p(1-p) + p^{2} \lambda$. I'm not sure how to proceed to get the distribution of $Z$. Assistance would be appreciated. 
 A: What you have is a hierarchical setup. You have a distribution of $Z$ given $N$ available, but you don't have the marginal distribution of $Z$, which is what you're interested in. Note that $Z|N$ is a Binomial distribution by definition So
$$Z \mid N \sim Binomial(N, p) \text{ and }$$
$$N \sim Poisson(\lambda) $$
First, let's verify your calculations using law of iterated expectations
\begin{align*}
E[Z] & = E[E[Z|N]]\\
& = E[Np]\\
& = p\lambda
\end{align*}
Similarly,
\begin{align*}
Var(Z) & = Var(E(Z|N)) + E(Var(Z|N))\\
& = Var(Np) + E(Np(1-p))\\
& = p^2\lambda + \lambda p(1-p)\\
& = \lambda p.
\end{align*}
Notice that the variance and mean of $Z$ are exactly the same. This suggests, that $Z$ may be Poisson distributed! But we can prove this directly too.
Note that to obtain the marginal distribution, you must write down the joint distribution of $(Z,N)$ and integrate out $N$. That is
\begin{align*}
P(Z = z) &= \sum_{n=0}^{\infty} P(Z = z, N = n)\\
& = \sum_{n=0}^{\infty} P(Z = z \mid N = n) P(N = n)\\
& = \sum_{n=0}^{\infty} \dfrac{n!}{z! (n-z)!}p^z (1-p)^{n-z} \cdot \dfrac{\lambda^n e^{-\lambda}}{n!}
\end{align*}
At this point, work through the math and find out what the final answer will be taking help from this link.
A: That's more a hint than a formal proof.
Let's start with N. N is a Poisson variable. Therefore, there is a Poisson process whose count is N. That Poisson process has an average of $\lambda$ events per time unit.
If we don't count all successes but each one has an (independent) probability $p$ of being counted, we still have a Poisson process, but now its average will be $\lambda·p$. Please notice that the result of this process will yield the same result as the definition of $Z$: after each observation of $N$ (e.g. after each unit time) we decide randomly to keep each event with probability $p$.
Therefore, $Z$ is a Poisson variable with average $\lambda·p$.
