Probability generating functions

Definition (probability generating function) open_in_new

Let $X$ be a random variable with values in $\Z^+ = \set{0,1,2,\ldots}$.

The probability generating function of $X$ is given by the power series $$ G_X(t) = \expect(t^X) = \fsum n0\infty \prob(X=n)\, t^n. $$

Lemma (generating function of sum of independent random variables) open_in_new

Let $X,Y$ be independent random variables with values in $\Z^+$. Then "generating functions turn convolutions into products": $$ G_{X+Y}(t) = G_X(t)\, G_Y(t). $$

Proof

Lemma (generating function of random sums) open_in_new

Let $N, X, X_1, X_2, X_3,\ldots$ be non-negative integer-valued independent random variables, and suppose $X,X_1,X_2,X_3,\ldots$ are identically distributed. Define the random sum $$ S_N = \fsum n1N X_n. $$

Then $$ G_{S_N} = G_N \circ G_X. $$

Proof

Generating functions and moments open_in_new

Definition (n-th moment of random variable) open_in_new

The $n$-th moment of $X$ is $\expect(X^n)$.

If $R>1$, $$ \begin{align*} G_X'(1) &= \fsum n1\infty \prob(X=n)\,n = \expect(X) \\ G_X''(1) &= \fsum n1\infty \prob(X=n)\,n(n-1) = \expect(X(X-1)) \\ \end{align*} $$ and so on.

If $R=1$, we can take the limit instead: $$ G_X'(t) = \fsum n1\infty \prob(X=n) nt^{n-1} \to \fsum n1\infty \prob(X=n) n = \expect(X). $$

In counting, generating functions help convert convolutions into products. Example (Catalan number)