A Reliable Workflow for MGF Problems
Moment generating function questions often combine several skills: writing the correct formula for a distribution, checking where that formula is valid, differentiating to find moments, and deciding whether a sum has a familiar distribution. A plausible-looking expression can still be wrong if its parameter convention is mismatched or if independence was assumed without justification.
A dependable solution keeps these decisions separate. First state the model and its parameterization. Then write the MGF with its domain, check that the domain includes an open interval around zero, and only then use derivatives or the product rule. Finally compare the resulting expression with a known MGF and verify the conclusion using moments when practical.
The open-interval condition matters. A formula that is finite only for \(t\geq 0\), for example, is not automatically an MGF that exists near zero. For common distributions such as bounded variables, normal variables, and exponential variables, the MGF formulas used below do exist on an open interval containing zero. Always record the domain along with the formula.
Derivatives, Domains, and a Short Justification
The moment formulas follow from differentiating the expectation. Formally, the first derivative of \(e^{tX}\) with respect to \(t\) is \(Xe^{tX}\), and the second is \(X^2e^{tX}\). When the MGF is finite on an open interval around zero, the standard differentiation-under-the-expectation result gives
Since variance is the second raw moment minus the square of the mean, \(\operatorname{Var}(X)=M_X''(0)-[M_X'(0)]^2\). This also explains why a second derivative alone is generally not the variance.
For independent random variables \(X\) and \(Y\), the product rule follows from the factorization of expectations:
The factorization requires independence. Without it, the expectation of the product need not equal the product of the expectations. In addition, both MGFs must be defined at the \(t\)-values being used. When these conditions hold near zero, the product is the MGF of the sum.
Give the distribution and parameters, including whether a gamma or exponential parameter is a rate or a scale.
Check that the stated domain contains an open interval around zero.
Differentiate for moments, or multiply MGFs for a sum only after confirming independence.
Match the expression to a known MGF using its parameterization, then check the result with moments or a domain comparison.
Worked Examples
Worked Example: A Uniform MGF and Its First Two Moments
Let \(X\) be uniformly distributed on the interval \([1,3]\). Find its MGF, state where it exists, and use it to calculate the mean and variance. The method is to integrate the density and then use the Taylor expansion at zero as a check on the derivatives.
The density is \(f_X(x)=1/2\) for \(1\leq x\leq 3\), and zero otherwise. Therefore
At \(t=0\), the defining expectation is \(M_X(0)=E[1]=1\). The displayed quotient has limit \(1\) as \(t\) tends to zero, so the complete formula uses that limiting value at zero. Because \(X\) is bounded, \(E[e^{tX}]\) is finite for every real \(t\); in particular, the MGF exists near zero.
To obtain the moments transparently, expand the expectation using the power series for \(e^{tX}\):
For a uniform variable on \([1,3]\), direct integration gives
Thus \(M_X'(0)=2\), \(M_X''(0)=13/3\), and \(\operatorname{Var}(X)=13/3-2^2=13/3-12/3=1/3\). The result is checked directly: the mean \(2\) is the interval midpoint, and the variance of a uniform variable on an interval of length \(2\) is \(2^2/12=1/3\). A common mistake is to substitute \(t=0\) directly into the quotient and report division by zero; the correct value is the limit, or the original definition \(M_X(0)=1\).
Worked Example: A Gamma Sum With a Rate Parameter
In a hypothetical model, independent waiting times \(X\) and \(Y\) are recorded in hours. Assume \(X\) has a gamma distribution with shape \(2\) and rate \(3\) per hour, and \(Y\) is exponential with rate \(3\) per hour. Find the MGF and distribution of \(S=X+Y\), and calculate its mean and variance. Use the shape-rate convention.
For a gamma variable with shape \(\alpha\) and rate \(\lambda\), the MGF is \((\lambda/(\lambda-t))^\alpha\) for \(t<\lambda\). For an exponential variable with rate \(\lambda\), it is \(\lambda/(\lambda-t)\) on the same domain. Hence
Both MGFs are finite on an open interval around zero. Since \(X\) and \(Y\) are independent, the product rule applies:
This is the MGF of a gamma variable with shape \(3\) and rate \(3\). The mean and variance of a shape-\(\alpha\), rate-\(\lambda\) gamma variable are \(\alpha/\lambda\) and \(\alpha/\lambda^2\), respectively. Therefore
The component check agrees: \(E[X]=2/3\), \(E[Y]=1/3\), so \(E[S]=1\); their variances are \(2/9\) and \(1/9\), which sum to \(1/3\) under independence. The main trap is treating the rate \(3\) as a scale \(3\). That error would use \((1-3t)^{-2}\) for \(X\), giving mean \(6\), instead of the correct mean \(2/3\). The units also provide a check: a rate is per hour, so the mean waiting time is its reciprocal, not the rate itself.
Worked Example: A Mixed Sum That Is Not Normal
Suppose \(X\) and \(Y\) are independent. Let \(X\sim N(1,4)\), where the second parameter is the variance, and let \(Y\) be exponential with mean \(2\). Find the MGF, mean, and variance of \(S=X+Y\), and decide whether the MGF identifies a normal distribution.
The normal MGF with mean \(\mu\) and variance \(\sigma^2\) is \(\exp(\mu t+\sigma^2t^2/2)\). Thus
An exponential variable with mean \(2\) has rate \(\lambda=1/2\), so its MGF is \(1/(1-2t)\), for \(t<1/2\). This domain includes an open interval around zero. Independence now gives
For a compact moment calculation, take the logarithm:
For any MGF with the needed derivatives, \((\log M_S)'(0)=E[S]\) and \((\log M_S)''(0)=\operatorname{Var}(S)\). Differentiating gives
So \(E[S]=3\) and \(\operatorname{Var}(S)=8\), which also follow by adding the independent component means \(1+2\) and variances \(4+4\). The sum is not normal: the logarithm of a normal MGF is a quadratic polynomial in \(t\), whereas this expression includes \(-\log(1-2t)\). The correct conclusion is that the sum has the displayed MGF, not that every sum of independent variables belongs to a familiar named family. A common error is to use the normal-sum rule for all independent sums; that rule applies when both summands are normal, not merely when they are independent.
Error Checks That Prevent Invalid Conclusions
MGF problems reward verification. A short check often exposes an error that algebra alone will not. Keep the distribution’s parameterization and the assumptions visible as you work.
| Check | Question to ask | Typical error caught |
|---|---|---|
| Value at zero | Does \(M_X(0)=1\), using a limit if needed? | An incorrect constant or an unhandled \(0/0\) expression |
| Domain | Is the MGF finite on an open interval containing zero? | Using a formula outside its convergence range |
| Parameterization | Is the exponential or gamma parameter a rate or a scale? | Taking a rate as the mean or scale |
| Independence | Is independence stated before multiplying MGFs? | Applying the product rule to dependent variables |
| Moments | Does the mean and variance agree with component checks where applicable? | Confusing \(E[X^2]\) with \(\operatorname{Var}(X)\) |
| Identification | Does the full MGF match the known form, including its parameters and domain? | Recognizing only a superficial algebraic resemblance |
When a candidate distribution is proposed, compare the entire MGF rather than one feature such as its first two moments. Different distributions can share a mean and variance. If the MGFs agree on an open interval around zero, the uniqueness theorem for MGFs says that they identify the same distribution. If no standard form matches, report the MGF and any moments that were requested without forcing a name onto the distribution.
Check Your Understanding
For each problem, state the relevant domain or assumption as part of your check.
- Let \(B\) be Bernoulli with success probability \(0.3\). Write its MGF and use it to find its mean and variance. (Answer: \(M_B(t)=0.7+0.3e^t\), all real \(t\); mean \(0.3\), variance \(0.21\).)
- Let \(T\) be exponential with mean \(5\) days. Give its MGF and domain, then state its variance. (Answer: \(M_T(t)=1/(1-5t)\) for \(t<0.2\); \(\operatorname{Var}(T)=25\) days squared.)
- Independent \(G_1\) and \(G_2\) have gamma distributions with shape-rate parameters \((3,2)\) and \((2,2)\). Find the MGF and distribution of their sum, and give its mean and variance. (Answer: \(G_1+G_2\sim\operatorname{Gamma}(5,\text{ rate }2)\); \(M(t)=(2/(2-t))^5\) for \(t<2\); mean \(2.5\), variance \(1.25\).)
- Independent variables satisfy \(U\sim N(-2,9)\) and \(V\sim N(4,16)\). Find the distribution and MGF of \(U+V\), using variance as the second normal parameter. (Answer: \(U+V\sim N(2,25)\); \(M(t)=\exp(2t+12.5t^2)\) for all real \(t\).)
- Independent counts \(C_1\) and \(C_2\) are Poisson with means \(2\) and \(5\), respectively. Use MGFs to find the distribution, MGF, mean, and variance of \(C_1+C_2\). (Answer: \(C_1+C_2\sim\operatorname{Poisson}(7)\); \(M(t)=\exp(7(e^t-1))\) for all real \(t\); mean and variance are both \(7\).)