Tutorials › Statistical Theory I - Probability and Distribution Theory › Generating Functions and Transforms of Mixtures

Mixtures, Compounding, and Truncation · Tutorial 648 of 994

Generating Functions and Transforms of Mixtures

See why a mixture’s transform is the weighted average of its component transforms, and use that identity to compute transforms and moments.

Advanced 9 min read

What You'll Learn

  • Define the probability-generating function for nonnegative integer-valued mixture components.
  • Derive the weighted-average formula for a mixture’s PGF, MGF, and characteristic function.
  • Identify the existence conditions for each transform and its mixture formula.
  • Recover moments from transform derivatives when the required moments exist.
  • Work through discrete and continuous mixture calculations.

Why Transforms of Mixtures Are Useful

A mixture is generated by selecting a component and then drawing an observation from that component’s distribution. That two-stage description makes transforms especially convenient: average each component’s transform using the mixing weights, and the result is the transform of the mixture. This gives a direct route to calculations without first deriving the mixture’s density or mass function.

The transform depends on the kind of random variable. A probability-generating function (PGF) applies to nonnegative integer-valued variables; a moment-generating function (MGF) applies where the relevant exponential expectation is finite; and a characteristic function exists for every real-valued random variable. The distinction matters because their existence and differentiation properties are not identical.

Mixture Setup and Transform Identities

Definition: Let \(C\) be a component label taking values \(1,\ldots,K\), with \(P(C=j)=w_j\), where \(w_j\geq 0\) and \(\sum_{j=1}^K w_j=1\). Conditional on \(C=j\), let \(X\) have distribution \(F_j\). The marginal distribution of \(X\) is the mixture with weights \(w_j\) and component distributions \(F_j\). For any integrable function \(h\), $$ E[h(X)]=\sum_{j=1}^K w_j E[h(X)\mid C=j]. $$

For a continuous mixture, replace the finite label by a mixing parameter \(\theta\) with probability distribution \(G\), and let the conditional distribution of \(X\) given \(\theta\) be \(F_\theta\). Provided the conditional expectations are measurable, the corresponding identity is

$$ E[h(X)]=\int E_\theta[h(X)]\,dG(\theta). $$

For nonnegative \(h\), this identity holds even if either side is infinite, by Tonelli’s theorem. For signed \(h\), it holds when \(E[|h(X)|]<\infty\). These conditions clarify when an expectation can be averaged across components.

Theorem: For a finite mixture, the characteristic function satisfies $$ \varphi_X(t)=\sum_{j=1}^K w_j\varphi_j(t), \qquad t\in\mathbb{R}, $$ where \(\varphi_j(t)=E[e^{itX}\mid C=j]\). If \(X\) is nonnegative integer-valued, its PGF \(G_X(s)=E[s^X]\) satisfies \(G_X(s)=\sum_j w_jG_j(s)\) for \(0\leq s\leq 1\). Its MGF \(M_X(t)=E[e^{tX}]\) satisfies \(M_X(t)=\sum_j w_jM_j(t)\) wherever the component MGFs have a finite weighted sum.

For a continuous mixture, each finite sum is replaced by an integral over \(G\). The characteristic-function identity holds for every real \(t\). The PGF identity holds for \(0\leq s\leq1\) when the components are nonnegative integer-valued. The MGF identity holds wherever its expectation is finite; for a finite mixture, this is equivalent to finiteness of the MGF for every component having positive weight.

Proof. For the characteristic function, take \(h(x)=e^{itx}\) in the mixture expectation identity. This function is bounded in absolute value by 1, so its expectation exists for every real \(t\). Thus

$$ \varphi_X(t)=E[e^{itX}] =\sum_{j=1}^K w_jE[e^{itX}\mid C=j] =\sum_{j=1}^K w_j\varphi_j(t). $$

For a PGF with \(0\leq s\leq1\), \(s^X\) is bounded between 0 and 1 (with the usual convention \(0^0=1\)), so the same conditional-expectation argument applies. For the MGF, \(e^{tX}\) is nonnegative, so the identity follows from the nonnegative-function version of the mixture formula, including when an expectation is infinite. In a finite mixture, a positive-weight infinite component expectation makes the weighted sum infinite; otherwise all terms are finite and the identity gives the finite MGF. This proves the claims. \(\square\)

