Solution (source code)

= Solution

For the <exponential distribution> of mean $\mu$, $M_X(t)=(1-\mu t)^{-1}$. Substitution into the <geometric-sum moment-generating function> gives
$$
M_S(t)=\frac{p}{p-\mu t}\qquad(t<p/\mu).
$$
This is the <moment-generating function> of an <exponential distribution> with rate $p/\mu$. By the <uniqueness theorem for moment-generating functions>, the <geometric sum of exponential variables> therefore has <probability density function>
$$
\boxed{f_S(s)=\frac p\mu e^{-ps/\mu}\quad(s>0),\qquad f_S(s)=0\quad(s<0).}
$$
Its <expected value> is $\mu/p$, agreeing with $\mathbb E[N]\mathbb E[X]=\mu/p$ in the <random sum of independent claims> formula.