Tutorials › Exam P - Probability › Using Moment Generating Functions To Identify Sums

Exam P · Integrated Probability Problem Solving · Tutorial 897 of 915

Using Moment Generating Functions To Identify Sums

Use moment generating functions to identify distributions of independent sums and avoid false matches caused by dependence, parameterization, or nonexistent transforms.

Advanced 11 min read

What You'll Learn

  • Define an mgf and check whether it exists near zero before using it.
  • Derive the mgf of a sum of independent random variables.
  • Match products of mgfs to normal, gamma, Poisson, and binomial distributions.
  • Account for scaling and subtraction when forming independent linear combinations.
  • Recognize when a product does not match a proposed distribution.
  • Check parameter conventions and verify an identified sum.

Why Use Moment Generating Functions for Sums?

A sum can have a familiar distribution even when its individual terms have different descriptions. Conversely, a sum that looks familiar may fail to have the proposed distribution if a key condition, such as independence or a shared parameter, is missing. Moment generating functions (mgfs) provide a systematic test: under independence, the mgf of a sum is the product of the component mgfs. The resulting product can then be compared with standard mgf formulas.

The method is especially useful when the variables are independent and their mgfs exist near zero. It can identify a distribution without first calculating the convolution of the component probability functions. It is not a universal shortcut: existence must be checked, independence must be justified, and a product that does not match a familiar form does not justify forcing a match.

Definition: The moment generating function of a random variable \(X\) is \(M_X(t)=E[e^{tX}]\), for values of \(t\) for which this expectation is finite. For distribution identification by mgfs, require that \(M_X(t)\) be finite on an open interval containing zero. If two such mgfs agree on an open interval containing zero, they determine the same distribution.

The Product Rule and How to Use It

Let \(X_1,\ldots,X_n\) be independent random variables with mgfs finite near zero, and define \(S=X_1+\cdots+X_n\). Independence gives the key identity:

$$ M_S(t)=\prod_{j=1}^{n}M_{X_j}(t). $$

The justification follows directly from the definition. Since \(e^{tS}=e^{tX_1}\cdots e^{tX_n}\), independence allows the expectation of this product to factor into the product of expectations. This factorization is the reason the method works; without independence, it generally fails.

$$ \begin{aligned} M_S(t) &=E[e^{t(X_1+\cdots+X_n)}]\\ &=E[e^{tX_1}\cdots e^{tX_n}]\\ &=E[e^{tX_1}]\cdots E[e^{tX_n}]\\ &=\prod_{j=1}^{n}M_{X_j}(t). \end{aligned} $$

For a linear combination \(T=a_1X_1+\cdots+a_nX_n+b\) of independent variables, use \(M_{aX+b}(t)=e^{bt}M_X(at)\). Thus

$$ M_T(t)=e^{bt}\prod_{j=1}^{n}M_{X_j}(a_jt). $$

When matching a product, compare the entire function of \(t\), not just its value or a few derivatives at zero. Moments can be useful checks, but matching a mean and variance alone does not in general identify a distribution.

1
State the model and check independence.
Record each distribution and its parameter convention. Do not apply the product rule to dependent variables.
2
Check existence near zero.
Each component mgf must be finite on an interval containing zero. For a finite sum, use the intersection of the component intervals.
3
Form and simplify the product.
For a linear combination, replace \(t\) by \(a_jt\) in each component mgf and include any constant shift.
4
Match and verify.
Compare the simplified expression with a standard mgf on a neighborhood of zero, then check parameters and, where useful, the mean or variance.

Worked Examples

Worked Example: A Sum of Independent Exponential Variables

Two hypothetical, independent waiting times \(X\) and \(Y\) are exponentially distributed, each with rate \(2\) per hour. Find the distribution of \(S=X+Y\), and calculate \(P(S>1)\), where time is measured in hours. No interest rate or mortality assumption is involved.

Method and model. For an exponential variable with rate \(\lambda\), the density is \(f(x)=\lambda e^{-\lambda x}\) for \(x\geq 0\), and its mgf is \(M(t)=\lambda/(\lambda-t)\) for \(t<\lambda\). Here both rates are \(2\), so each mgf is finite for \(t<2\), including an open interval around zero.

Independence permits multiplication:

$$ M_S(t)=\frac{2}{2-t}\frac{2}{2-t} =\left(\frac{2}{2-t}\right)^2,\qquad t<2. $$