Using Transform Derivatives to Find Moments

Once a mixture transform has been found, moments can often be obtained by differentiation. For an MGF, if \(E[e^{a|X|}]<\infty\) for some \(a>0\), then \(M_X\) is differentiable to every order in a neighborhood of zero and

$$ M_X^{(r)}(0)=E[X^r], \qquad r=0,1,2,\ldots. $$

The exponential-moment condition justifies differentiating inside the expectation. In fact, for any \(b<a\), derivatives near zero are dominated by a constant multiple of \(e^{a|X|}\), since polynomial factors in \(|X|\) are bounded by a constant times \(e^{(a-b)|X|}\). Dominated convergence therefore applies. For a mixture, the same derivatives can be taken term by term when a common exponential-moment bound holds for the positive-weight components; the resulting moments are the weighted averages of the component raw moments.

For a nonnegative integer-valued \(X\), the PGF provides factorial moments: when the relevant moments are finite,

$$ G_X'(1)=E[X], \qquad G_X''(1)=E[X(X-1)]. $$

More generally, the \(r\)th derivative at 1 gives \(E[X(X-1)\cdots(X-r+1)]\). One way to justify the first two identities is to differentiate the series \(G_X(s)=\sum_{k=0}^{\infty}P(X=k)s^k\) for \(0\leq s<1\), then let \(s\) increase to 1. The resulting nonnegative terms increase to \(kP(X=k)\), or to \(k(k-1)P(X=k)\); monotone convergence gives the stated expectations, finite or infinite. If finite, the ordinary second moment follows from \(X^2=X(X-1)+X\).

Worked Example: A Poisson Mixture and Its PGF

Let \(P(C=1)=1/3\) and \(P(C=2)=2/3\). Given \(C=1\), let \(X\sim\operatorname{Poisson}(1)\); given \(C=2\), let \(X\sim\operatorname{Poisson}(4)\). A Poisson variable with mean \(\lambda\) has PGF \(\exp(\lambda(s-1))\), so

$$ G_X(s)=\frac{1}{3}e^{s-1}+\frac{2}{3}e^{4(s-1)}. $$

The mean is the first derivative at 1:

$$ G_X'(s)=\frac{1}{3}e^{s-1}+\frac{8}{3}e^{4(s-1)}, \qquad E[X]=G_X'(1)=\frac{1}{3}+\frac{8}{3}=3. $$

The second derivative at 1 gives the second factorial moment:

$$ G_X''(s)=\frac{1}{3}e^{s-1}+\frac{32}{3}e^{4(s-1)}, \qquad E[X(X-1)]=G_X''(1)=\frac{1}{3}+\frac{32}{3}=11. $$

Since \(X^2=X(X-1)+X\), \(E[X^2]=11+3=14\). Therefore

$$ \operatorname{Var}(X)=E[X^2]-(E[X])^2=14-9=5. $$

The MGF and characteristic function follow from the same weighted-average rule: \(M_X(t)=\frac13\exp(e^t-1)+\frac23\exp(4(e^t-1))\), while \(\varphi_X(t)=\frac13\exp(e^{it}-1)+\frac23\exp(4(e^{it}-1))\).

Worked Example: MGF and Moments of an Exponential Mixture

Let \(C=1\) with probability \(1/4\) and \(C=2\) with probability \(3/4\). Conditional on \(C=1\), let \(X\) be exponential with rate 1; conditional on \(C=2\), let it be exponential with rate 2. For an exponential variable with rate \(\lambda\), integration of its density \(\lambda e^{-\lambda x}\), \(x\geq0\), gives \(M(t)=\lambda/(\lambda-t)\) for \(t<\lambda\). Thus the mixture MGF is

$$ M_X(t)=\frac{1}{4}\frac{1}{1-t} +\frac{3}{4}\frac{2}{2-t}, \qquad t<1. $$

