Choosing the Right Generating Function
For a count \(N\), the choice between a probability generating function and a moment generating function is not just a matter of notation. A probability generating function (PGF) is naturally adapted to factorial moments, while an MGF is naturally adapted to raw moments. The PGF can remain useful even when the MGF is infinite for every positive argument.
The practical choice is to match the function to the quantity being requested, then check that the relevant derivatives and expectations are finite. This matters especially at the PGF’s boundary \(s=1\), and when a count has a heavy tail.
Since \(N\) is nonnegative, \(G(s)\) is finite for \(0\leq s\leq 1\). In contrast, an MGF is finite for \(t\leq 0\), but it may be infinite for every \(t>0\). When it is finite on a neighborhood of zero, differentiating the MGF at zero yields raw moments. Differentiating the PGF inside \(0<s<1\), then taking \(s\) up to 1, yields factorial moments.
PGF Derivatives Give Factorial Moments
To prove the theorem, write the PGF as the power series \(G(s)=\sum_{n=0}^{\infty}P(N=n)s^n\). For \(0<s<1\), termwise differentiation is valid inside the radius of convergence, which is at least 1. Differentiating \(r\) times gives
This is the stated expectation. As \(s\uparrow1\), each summand increases to \((n)_rP(N=n)\). The monotone convergence theorem therefore gives the limit, whether the resulting sum is finite or infinite. \(\square\)
The restriction to a boundary limit is useful: the PGF exists at \(s=1\), but it is not automatically legitimate to differentiate its power series there. The theorem specifies what the interior derivatives approach and precisely how that limit relates to the factorial moment.
Worked Example: A Binomial Count
Let \(N\sim\operatorname{Bin}(5,0.3)\), the number of successes in five independent trials, each with success probability \(0.3\). Its PGF is \(G(s)=(0.7+0.3s)^5\).
Differentiate once: \(G'(s)=5(0.3)(0.7+0.3s)^4\), so \(E[N]=G'(1)=5(0.3)=1.5\).
Differentiate twice: \(G''(s)=5\cdot4(0.3)^2(0.7+0.3s)^3\), so \(E[(N)_2]=G''(1)=20(0.09)=1.8\).
Because \((N)_2=N(N-1)=N^2-N\), \(N^2=(N)_2+N\). Therefore \(E[N^2]=1.8+1.5=3.3\), and \(\operatorname{Var}(N)=E[N^2]-(E[N])^2=3.3-1.5^2=3.3-2.25=1.05\). The variance is nonnegative, as required.
Here the PGF makes factorial moments immediate. The MGF \(M(t)=(0.7+0.3e^t)^5\) is also finite for every real \(t\), so it can be used to obtain raw moments directly. The better choice depends on which moment the problem asks for.
Converting Factorial Moments to Raw Moments
The PGF does not give raw moments directly, but the two kinds of moments are related by polynomial identities. The first few are
More generally, let \(S(k,j)\) denote a Stirling number of the second kind, the number of ways to partition \(k\) labelled objects into \(j\) nonempty unlabelled groups. Then
For a proof, fix an integer \(n\geq0\). The number of functions from a set of \(k\) labelled objects to a set of \(n\) possible values is \(n^k\). Count these functions by the size \(j\) of their image. First choose the \(j\) image values and then assign the \(k\) objects onto all \(j\) chosen values. There are \(\binom{n}{j}j!S(k,j)=(n)_jS(k,j)\) such functions. Summing over \(j\) proves \(n^k=\sum_{j=0}^{k}S(k,j)(n)_j\). Substituting the count variable \(N\) gives the pointwise identity. Taking expectations proves the stated moment identity because all terms are nonnegative. \(\square\)
For example, the \(k=2\) identity recovers the variance from two PGF derivatives: \(\operatorname{Var}(N)=E[(N)_2]+E[N]-(E[N])^2\). This is also a quick consistency check: proposed first and second factorial moments cannot imply a negative variance.
When an MGF Is the Convenient Choice
If \(M(t)\) is finite on an open interval containing zero, then its \(r\)th derivative at zero equals \(E[N^r]\), for each nonnegative integer \(r\). For a nonnegative count, it is enough that \(M(a)<\infty\) for some \(a>0\): for \(t\leq0\), \(e^{tN}\leq1\), and for \(0<t<a\), \(e^{tN}\leq e^{aN}\). Thus the MGF is finite on an interval around zero. Under this condition, differentiation under the expectation is justified: on a smaller interval, \(N^r e^{tN}\) is bounded by a constant times \(e^{aN}\), which is integrable. This is the relevant finiteness check when using an MGF for raw moments.
Worked Example: A Geometric Count
Let \(N\) have the geometric distribution on \(\{0,1,2,\ldots\}\) with \(P(N=k)=p(1-p)^k\), where \(p=1/4\). Write \(q=1-p=3/4\). Summing the geometric series gives \(G(s)=p/(1-qs)\) for \(0\leq s\leq1\).
The MGF is \(M(t)=p/(1-qe^t)\) when \(qe^t<1\), or \(t<-\log q=\log(4/3)\). In particular, it is finite on a neighborhood of zero, so its derivatives there give raw moments. Differentiation gives \(M'(t)=pqe^t/(1-qe^t)^2\), hence \(E[N]=M'(0)=pq/(1-q)^2=q/p=3\).
A second differentiation gives \(M''(0)=q/p+2q^2/p^2=3+2(0.75)^2/(0.25)^2=3+18=21\). Therefore \(\operatorname{Var}(N)=21-3^2=12\).
The PGF gives the factorial moment directly: \(G''(s)=2pq^2/(1-qs)^3\), so \(E[(N)_2]=G''(1)=2q^2/p^2=18\). The conversion check agrees: \(E[N^2]=E[(N)_2]+E[N]=18+3=21\).
When the PGF Works but the MGF Does Not
An MGF’s failure to exist for positive \(t\) does not imply that moments are unavailable. A PGF can still yield factorial moments through its boundary derivatives, provided those moments are finite. The following count has finite first and second raw moments but no positive-argument MGF.
Worked Example: A Heavy-Tailed Count With Finite Second Moment
For integers \(n\geq1\), define \(P(N=n)=1/(\zeta(4)n^4)\), where \(\zeta(r)=\sum_{n=1}^{\infty}n^{-r}\). These probabilities sum to one. For \(r=1,2\), \(E[N^r]=\zeta(4)^{-1}\sum_{n=1}^{\infty}n^{r-4}=\zeta(4-r)/\zeta(4)\), so both moments are finite: \(E[N]=\zeta(3)/\zeta(4)\) and \(E[N^2]=\zeta(2)/\zeta(4)\).
Its second factorial moment is therefore \(E[(N)_2]=E[N^2]-E[N]=[\zeta(2)-\zeta(3)]/\zeta(4)\), also finite. The PGF’s first two boundary derivatives recover these finite moments (the second factorial moment and the mean).
For any \(t>0\), the terms in \(M(t)=\sum_{n=1}^{\infty}e^{tn}/(\zeta(4)n^4)\) do not even tend to zero: \(e^{tn}/n^4\to\infty\). Hence \(M(t)=\infty\) for every positive \(t\). The MGF cannot be differentiated on an interval around zero to obtain raw moments, but the PGF still describes the count and provides its finite factorial moments.
A Practical Decision Rule and Common Pitfall
Use the PGF when the requested quantities are factorial moments, or when an MGF’s positive-argument finiteness is uncertain. Use the MGF for raw moments when it is finite on a neighborhood of zero; it gives \(E[N^r]\) by direct differentiation. If the PGF is used to find raw moments, convert through the factorial-moment identities and check the resulting variance.
For \(E[(N)_r]\), start with the PGF. For \(E[N^r]\), an MGF is direct if its finiteness condition holds.
For an MGF calculation, verify that \(M(t)\) is finite for some positive \(t\), so it is finite near zero. For a PGF calculation at \(s=1\), use the boundary-limit result and check whether the relevant factorial moment is finite.
Use \(N^2=(N)_2+N\) when needed, then compute \(\operatorname{Var}(N)=E[N^2]-(E[N])^2\). A negative result signals an error or inconsistent proposed moments.
Common pitfall: A solver may assume that every count has an MGF near zero simply because its PGF exists on \([0,1]\), then differentiate \(M(t)\) at zero without checking positive \(t\). This is wrong: a PGF is bounded on that interval, whereas the MGF weights large counts by \(e^{tN}\), which can make its expectation infinite. Check the MGF’s domain before differentiating; if it is not finite near zero, use PGF boundary derivatives for the factorial moments that exist and convert only as far as those moments allow.
Check Your Understanding
For each question, identify which generating function is appropriate and state any needed finiteness check.
- For a count \(N\), which derivative of its PGF gives \(E[N(N-1)]\), and at what value is the boundary limit taken?
- If \(E[N]=3\) and \(E[(N)_2]=18\), calculate \(E[N^2]\) and \(\operatorname{Var}(N)\).
- What condition on an MGF allows its derivatives at zero to give raw moments of a nonnegative count?
- Why can a PGF yield finite factorial moments even if the MGF is infinite for every positive argument?
- For \(N\sim\operatorname{Bin}(5,0.3)\), use the PGF to calculate \(E[(N)_2]\), then recover \(E[N^2]\) from the mean.