# Find the probability generating function of $Z=\sum_{i=1}^{N}X_i.$

Let $$X_1,X_2,...$$ be a sequence of i.i.d Bernoulli random variables with parameter $$p$$. Let $$N$$ be a Poisson random variable with with parameter $$\lambda$$ which is independet of the $$X_i.$$

(a) Find the probability generating function of $$Z=\sum_{i=1}^{N}X_i.$$

(b) Use (a) to identify the distribution of $$Z$$.

The pgf of a sum of i.i.d random variables is the product of their respective pgf's so:

$$G_Z(s)=G_{X_1}(s)\cdot G_{X_2}(s)\cdot...\cdot G_{X_N}(s),$$

and sice the $$X_{i}$$ are Bernoulli distributed with parameter $$p$$ we have that

$$G_Z(s)=(1-p+ps)^N.$$

I'm not sure how to proceed from here. I can't express my $$G_Z(s)$$ in terms of a random variable, so what should I do with the $$N$$?

Long story short, it ends up being the expectation of what you have written. But you should start from scratch and try to use the tower property by conditioning on $$N$$ to formalize all this.
$$G_Z(s) = E[s^Z] = E[E[s^Z \mid N]] = E[E[s^{X_1} \cdots s^{X_N} \mid N]] = E[(1-p+ps)^N]= e^{\lambda p(s-1)}.$$ It remains to identify the final PGF.
• Based on what you have written, $s^Z = G_{X_1}(s)...G_{X_N}(s).$ Why is this? Jan 4, 2019 at 17:30
• @Parseval conditioned on $N$ (loosely, "when $N$ is fixed"), you may use the "PGF of sum of independent RVs is product of PGFs" result that you stated Jan 4, 2019 at 17:37
• Yes, but according to the book, that proposition is $$G_Z(s)=G_{X_1}(s)...G_{X_n}(s)$$ and not $$s^Z=G_{X_1}(s)...G_{X_n}(s).$$ I'm probably misunderstanding something. Jan 4, 2019 at 17:55
• @Parseval: Once you take out $e^{-\lambda}$, what remains is a power series of $e^x$ where $x=(1-p+ps)\lambda$. Then it all simplifies to what you want. Jan 4, 2019 at 20:02