Tutorials › Stochastic Processes › Choosing Between PGFs, MGFs, And Characteristic Functions

Generating Functions and Transforms · Tutorial 43 of 994

Choosing Between PGFs, MGFs, And Characteristic Functions

Learn to choose a transform by checking the variable’s support, the transform’s domain, and the calculation you need.

Intermediate 9 min read

What You'll Learn

  • Identify when a probability generating function is appropriate for a nonnegative integer-valued variable.
  • Check the domain of a moment generating function before using it.
  • Explain why characteristic functions exist for every real-valued random variable.
  • Translate between the three transforms when the variable is count-valued.
  • Select a transform for extracting probabilities or evaluating exponential and oscillatory expectations.
  • Recognize why a transform that exists at one argument may fail to exist at another.

Three Transforms, Three Different Jobs

A random variable can be described through expectations of functions of its values. The choice of function matters: it determines whether the expectation exists and whether the resulting transform is useful for the calculation at hand. For a nonnegative integer-valued variable, the probability generating function (PGF) directly encodes its probabilities. A moment generating function (MGF) is useful for exponential moments, when those moments exist. A characteristic function (CF) is defined for every real-valued random variable and is particularly useful for oscillatory expectations and distributional arguments.

Throughout, let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space and let \(X:\Omega\to\mathbb{R}\) be a random variable. The support condition in each definition is a condition on the values \(X\) can take with probability one. The argument of an MGF is real; the argument of a characteristic function is also real, but it appears multiplied by \(i=\sqrt{-1}\).

Definition: If \(X\) takes values in \(\{0,1,2,\ldots\}\) with probability one, its probability generating function is \(G_X(s)=\mathbb{E}[s^X]\) for \(|s|\leq 1\). Its moment generating function is \(M_X(t)=\mathbb{E}[e^{tX}]\) at each real \(t\) for which this expectation is finite. Its characteristic function is \(\phi_X(u)=\mathbb{E}[e^{iuX}]\) for real \(u\). For a general real-valued \(X\), the MGF and CF are defined by the same formulas; a PGF is not the standard probability-generating representation unless \(X\) is nonnegative integer-valued.

The PGF is always finite on the closed unit disk: \(|s^X|\leq1\) there. Its power series is \(\sum_{k=0}^{\infty}\mathbb{P}(X=k)s^k\), so its coefficients are the probabilities of the possible counts. It can also converge outside that disk, but that extra convergence is not guaranteed by the definition. The MGF’s domain is \(\{t\in\mathbb{R}:\mathbb{E}[e^{tX}]<\infty\}\); it contains \(0\), but need not contain any particular nonzero argument. The CF exists for every real \(u\), because \(|e^{iuX}|=1\).

How the Transforms Relate for Counts

Proposition: If \(X\) is nonnegative integer-valued, then \(M_X(t)=G_X(e^t)\) whenever either side is finite, and \(\phi_X(u)=G_X(e^{iu})\) for every real \(u\).

Proof. For every outcome \(\omega\), \(X(\omega)\) is a nonnegative integer, so \((e^t)^{X(\omega)}=e^{tX(\omega)}\) and \((e^{iu})^{X(\omega)}=e^{iuX(\omega)}\). Taking expectations gives the stated identities whenever the real exponential expectation is finite. For the characteristic-function identity, \(|e^{iuX}|=1\), so its expectation always exists. \(\square\)

This relation is a useful translation, not a claim that the three transforms have identical domains or purposes. Since \(e^t\leq1\) for \(t\leq0\), the MGF of a nonnegative count is finite for every such \(t\). For \(t>0\), it may diverge. By contrast, \(e^{iu}\) always lies on the unit circle, where the PGF series is absolutely convergent.

Proposition: For any real-valued \(X\), \(\phi_X(u)\) is defined for every real \(u\) and satisfies \(|\phi_X(u)|\leq1\).

Proof. The complex random variable \(e^{iuX}\) has absolute value \(1\) for every outcome. It is therefore integrable, since \(\mathbb{E}|e^{iuX}|=1\). The triangle inequality for expectation gives \(|\phi_X(u)|=|\mathbb{E}[e^{iuX}]|\leq\mathbb{E}|e^{iuX}|=1\). \(\square\)

