Why Transform Formulas for Random Sums Matter
A random sum combines two sources of randomness: the number of terms and the values of those terms. Transform methods organize this combination into a concise formula. Under independence, the transform of the total is found by evaluating the count’s transform at the transform of one summand. The formula is simple, but its assumptions and domain matter: the probability-generating function requires integer-valued terms, and a moment-generating function can be infinite even when the corresponding algebraic expression looks plausible.
Independence is the essential mechanism behind the formulas: conditional on \(N=n\), the total contains \(n\) independent summands, so its transform is the \(n\)th power of one summand’s transform. Averaging those powers over the distribution of \(N\) produces a composition. The calculation below establishes that argument for probability-generating functions.
Probability-Generating Function of an Integer-Valued Random Sum
Suppose \(X_1,X_2,\ldots\) are nonnegative integer-valued. For any complex \(z\) with \(|z|\leq 1\), their probability-generating function is \(G_X(z)=E[z^{X_1}]\); the count’s function \(G_N\) is defined in the same way. These functions are well-defined on the closed unit disk because the series of absolute values is bounded by the sum of the probabilities, which is 1.
Proof. Let \(p_n=P(N=n)\). On the event \(N=n\), \(S=X_1+\cdots+X_n\), with the empty sum equal to zero. Independence of the summands gives $$ E[z^S\mid N=n]=\prod_{j=1}^{n}E[z^{X_j}]=G_X(z)^n. $$ For \(n=0\), both sides equal 1. Averaging over the count therefore gives $$ E[z^S]=\sum_{n=0}^{\infty}p_nG_X(z)^n=G_N(G_X(z)). $$ The sum is well-defined: \(|G_X(z)|\leq E[|z|^{X_1}]\leq1\), so the defining series for \(G_N\) converges absolutely at \(G_X(z)\). This proves the identity. \(\square\)
Since the coefficient of \(z^k\) in a probability-generating function is the probability of the value \(k\), this identity can also be used to find probabilities of the total by extracting coefficients from \(G_N(G_X(z))\). In applications, it is often easier to compose the functions than to enumerate all possible counts and summand combinations.
Worked Example: A Binomial Count and Bernoulli Summands
Suppose \(N\sim\operatorname{Binomial}(2,0.4)\), and the independent summands have \(P(X_j=1)=0.3\) and \(P(X_j=0)=0.7\). Find the probability-generating function of \(S\), and use it to find \(P(S=0)\) and \(P(S=2)\).
For the count, \(G_N(u)=(0.6+0.4u)^2\). For each summand, \(G_X(z)=0.7+0.3z\). Substitution gives $$ G_S(z)=\bigl(0.6+0.4(0.7+0.3z)\bigr)^2 =(0.88+0.12z)^2 =0.7744+0.2112z+0.0144z^2. $$ The coefficients sum to \(0.7744+0.2112+0.0144=1\), as required for a probability distribution. Thus \(P(S=0)=0.7744\) and \(P(S=2)=0.0144\). The only possible values are 0, 1, and 2, consistent with having at most two summands, each at most 1.
Moment-Generating and Characteristic Functions
For summands that need not be integer-valued, probability-generating functions generally do not apply. The corresponding formulas use moment-generating functions or characteristic functions instead. Define \(M_X(t)=E[e^{tX_1}]\) when this expectation is finite, and define \(\varphi_X(u)=E[e^{iuX_1}]\) for real \(u\). A characteristic function always exists because \(|e^{iuX_1}|=1\); an mgf may exist only for some values of \(t\).
Proof. For each fixed \(n\), independence gives $$ E\!\left[e^{t(X_1+\cdots+X_n)}\right] =\prod_{j=1}^{n}E[e^{tX_j}] =M_X(t)^n. $$ The identity also holds at \(n=0\), since both sides equal 1. Because \(e^{tS}\) is nonnegative, conditioning on \(N\) and summing over its possible values is valid even when the expectation is infinite: $$ E[e^{tS}] =\sum_{n=0}^{\infty}P(N=n)E[e^{tS}\mid N=n] =\sum_{n=0}^{\infty}P(N=n)M_X(t)^n. $$ This is \(G_N(M_X(t))\), interpreted by its nonnegative series; it is finite precisely when that series converges. For the characteristic function, the same finite-\(n\) product calculation gives \(E[e^{iuS}\mid N=n]=\varphi_X(u)^n\). Averaging over \(N\) yields \(\sum_{n=0}^{\infty}P(N=n)\varphi_X(u)^n=G_N(\varphi_X(u))\). This series converges absolutely because \(|\varphi_X(u)|\leq1\). \(\square\)
The mgf condition is more than a technical detail. Even if \(M_X(t)\) is finite, it may be greater than 1, and the count’s pgf need not be finite at such an argument. In contrast, the characteristic-function argument always lies in the closed unit disk. No moment assumption on the summands is needed for the characteristic-function formula.
Worked Example: A Geometric Count of Normal Summands
Let \(P(N=n)=(1-r)r^n\) for \(n=0,1,\ldots\), with \(r=0.4\). Let the summands be independent \(N(1,1)\) random variables, independent of \(N\). Find the mgf of \(S\) and check its value at \(t=0.2\).
The count’s pgf is the geometric series $$ G_N(u)=\sum_{n=0}^{\infty}(1-r)r^nu^n =\frac{1-r}{1-ru},\qquad ru<1. $$ For a \(N(1,1)\) summand, \(M_X(t)=\exp(t+t^2/2)\). Therefore, at any real \(t\) for which \(0.4\exp(t+t^2/2)<1\), $$ M_S(t)=\frac{0.6}{1-0.4\exp(t+t^2/2)}. $$ At \(t=0.2\), the summand mgf is \(\exp(0.2+0.2^2/2)=\exp(0.22)\), approximately \(1.2461\). Hence \(0.4M_X(0.2)\) is approximately \(0.4984<1\), so the random-sum mgf is finite there, with value approximately \(0.6/(1-0.4984)=1.196\). At \(t=0\), the formula gives \(0.6/(1-0.4)=1\), as any mgf must.
Worked Example: A Characteristic Function With No Integer-Valued Summands
Let \(P(N=n)=2^{-(n+1)}\) for \(n=0,1,\ldots\), and let each independent summand equal \(1\) or \(-1\), each with probability \(1/2\). Find the characteristic function of \(S\).
The count’s pgf is \(G_N(z)=\frac{1}{2-z}\) for \(|z|\leq1\). For one summand, $$ \varphi_X(u)=\tfrac12e^{iu}+\tfrac12e^{-iu}=\cos u. $$ Thus $$ \varphi_S(u)=G_N(\cos u)=\frac{1}{2-\cos u}. $$ This is defined for every real \(u\), since \(-1\leq\cos u\leq1\), so \(2-\cos u\geq1\). At \(u=0\), it equals 1, confirming the required value of a characteristic function at zero.
Assumptions, Use, and a Common Pitfall
These composition formulas make it possible to study a total without first deriving its full distribution. The pgf is useful for discrete totals, while the mgf—where finite—can encode exponential moments. The characteristic function applies to general real-valued summands and can be used whether or not their moments exist. In each case, the count and summands must have the stated independence structure, and the formula’s argument must lie in the domain where the count’s transform is defined.
Common mistake: applying the composition formula when the count and summands are dependent. For example, let \(N\) be Bernoulli with success probability \(1/2\), let \(X_1=N\), and let \(X_j\) for \(j\geq2\) be independent Bernoulli\((1/2)\) variables independent of \(N\) and of one another. Each \(X_j\) has a Bernoulli\((1/2)\) marginal distribution, but \(N\) is dependent on \(X_1\). The actual sum is \(S=0\) if \(N=0\) and \(S=X_1=1\) if \(N=1\), so \(G_S(z)=\frac12+\frac12z\). Incorrectly treating \(N\) and \(X_1\) as independent would give \(G_N(G_X(z))=\frac34+\frac14z\), a different function. The correction is to verify independence before substituting transforms; without it, the conditional distribution of the summands can change with the count.
Check Your Understanding
Use the stated assumptions carefully when answering.
- What independence conditions are required for \(G_S(z)=G_N(G_X(z))\)?
- If \(X_j\) are nonnegative integer-valued, why is \(G_X(z)\) inside the unit disk whenever \(|z|\leq1\)?
- For an mgf formula, why does \(M_X(t)<\infty\) not by itself guarantee that \(M_S(t)<\infty\)?
- What feature of a characteristic function ensures the count pgf can be evaluated at \(\varphi_X(u)\)?
- When \(N=0\), what value should the random sum take, and what does this imply for its conditional transform?