# Probability generating function of a Poisson sum of logarithmic-distributed random variables.

This is exercise 5.2.3 (b) from One Thousand Exercises in Probability by Grimmett and Stirzaker:

Let $$X_1,X_2,\ldots$$ be independent identically distributed random variables with the logarithmic mass function $$f(k) = \frac{(1-p)^k}{k\log(1/p)},\quad k\geqslant 1,$$ where $$0. If $$N$$ is independent of the $$X_i$$ and has the Poisson distribution with parameter $$\mu$$, show that $$Y=\sum_{i=1}^N X_i$$ has a negative binomial distribution.

I computed the probability generating function of $$X_1$$: $$P_X(s) := \mathbb E[s^{X_1}] = \sum_{k=1}^\infty \frac{((1-p)s)^k}{k\log(1/p)} = \frac{\log(1-s(1-p)}{\log p},$$ and it is known that the probability generating function of $$N$$ is $$P_N(s)=e^{\mu(s-1)}$$. So the probability generating function of $$Y$$ is given by the composition $$P_N\circ P_X$$: \begin{align} P_Y(s) &= P_N(P_X(s))\\ &= P_N\left(\frac{\log(1-s(1-p)}{\log p}\right)\\ &= e^{\mu\left(\left(\frac{\log(1-s(1-p)}{\log p}\right)-1\right)}.\tag1 \end{align} The solution provided writes this in the form $$G_Y(s) = \left(\frac p{1-s(1-p)} \right)^{-\mu/\log p}.\tag2$$ I don't see how $$(1)$$ is equivalent to $$(2)$$; any hints?

$$e^{\mu\left(\left(\frac{\log(1-s(1-p))}{\log p}\right)-1\right)} = e^{\frac{\mu}{\log p} \left( \log(1-s(1-p))-\log p\right)} = e^{\frac{\mu}{\log p} \left(\log\left(\frac{1-s(1-p)}{p}\right)\right)} = e^{\log\left(\left(\frac{1-s(1-p)}{p}\right)^{\frac{\mu}{\log p}}\right)} = \left(\frac{1-s(1-p)}{p}\right)^{\frac{\mu}{\log p}} = \left(\frac{p}{1-s(1-p)}\right)^{-\frac{\mu}{\log p}}$$