When independent variables are added, the corresponding transforms multiply wherever the expectations are defined. For independent \(X\) and \(Y\), for example, \(e^{t(X+Y)}=e^{tX}e^{tY}\), and independence factors the expectation if both MGFs are finite at \(t\). The same argument applies to characteristic functions, whose factors are always integrable. For nonnegative integer-valued independent variables it also gives \(G_{X+Y}(s)=G_X(s)G_Y(s)\) for \(|s|\leq1\). This is useful, but it does not remove the need to check whether the requested expectation exists.

Worked Comparisons

Worked Example: A Binomial Count and Three Questions

Let \(X\) count successes in three independent fair Bernoulli trials on a probability space. Then \(X\) takes values \(0,1,2,3\), with probabilities \(1/8,3/8,3/8,1/8\), respectively. These probabilities sum to \((1+3+3+1)/8=1\). Which transform is convenient for the probability of no successes, an exponential expectation, and an alternating-sign expectation?

Because \(X\) is a nonnegative integer-valued count, its PGF is the natural representation:

$$ G_X(s)=\frac18+\frac38s+\frac38s^2+\frac18s^3 =\left(\frac{1+s}{2}\right)^3. $$

For the probability of no successes, evaluate at zero: \(G_X(0)=1/8=\mathbb{P}(X=0)\). For the exponential expectation at \(t=\log 2\), use \(M_X(t)=G_X(e^t)\). Since \(e^{\log 2}=2\),

$$ \mathbb{E}[2^X]=M_X(\log 2)=G_X(2)=\left(\frac{1+2}{2}\right)^3=\frac{27}{8}. $$

Directly, the same expectation is \(\frac18(1)+\frac38(2)+\frac38(4)+\frac18(8)=\frac{1+6+12+8}{8}=\frac{27}{8}\). For the alternating-sign expectation, the CF at \(u=\pi\) gives \(e^{i\pi X}=(-1)^X\):

$$ \mathbb{E}[(-1)^X]=\phi_X(\pi)=G_X(e^{i\pi})=G_X(-1)=0. $$

Indeed, direct substitution in the probability sum gives \((1-3+3-1)/8=0\). The PGF exposes the count probabilities, while the MGF and CF evaluate the particular exponential and oscillatory expectations.

Worked Example: A Geometric Count with a Restricted MGF

Let \(X\) have the geometric distribution on \(\{0,1,2,\ldots\}\) with \(\mathbb{P}(X=k)=2^{-(k+1)}\). The probabilities sum to \(\frac12\sum_{k=0}^{\infty}(1/2)^k=1\). Find its PGF and determine exactly where its MGF is finite.

The PGF is the geometric series

$$ G_X(s)=\sum_{k=0}^{\infty}\frac12\left(\frac{s}{2}\right)^k =\frac{1}{2-s},\qquad |s|\leq1. $$

For real \(t\), the MGF series is \(\frac12\sum_{k=0}^{\infty}(e^t/2)^k\). It converges precisely when \(e^t/2<1\), or \(t<\log 2\), and then

$$ M_X(t)=\frac{1}{2-e^t},\qquad t<\log 2. $$

At \(t=\log 2\), each term of the expectation series equals \(1/2\), so the terms do not tend to zero and the series diverges. For \(t>\log 2\), its terms grow and it also diverges. Thus the endpoint is excluded, not included. As a check, \(M_X(0)=1/(2-1)=1\), as required for an expectation of the constant \(1\).

The CF, in contrast, exists at every real \(u\). Substituting \(s=e^{iu}\) into the PGF gives \(\phi_X(u)=1/(2-e^{iu})\). For example, at \(u=\pi\), \(e^{i\pi}=-1\), so \(\phi_X(\pi)=1/3\). Directly, the alternating series is \(\frac12-\frac14+\frac18-\cdots=\frac{1/2}{1+1/2}=1/3\). This comparison shows why an MGF’s argument must be checked rather than assumed to be available.

Worked Example: A Real-Valued Variable and an Exponential Moment

Let \(X\) have the exponential distribution with rate \(1\), meaning it has density \(f_X(x)=e^{-x}\) for \(x\geq0\) and zero otherwise. Its density integrates to \(\int_0^\infty e^{-x}\,dx=1\). Since \(X\) is real-valued and not integer-valued, the PGF is not the appropriate probability-generating representation. Compute the MGF domain and the CF at \(u=1\).

For real \(t\), the MGF integral is

$$ M_X(t)=\int_0^\infty e^{tx}e^{-x}\,dx =\int_0^\infty e^{-(1-t)x}\,dx. $$

