I'm struggling a bit probability generating functions, more specifically to find the PGF of $Z = \sum_{i=1}^{N} X_i$ where $N \sim poi(\lambda)$ and $X_1, X_2, ... \sim Bernoulli(p)$
I don't really know how to begin solving this problem, my first thought was to just take the expected value of $poi(\lambda)$ which is $\lambda$ and use that as my N, but that does not feel like the correct way. I cant really see how I am supposed to use the Bernoulli in this.
Would anyone like to help me solve this?
Thanks!
If $N$ is a nonnegative integer-valued random variable with probability generating function $P_N(s)$ and $X_n$ a sequence of i.i.d. nonnegative integer-valued random values independent of $N$ with probability generating function $P_{X_1}(s)$, then the random sum $$ S_N := \sum_{i=1}^N X_i $$ has probability generating function given by the composition $P_{S_N}(s) = P_N(P_{X_1}(s))$ - it is a good exercise to show this if you have not already.
In this case, $N\sim\mathsf{Pois}(\lambda)$ so $$ \mathbb E[s^N] = \sum_{k=0}^\infty e^{-\lambda}\frac{\lambda^k}{k!}s^k = e^{\lambda(s-1)} $$ and $X_1\sim \mathsf{Ber}(p)$ so $$ \mathbb P_{X_1}(s)) = 1-p + ps = 1-p(1-s). $$ It follows that $$ P_{S_N}(s) = e^{\lambda((1-p(1-s))-1)}. $$