The restriction \(t<1\) is required because the rate-1 component has positive weight and its MGF diverges at and above \(t=1\). Differentiating,

$$ M_X'(0)=\frac{1}{4}(1)+\frac{3}{4}\left(\frac{1}{2}\right) =\frac{5}{8}, \qquad M_X''(0)=\frac{1}{4}(2)+\frac{3}{4}\left(\frac{1}{2}\right) =\frac{7}{8}. $$

Consequently \(E[X]=5/8\) and \(E[X^2]=7/8\), so \(\operatorname{Var}(X)=7/8-(5/8)^2=56/64-25/64=31/64\). Replacing \(t\) by \(it\) gives the characteristic function:

$$ \varphi_X(t)=\frac{1}{4}\frac{1}{1-it} +\frac{3}{4}\frac{2}{2-it}, \qquad t\in\mathbb{R}. $$

Worked Example: A Continuous Mixture’s Characteristic Function

Suppose \(X\) is uniform on \([-1,1]\) with probability \(1/3\), and uniform on \([2,4]\) with probability \(2/3\). For a uniform variable on \([a,b]\), direct integration gives its characteristic function as \((e^{itb}-e^{ita})/(it(b-a))\) for \(t\ne0\). Therefore,

$$ \varphi_X(t)=\frac{1}{3}\frac{\sin t}{t} +\frac{2}{3}e^{3it}\frac{\sin t}{t}, \qquad t\ne0. $$

At \(t=0\), each component characteristic function equals 1, and the mixture value is also 1; the displayed formula has that value by continuity. The component means are 0 and 3, so \(E[X]=(1/3)0+(2/3)3=2\). The component second moments are \(1/3\) and \(28/3\), respectively, giving

$$ E[X^2]=\frac{1}{3}\frac{1}{3}+\frac{2}{3}\frac{28}{3} =\frac{19}{3}, \qquad \operatorname{Var}(X)=\frac{19}{3}-2^2=\frac{7}{3}. $$

Both moments are finite because the mixture is supported on the bounded set \([-1,1]\cup[2,4]\). The characteristic-function average remains valid without any moment assumption, but here the moments can also be recovered by differentiating the characteristic function at zero.

Common Mistake: Averaging Component Parameters

A common error is to average a component parameter first and then substitute that average into a transform. For example, in the Poisson mixture above, the weighted average of the component means is 3. It would be incorrect to conclude that the mixture is \(\operatorname{Poisson}(3)\), whose PGF is \(\exp(3(s-1))\). The correct PGF is the weighted sum \(\frac13e^{s-1}+\frac23e^{4(s-1)}\), and these functions are not equal in general. At \(s=0\), for instance, the mixture gives \(\frac13e^{-1}+\frac23e^{-4}\), whereas a \(\operatorname{Poisson}(3)\) variable gives \(e^{-3}\). Matching a mean does not make the distributions, or their transforms, the same.

The same correction applies to all three transforms: average the component transforms with the mixture weights. Do not average the component transforms’ logarithms, and do not assume that a transform exists merely because each component formula looks familiar. For an MGF, check the common domain on which the mixture expectation is finite; for a characteristic function, no such existence restriction is needed.

Key takeaway: A mixture transform is a weighted average of component transforms. Use PGFs for nonnegative integer-valued variables, MGFs only where the exponential expectation is finite, and characteristic functions for arbitrary real-valued variables. Differentiate only when the required moments and interchange conditions are justified.

Check Your Understanding

Use the transform identities and their existence conditions to answer these questions.

  1. For a finite mixture, why does the characteristic function always exist even when a component has no finite mean?
  2. A nonnegative integer-valued mixture has component PGFs \(G_1\) and \(G_2\), with weights \(0.2\) and \(0.8\). Write the mixture PGF.
  3. For a finite mixture of exponential distributions with positive weights, what determines the largest interval around zero on which the MGF is finite?
  4. Explain why the second derivative of a PGF at 1 gives a factorial moment rather than \(E[X^2]\).
  5. A mixture’s component means are known. Does their weighted average determine the mixture distribution? Explain using the transform identity.