If \(t<1\), the integrand decays exponentially and the integral is \(1/(1-t)\). If \(t=1\), it is the integral of \(1\) over an infinite interval and diverges. If \(t>1\), the integrand grows and the integral diverges. Therefore \(M_X(t)=1/(1-t)\) only for \(t<1\). In particular, \(\mathbb{E}[e^X]\) is infinite.

The CF is available at every real \(u\), and direct integration gives

$$ \phi_X(u)=\int_0^\infty e^{iux}e^{-x}\,dx =\int_0^\infty e^{-(1-iu)x}\,dx =\frac{1}{1-iu}. $$

The boundary term at infinity vanishes because \(|e^{-(1-iu)x}|=e^{-x}\to0\). At \(u=1\), \(\phi_X(1)=1/(1-i)=(1+i)/2\), since \((1-i)(1+i)=2\). Its modulus is \(\sqrt{1/2}\leq1\), consistent with the general bound. The MGF and CF are both useful here, but only the CF is defined at every real argument.

A Practical Selection Rule

Choose the transform by asking two questions: what values can the variable take, and what expectation or probability must be calculated? The following guide summarizes the distinctions.

TransformBest starting pointExistence checkTypical use
PGF \(G_X(s)\)\(X\) is nonnegative integer-valuedAlways finite for \(|s|\leq1\)Encoding count probabilities and evaluating count-based expectations
MGF \(M_X(t)\)An exponential moment is neededCheck \(\mathbb{E}[e^{tX}]<\infty\) at the particular \(t\)Exponential moments and, when available near zero, moment calculations
CF \(\phi_X(u)\)A universally defined transform or oscillatory expectation is neededAlways finite for real \(u\)Expectations of \(e^{iuX}\) and distributional arguments

For count-valued variables, a PGF can be the most direct route to a probability or a count calculation, while the MGF may be more convenient for a real exponential weight. For a general real-valued variable, the PGF should not be treated as a substitute for either transform: its coefficient interpretation depends on integer-valued support. The CF remains available even if an MGF fails at the argument of interest. A CF is also uniquely associated with a probability distribution, a standard uniqueness result for characteristic functions; its universal existence is not the same as saying that every desired expectation is encoded by a simple evaluation.

Existence at a particular argument is not enough to justify every derivative or moment calculation. For example, differentiating an MGF to obtain a moment requires the relevant finiteness and regularity conditions; differentiating a CF to obtain moments also requires the corresponding moment assumptions. Those conditions should be checked before using derivatives, rather than inferred just from the fact that the transform itself exists.

Common Mistake: Treating the MGF and CF as Interchangeable

A frequent error is to write \(M_X(u)=\phi_X(u)\), omitting the factor \(i\) in the characteristic function, or to assume that an MGF exists for every real argument. For the exponential variable in the preceding example, \(\phi_X(1)=(1+i)/2\) is well-defined, but \(M_X(1)=\int_0^\infty 1\,dx=\infty\). They are not the same calculation: the CF uses \(e^{iX}\), whose magnitude is \(1\), whereas the MGF at \(1\) uses \(e^X\), which grows without bound.

Another misleading move is to use \(G_X(s)\) for a noninteger-valued variable and interpret its values as probability coefficients. An expectation \(\mathbb{E}[s^X]\) might make sense for some such variables and some \(s\), but the power-series coefficients no longer list the probabilities \(\mathbb{P}(X=k)\). For instance, the exponential variable has nonzero probability over intervals of real values, not a probability mass function on the nonnegative integers. Match the transform to the support and to the calculation, then verify the domain at the actual argument.

Check Your Understanding

For each question, identify the support and check existence at the specified argument before computing.

  1. If \(X\) is nonnegative integer-valued, why is \(G_X(0)=\mathbb{P}(X=0)\), using the convention \(0^0=1\) in the expectation defining the PGF?
  2. For the geometric variable with \(\mathbb{P}(X=k)=2^{-(k+1)}\), is \(M_X(\log 2)\) finite? Justify your answer from the terms of the defining series.
  3. For any real-valued \(X\), give the pointwise bound on \(|e^{iuX}|\) that guarantees the CF exists.
  4. For the exponential variable with rate \(1\), compute \(M_X(1/2)\) and verify that the argument lies in its domain.
  5. For a nonnegative integer-valued \(X\), express \(M_X(t)\) using \(G_X\), and state the finiteness condition needed when \(t>0\).