# Derivatives of PGF of Binomial Distribution

## Theorem

Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.

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

$\dfrac {\mathrm d^k} {\mathrm ds^k} \Pi_X \left({s}\right) = \begin{cases} n^{\underline k} p^k \left({q + ps}\right)^{n-k} & : k \le n \\ 0 & : k > n \end{cases}$

where:

$n^{\underline k}$ is the falling factorial
$q = 1 - p$

## Proof

$\Pi_X \left({s}\right) = \left({q + ps}\right)^n$

where $q = 1 - p$.

$\dfrac {\mathrm d^k} {\mathrm d s^k} \left({f \left({q + ps}\right)}\right) = p^k \dfrac {\mathrm d^k} {\mathrm d z^k} \left({f \left({z}\right)}\right)$

where $z = q + ps$.

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

$\dfrac {\mathrm d^k} {\mathrm d z^k} z^n = \begin{cases} n^{\underline k} z^{n-k} & : k \le n \\ 0 & : k > n \end{cases}$

So putting it together:

$\dfrac {\mathrm d^k} {\mathrm d s^k} \Pi_X \left({s}\right) = \begin{cases} n^{\underline k} p^k \left({q + ps}\right)^{n-k} & : k \le n \\ 0 & : k > n \end{cases}$

$\blacksquare$