PGF of sum of RVs is a composition of PGFs Let $\\\{X_n\\\}$ be a sequence of i.i.d. random variables whose
values are non-negative integers. Let $N$ be a random variable that is independent of $\\\{X_n\\\}$. $N$'s values are also non-negative integers. Let $S_N = \sum_{i = 1}^N X_i$.
Show that $P_{S_N}(z) = P_N(P_X(z)), z \in [0, 1]$.
$P_{S_N}(z) = \Pi_{i = 1}^N\sum_{x = 0}^{\infty} z^xP(X_i = x)$
$P_N(P_X(z)) = \sum_{x = 0}^{\infty} P_X(z)^x\frac{1}{x!}P_N(x)$
One side has a product of sums; the other is just a sum and I'm stuck. Could I please have some suggestions?

Conditional on $N=n$, using the fact that $X_1,X_2,\dots$ are independent and the definition of the the probability generating function (pgf),
\begin{align}
P_{S_N|N=n}(z)&=E(z^{S_N}|N=n) 
\\&=E(z^{X_1+X_2+\dots+X_n}|N=n)
\\&=Ez^{X_1}Ez^{X_2}\cdots Ez^{X_n} 
\\&=P_X(z)^n.
\end{align}
Hence, using the law of total expectation, and again, the definition of the pgf
\begin{align}
P_{S_N}(z)&=E(z^{S_N})
\\&=EE(z^{S_N}|N)
\\&=EP_X(z)^N
\\&=P_N(P_X(z)). 
\end{align}
