Below is a problem I did. However, I did not come up with the answer in book. I am hoping somebody can point out what I did wrong or that the book is wrong.
Let $Y = aX + b$. Express the probability generating function of $Y$, $G_Y(z)$ in terms of the probability generating function of $X$, $G_X(z)$.
Answer:
\begin{eqnarray*} G_Y(z) &=& E(z^Y) = E(z^{aX+b}) = E(z^b z^{aX}) = z^b E(z^{aX}) \\ G_X(x) &=& E(z^x) \\ G_X(ax) &=& E(z^{ax}) \\ G_Y(z) &=& z^b G_X(ax) \\ \end{eqnarray*} However, the book gets: \begin{eqnarray*} G_Y(z) &=& z^a G_X(z^b) \\ \end{eqnarray*}
The reason why $$\operatorname{E}[z^{a X}] \ne G_X(ax)$$ is because $X$ is a random variable over which the expectation is taken. The generating function cannot be a function of a realization of $X$. Notice that when we write $$G_X(z) = \operatorname{E}[z^X],$$ the $X$ is random and the function on the LHS is a function of $z$. So if you modify the RHS expectation to $$\operatorname{E}[z^{a X}],$$ this should now be a function of $a$ and $z$, not $a$ and $X$. Since $$\operatorname{E}[z^{a X}] = \operatorname{E}[(z^a)^X],$$ the substitution $u = z^a$ clearly makes the RHS equal to $G_X(u) = G_X(z^a)$.