I'm working through my probability textbook, and I think that the following is a typo, but I'm not sure. I'm asking because this result is quite important.
Let $X_1, X_2, \ldots$ be identically distributed random variables with common moment generating function $M$. Let $N$ be a random variable taking non-negative integer values with probability generating function $G$, and suppose $N$ is independent of the sequence $(X_i)$. Show that the random sum $S=\sum_{i=1}^{N}X_i$ has moment generating function $M_S(t)=G(M(t))$.
I can prove this if $X_1, X_2, \ldots$ are independent and identically distributed random variables, and I think the statement is not (necessarily) true if they are dependent. Am I right and is this a typo, or is the statement also true if $X_1, X_2, \ldots$ are possibly dependent? And if so, why? Because for the case of a random sum of discrete random variables we need independence, according to my textbook. Thanks in advance!