The Probability Generating Function

A Transform Tailored to Counting

For random variables that take values in {0,1,2,…}\{0, 1, 2, \ldots\} β€” the number of arrivals in a time slot, the number of errors in a codeword, the population size in a branching process β€” there is a transform even more natural than the MGF. The probability generating function encodes the entire PMF as the coefficients of a power series, and its algebraic properties make it the ideal tool for compound sums and branching processes.

Definition:

Probability Generating Function (PGF)

Let XX be a random variable taking values in {0,1,2,…}\{0, 1, 2, \ldots\} with PMF pX[i]=P(X=i)p_X[i] = \mathbb{P}(X = i). The probability generating function of XX is

GX(s)=βˆ‘i=0∞pX[i] si=E[sX],s∈C.G_X(s) = \sum_{i=0}^{\infty} p_X[i]\,s^i = \mathbb{E}[s^X], \qquad s \in \mathbb{C}.

The series converges absolutely for ∣sβˆ£β‰€1|s| \leq 1 (since βˆ‘βˆ£pX[i]βˆ£β€‰βˆ£s∣iβ‰€βˆ‘pX[i]=1\sum |p_X[i]|\,|s|^i \leq \sum p_X[i] = 1).

The PGF connects to the other transforms: GX(et)=MX(t)G_X(e^t) = M_X(t) and GX(eju)=Ο•X(u)G_X(e^{ju}) = \phi_X(u). Also, GX(0)=pX[0]G_X(0) = p_X[0] and GX(1)=1G_X(1) = 1.

Probability Generating Function (PGF)

For a nonnegative integer-valued RV XX: GX(s)=E[sX]=βˆ‘i=0∞pX[i] siG_X(s) = \mathbb{E}[s^X] = \sum_{i=0}^{\infty} p_X[i]\,s^i. The PMF is recovered via pX[i]=GX(i)(0)/i!p_X[i] = G_X^{(i)}(0)/i!.

Related: Moment Generating Function (MGF), Characteristic Function

Theorem: Moments and Factorial Moments from the PGF

Let GX(s)G_X(s) be the PGF of XX. Then:

  1. E[X]=GXβ€²(1)\mathbb{E}[X] = G_X'(1).
  2. The kk-th factorial moment is E[X(Xβˆ’1)β‹―(Xβˆ’k+1)]=GX(k)(1)\mathbb{E}[X(X-1)\cdots(X-k+1)] = G_X^{(k)}(1).
  3. Var(X)=GXβ€²β€²(1)+GXβ€²(1)βˆ’[GXβ€²(1)]2\text{Var}(X) = G_X''(1) + G_X'(1) - [G_X'(1)]^2.

PGFs of Common Discrete Distributions

DistributionGX(s)G_X(s)E[X]\mathbb{E}[X]Var(X)\text{Var}(X)
Constant X=cX = cscs^ccc00
Bernoulli(p)\text{Bernoulli}(p)1βˆ’p+ps1-p+psppp(1βˆ’p)p(1-p)
Bin(n,p)\text{Bin}(n,p)(1βˆ’p+ps)n(1-p+ps)^nnpnpnp(1βˆ’p)np(1-p)
Geometric(p)\text{Geometric}(p)ps1βˆ’s(1βˆ’p)\frac{ps}{1-s(1-p)}1/p1/p(1βˆ’p)/p2(1-p)/p^2
Poi(Ξ»)\text{Poi}(\lambda)e(sβˆ’1)Ξ»e^{(s-1)\lambda}Ξ»\lambdaΞ»\lambda

Example: Sum of Independent Poisson Random Variables

Let X∼Poi(λ)X \sim \text{Poi}(\lambda) and Y∼Poi(μ)Y \sim \text{Poi}(\mu) be independent. Find the distribution of Z=X+YZ = X + Y.

Example: A Combinatorial Identity via PGF

Use probability generating functions to prove: βˆ‘i=0n(ni)2=(2nn)\sum_{i=0}^{n}\binom{n}{i}^2 = \binom{2n}{n}.

Quick Check

For a random variable XX with PGF GX(s)G_X(s), what does GX(0)G_X(0) equal?

P(X=0)\mathbb{P}(X = 0)

00

11

E[X]\mathbb{E}[X]