A gamma distribution with shape \(\alpha\) and rate \(\beta\) has mgf \((\beta/(\beta-t))^\alpha\), for \(t<\beta\). In this convention, the rate is in the denominator of the density \(f(s)=\beta^\alpha s^{\alpha-1}e^{-\beta s}/\Gamma(\alpha)\), for \(s>0\). The product matches shape \(2\), rate \(2\). Therefore \(S\) is gamma with shape \(2\) and rate \(2\).

For these parameters, \(f_S(s)=4se^{-2s}\) for \(s>0\). Integrating the density gives

$$ \begin{aligned} P(S>1) &=\int_1^\infty 4se^{-2s}\,ds\\ &=\left[-(2s+1)e^{-2s}\right]_{1}^{\infty}\\ &=3e^{-2}\\ &\approx 0.4060. \end{aligned} $$

The limit term at infinity is zero because \((2s+1)e^{-2s}\) tends to zero. The probability is reported to four decimal places. As a check, the gamma density integrates to one, and its mean is \(2/2=1\) hour, equal to the sum of the two component means, \(1/2+1/2=1\).

Common mistake avoided: Adding the exponential rates and calling \(S\) exponential would give rate \(4\), which is incorrect. The product has a squared denominator, so it matches a gamma distribution with shape \(2\), not an exponential distribution with shape \(1\).

Worked Example: A Scaled Difference of Independent Normal Variables

Let \(X\sim N(5,4)\) and \(Y\sim N(2,9)\) be independent measurements, with the second parameter denoting variance. Find the distribution of \(Z=2X-Y\) and calculate \(P(Z>13)\). No interest rate or mortality assumption is involved.

Method and model. A normal variable with mean \(\mu\) and variance \(\sigma^2\) has mgf \(M(t)=\exp(\mu t+\sigma^2t^2/2)\), finite for every real \(t\). Since \(X\) and \(Y\) are independent,

$$ \begin{aligned} M_Z(t) &=M_X(2t)M_Y(-t)\\ &=\exp\left(5(2t)+\frac{4(2t)^2}{2}\right) \exp\left(2(-t)+\frac{9(-t)^2}{2}\right)\\ &=\exp(10t+8t^2)\exp(-2t+4.5t^2)\\ &=\exp(8t+12.5t^2)\\ &=\exp\left(8t+\frac{25t^2}{2}\right). \end{aligned} $$

This is the mgf of \(N(8,25)\), so \(Z\) has mean \(8\) and variance \(25\). Standardizing the threshold gives

$$ P(Z>13)=P\left(\frac{Z-8}{5}>\frac{13-8}{5}\right) =1-\Phi(1) \approx 0.1587. $$

The probability is reported to four decimal places. As a check, the mean calculated directly is \(2(5)-2=8\), and the variance is \(2^2(4)+(-1)^2(9)=16+9=25\), consistent with the mgf.

Common mistake avoided: Subtracting \(Y\) changes the sign of its contribution to the mean, but its variance contribution remains positive and is multiplied by the square of its coefficient. Using \(9\) as a standard deviation, or subtracting \(9\) from the variance, would be wrong.

Worked Example: Adding Independent Poisson Counts

During two non-overlapping monitoring periods, hypothetical event counts \(N_1\) and \(N_2\) are independent with \(N_1\sim\operatorname{Poisson}(1.2)\) and \(N_2\sim\operatorname{Poisson}(2.8)\). Identify the distribution of the total count \(N=N_1+N_2\), then find the probability of no events in the combined periods. No interest rate or mortality assumption is involved.

Method and model. A Poisson variable with parameter \(\lambda\) has mgf \(\exp(\lambda(e^t-1))\), finite for every real \(t\). Thus

$$ \begin{aligned} M_N(t) &=\exp(1.2(e^t-1))\exp(2.8(e^t-1))\\ &=\exp(4(e^t-1)). \end{aligned} $$

This is the mgf of a Poisson variable with parameter \(4\), so \(N\sim\operatorname{Poisson}(4)\). For a Poisson variable, \(P(N=0)=e^{-\lambda}\), giving

$$ P(N=0)=e^{-4}\approx 0.0183. $$

The probability is reported to four decimal places. A check is that the total mean is \(1.2+2.8=4\), agreeing with the identified Poisson parameter.

Common mistake avoided: The Poisson parameters are added here because the counts are independent and their mgfs have the same functional form. Adding parameters does not make this rule valid for arbitrary distributions.

Worked Example: Combining Binomial Variables With a Shared Probability

Two independent hypothetical production batches have numbers of inspected units requiring rework \(X\sim\operatorname{Binomial}(4,0.3)\) and \(Y\sim\operatorname{Binomial}(3,0.3)\). Find the distribution of \(S=X+Y\) and calculate \(P(S=2)\). No interest rate or mortality assumption is involved.

