Probability Generating, Moment Generating, and Characteristic Functions

Three ways to encode a distribution that turn sums of independent variables into products.

Draft — not yet reviewed by the site owner.

Prerequisites: Random Variables, Expected Value, Statistical Independence.

A probability transform packages a random variable’s whole distribution into a function. The main reason to do this is that the transform of a sum of independent random variables is a product. Multiplication is often easier than directly finding every way a sum can occur.

Why a sum is difficult

If XX and YY are counts, X+Y=3X+Y=3 can arise from (0,3)(0,3), (1,2)(1,2), (2,1)(2,1), or (3,0)(3,0). Finding its probability requires adding the probabilities of all those cases. For larger sums, this becomes cumbersome. A transform encodes all those possibilities in one function, then lets algebra do the bookkeeping.

For a nonnegative integer-valued XX, its probability generating function (PGF) is

GX(t)=E[tX]=∑k=0∞P(X=k)tk,G_X(t)=E[t^X]=\sum_{k=0}^{\infty}P(X=k)t^k,

for values of tt where the sum converges; at least 0≤t≤10\le t\le1 works. The coefficient of tkt^k is exactly P(X=k)P(X=k). For independent counts XX and YY,

GX+Y(t)=E[tX+Y]=E[tXtY]=GX(t)GY(t).G_{X+Y}(t)=E[t^{X+Y}]=E[t^Xt^Y]=G_X(t)G_Y(t).

The last equality uses independence. Without it, the product rule need not hold.

A coin-toss example

Let XX equal 1 for heads and 0 for tails, with P(X=1)=pP(X=1)=p. Its PGF is GX(t)=(1−p)+ptG_X(t)=(1-p)+pt. For nn independent tosses, the number of heads Sn=X1+⋯+XnS_n=X_1+\cdots+X_n has

GSn(t)=((1−p)+pt)n.G_{S_n}(t)=\big((1-p)+pt\big)^n.

Expanding this expression gives the binomial distribution: the coefficient of tkt^k is (nk)pk(1−p)n−k\binom{n}{k}p^k(1-p)^{n-k}. We found a distribution by recognizing its transform, without counting each sum from scratch.

Three transforms, three uses

Transform Definition When it is useful
PGF GX(t)G_X(t) E[tX]E[t^X] For nonnegative integer counts; coefficients give probabilities.
MGF MX(t)M_X(t) E[etX]E[e^{tX}] When finite for all tt in an interval around 0; derivatives there give moments.
Characteristic function ϕX(t)\phi_X(t) E[eitX]E[e^{itX}], where i2=−1i^2=-1 Exists for every real-valued random variable; useful for sums and convergence.

For the moment generating function (MGF), MX′(0)=E[X]M_X'(0)=E[X] and MX′′(0)=E[X2]M_X''(0)=E[X^2] when the MGF exists near zero. The characteristic function uses a complex exponential; its absolute value is always at most 1, which is why the expectation always exists. Each transform determines the distribution under its stated conditions. You do not need complex numbers to understand the shared idea: all three convert an independent sum to a product.

An MGF need not exist near zero. A distribution with sufficiently heavy tails can make E[etX]E[e^{tX}] infinite for positive tt. The characteristic function still exists, but its derivatives need not exist if the corresponding moments are absent.

A random number of terms

Suppose NN is a nonnegative integer count, independent of iid counts X1,X2,…X_1,X_2,\ldots, and SN=X1+⋯+XNS_N=X_1+\cdots+X_N (with S0=0S_0=0). Given N=nN=n, the PGF of the sum is GX(t)nG_X(t)^n. Averaging over NN gives

GSN(t)=E[GX(t)N]=GN(GX(t)).G_{S_N}(t)=E[G_X(t)^N]=G_N(G_X(t)).

For example, if NN is Poisson with mean λ\lambda and each XiX_i is Bernoulli with success probability pp, then GN(t)=eλ(t−1)G_N(t)=e^{\lambda(t-1)} and GX(t)=1−p+ptG_X(t)=1-p+pt. Substituting yields

GSN(t)=eλp(t−1).G_{S_N}(t)=e^{\lambda p(t-1)}.

That is the PGF of a Poisson count with mean λp\lambda p: independently keeping each of a Poisson number of items with probability pp gives another Poisson count. The composition formula needs NN to be independent of the XiX_i; a stopping rule based on their values changes the problem.

Further reading