# Derivatives of PGF of Shifted Geometric Distribution

## Theorem

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

Then the derivatives of the PGF of $X$ with respect to $s$ are:

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

where $q = 1 - p$.

## Proof

$\Pi_X \left({s}\right) = \dfrac {p s} {1 - q s}$

where $q = 1 - p$.

First we need to obtain the first derivative:

 $\displaystyle \Pi'_X \left({s}\right)$ $=$ $\displaystyle \frac {\mathrm d} {\mathrm d s} \left({\frac {p s} {1 - q s} }\right)$ $\displaystyle$ $=$ $\displaystyle p s \frac {\mathrm d} {\mathrm d s} \left({\frac 1 {1 - q s} }\right) + \frac 1 {1 - q s} \frac {\mathrm d} {\mathrm d s} \left({p s}\right)$ Sum Rule for Derivatives $\displaystyle$ $=$ $\displaystyle \frac {p q s} {\left({1 - q s}\right)^2} + \frac p {1 - q s}$ LHS is first derivative of PGF of Geometric Distribution $\displaystyle$ $=$ $\displaystyle \frac {p q s + p \left({1 - q s}\right)} {\left({1 - q s}\right)^2}$ $\displaystyle$ $=$ $\displaystyle \frac p {\left({1 - q s}\right)^2}$ after some algebra
$\dfrac {\mathrm d^n} {\mathrm d s^n} \left({f \left({1 - q s}\right)}\right) = \left({-q}\right)^n \dfrac {\mathrm d^n} {\mathrm d z^n} \left({f \left({z}\right)}\right)$

where $z = 1 - q s$.

Here we have that:

$f \left({z}\right) = p \dfrac 1 {z^2}$
$\dfrac {\mathrm d^{n - 1} } {\mathrm d z^{n - 1} } \dfrac 1 {z^2} = \dfrac {\left({-1}\right)^{n - 1} 2^{\overline {n - 1} } } {z^{\left({n - 1}\right) + 2} }$

where $\overline {n-1}$ denotes the rising factorial.

Note that we consider the $n-1$th derivative because we have already taken the first one.

Also note that $2^{\overline {n - 1}} = 1^{\overline {n - 1} } = \left({n - 1}\right)!$

So putting it together:

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

whence (after algebra):

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

$\blacksquare$