Derivatives of PGF of Geometric Distribution

Theorem
Let $X$ be a discrete random variable with the geometric distribution with parameter $p$.

Then the derivatives of the PGF of $X$ w.r.t. $s$ are:


 * $\dfrac {d^n} {ds^n} \Pi_X \left({s}\right) = \dfrac {q p^n n!} {\left({1 - ps}\right)^{n+1}}$

where $q = 1 - p$.

Proof
The Probability Generating Function of Geometric Distribution is:
 * $\Pi_X \left({s}\right) = \dfrac q {1 - ps}$

where $q = 1 - p$.

From Derivatives of Function of $a x + b$, we have that:
 * $\dfrac {d^n} {ds^n} \left({f \left({1 - ps}\right)}\right) = \left({-p}\right)^n \dfrac {d^n} {dz^n} \left({f \left({z}\right)}\right)$

where $z = 1 - ps$.

Here we have that $f \left({z}\right) = \dfrac q z$.

From Nth Derivative of Reciprocal of Mth Power:
 * $\dfrac {d^n} {dz^n} \frac q z = q \dfrac {d^n} {dz^n} \frac 1 z = q \dfrac {\left({-1}\right)^n n!} {z^{n + 1}}$

where $n!$ denotes $n$ factorial.

So putting it together:
 * $\dfrac {d^n} {ds^n} \Pi_X \left({s}\right) = q \left({-p}\right)^n \dfrac {\left({-1}\right)^n n!} {\left({1 - ps}\right)^{n + 1}}$

whence (after algebra):
 * $\dfrac {d^n} {ds^n} \Pi_X \left({s}\right) = \dfrac {q p^n n!} {\left({1 - ps}\right)^{n+1}}$