Solution (source code)

= Solution

The <expected value> is the derivative of the <probability generating function> at one. The expression from part (ii) gives
$$
\boxed{\mathbb EX=G_X'(1)=\frac p{p^2}=\frac1p.}
$$
Its finiteness also follows directly from the exponentially decaying geometric probabilities.