Solution (source code)

= Solution

For $0\leq s\leq1$, condition on $N=n$. Its <independence> from the $X_i$ preserves their independent common <distribution>, so part (ii) gives
$$
\mathbb E[s^Y\mid N=n]=[G_X(s)]^n.
$$
For $n=0$, this is $1$, agreeing with $Y=0$. By the <law of total expectation>,
$$
G_Y(s)=\sum_{n=0}^{\infty}\mathbb P(N=n)[G_X(s)]^n
=\boxed{G_N(G_X(s))}.
$$
This proves the <probability generating function of an independent random sum>. For nonnegative $s$ outside $[0,1]$, the same argument is valid whenever the right side is finite, by <Tonelli's theorem> for nonnegative sums. For signed or complex $s$, a sufficient absolute-convergence condition is $G_N(G_X(|s|))<\infty$; it holds automatically on $|s|\leq1$. Outside this domain, mere evaluation of an analytically extended expression is not a substitute for existence of the <probability generating function>.