Method and model. For \(X\sim\operatorname{Binomial}(n,p)\), the mgf is \((1-p+pe^t)^n\). The probability \(p=0.3\) is shared by both independent counts, so

$$ \begin{aligned} M_S(t) &=(0.7+0.3e^t)^4(0.7+0.3e^t)^3\\ &=(0.7+0.3e^t)^7. \end{aligned} $$

This matches the mgf of \(\operatorname{Binomial}(7,0.3)\). Therefore

$$ \begin{aligned} P(S=2) &=\binom{7}{2}(0.3)^2(0.7)^5\\ &=21(0.09)(0.16807)\\ &=0.3176523\\ &\approx 0.3177. \end{aligned} $$

The probability is reported to four decimal places. The check \(E[S]=7(0.3)=2.1\) agrees with \(E[X]+E[Y]=4(0.3)+3(0.3)=2.1\).

Common mistake avoided: Independent binomial variables combine into a binomial variable in this way when they share the same success probability. Independence alone is not sufficient; with different probabilities the product generally does not have the binomial form.

Existence, Parameter Checks, and Limits of the Method

A successful match requires more than algebraic resemblance. First, the variables must be independent for the product rule to apply. If they are dependent, the expectation \(E[e^{tX}e^{tY}]\) need not equal \(E[e^{tX}]E[e^{tY}]\). Second, the mgfs used for identification must be finite on a common open interval containing zero. A formula that is finite only at \(t=0\) does not meet this condition.

Third, check the parameters against the exact standard form. In this tutorial, the gamma distribution uses a rate parameter \(\beta\): its mgf is \((\beta/(\beta-t))^\alpha\), and its mean is \(\alpha/\beta\). A scale parameter would be the reciprocal of this rate and would give a different-looking formula. For a normal distribution, the second parameter in \(N(\mu,\sigma^2)\) is the variance, not the standard deviation.

A product can also signal that no familiar distribution has been identified. For example, if \(U\) and \(V\) are independent Bernoulli variables with success probabilities \(0.2\) and \(0.6\), then their sum has probabilities \(P(U+V=0)=0.8(0.4)=0.32\), \(P(U+V=2)=0.2(0.6)=0.12\), and \(P(U+V=1)=0.56\). A binomial distribution with two trials would require the middle probability to be \(2\sqrt{P(U+V=0)P(U+V=2)}\), which here is about \(0.3919\), not \(0.56\). The sum is not binomial. Matching the number of terms is not enough; the product of mgfs must actually match.

Finally, matching a mean and variance is only a consistency check, not a proof of a distribution. The identification comes from matching mgfs on an interval around zero, where the uniqueness result applies. If no known mgf matches, retain the product as the mgf when valid; do not assign a familiar label without justification.

Key takeaway: For independent variables whose mgfs exist near zero, multiply the component mgfs, simplify, and match the complete expression to a standard mgf. Then confirm the parameter convention and check the result with moments or probabilities.

Check Your Understanding

For each problem, check independence, parameter conventions, and the full mgf before identifying a sum.

  1. Independent counts satisfy \(A\sim\operatorname{Poisson}(0.7)\) and \(B\sim\operatorname{Poisson}(1.3)\). Find the distribution of \(A+B\) and \(P(A+B=2)\). (Answer: \(\operatorname{Poisson}(2)\); \(2e^{-2}\approx 0.2707\).)
  2. Independent waiting times \(T_1,T_2\) are exponential with rate \(4\) per hour. Identify \(T_1+T_2\) and give its mean in hours. (Answer: Gamma with shape \(2\), rate \(4\); mean \(0.5\) hours.)
  3. Independent variables satisfy \(X\sim N(1,1)\) and \(Y\sim N(3,4)\), with variance as the second parameter. Identify \(X+2Y\). (Answer: \(N(7,17)\).)
  4. Independent counts satisfy \(X\sim\operatorname{Binomial}(2,0.4)\) and \(Y\sim\operatorname{Binomial}(5,0.4)\). Find \(P(X+Y\geq 6)\). (Answer: \(0.0188416\), approximately \(0.0188\).)
  5. Independent Bernoulli variables have success probabilities \(0.25\) and \(0.5\). Is their sum binomial? Give the probabilities of zero, one, and two successes to justify your conclusion. (Answer: No; the probabilities are \(0.375\), \(0.5\), and \(0.125\), respectively.)
Clinical Biostats