Probability Generating Functions
The probability generating function (PGF) is a tool for working with discrete random variables that take non-negative integer values. It encodes the entire probability distribution and provides elegant methods for finding means, variances, and distributions of sums.
Definition
For a discrete random variable X taking values 0,1,2,…, the PGF is:
GX(t)=E(tX)=∑r=0∞P(X=r)⋅tr
This is a power series in t, where the coefficient of tr is P(X=r).
Recovering Probabilities
The probabilities can be recovered from the PGF:
P(X=r)=r!GX(r)(0)
In particular:
- P(X=0)=GX(0)
- P(X=1)=GX′(0)
- P(X=2)=GX′′(0)/2
Also, GX(1)=∑P(X=r)=1 (always).
Standard PGFs
| Distribution | PGF GX(t) |
|---|
| Bernoulli(p) | 1−p+pt=q+pt |
| B(n,p) | (q+pt)n |
| Geometric(p) (starting from 1) | 1−qtpt, $ |
| Po(λ) | eλ(t−1) |
Derivation for Poisson:
GX(t)=∑r=0∞r!e−λλrtr=e−λ∑r=0∞r!(λt)r=e−λ⋅eλt=eλ(t−1)
Finding the Mean Using the PGF
E(X)=GX′(1)
Proof:
GX′(t)=∑r=1∞r⋅P(X=r)⋅tr−1
GX′(1)=∑r=1∞r⋅P(X=r)=E(X)
Finding the Variance Using the PGF
E(X(X−1))=GX′′(1)
Since E(X(X−1))=E(X2)−E(X):
E(X2)=GX′′(1)+GX′(1)
Var(X)=GX′′(1)+GX′(1)−(GX′(1))2
Worked Example: Poisson PGF
GX(t)=eλ(t−1)
GX′(t)=λeλ(t−1)⟹GX′(1)=λ⟹E(X)=λ
GX′′(t)=λ2eλ(t−1)⟹GX′′(1)=λ2
Var(X)=λ2+λ−λ2=λ
Confirming the Poisson property: mean = variance = λ.
PGF of a Sum of Independent Variables
If X and Y are independent, then:
GX+Y(t)=GX(t)⋅GY(t)
Application: Prove that B(n1,p)+B(n2,p)=B(n1+n2,p) for independent binomials with the same p.
GX+Y(t)=(q+pt)n1⋅(q+pt)n2=(q+pt)n1+n2