What a Moment Generating Function Represents
A probability distribution describes how probability is assigned to the possible values of a random variable. A moment generating function, or MGF, turns that distribution into a function of a parameter \(t\): for each eligible \(t\), it averages the transformed value \(e^{tX}\) over the distribution of \(X\). This gives a compact representation that is useful in later calculations with distributions.
The word “generating” can be misleading. An MGF is not a probability, and \(t\) is not itself a random variable. It is a real-valued argument used to evaluate the function. In an insurance setting, for example, \(X\) could be a hypothetical claim amount or claim count; the definition depends on the distribution of \(X\), not on the particular story used to describe it.
The expectation in the definition is taken using the distribution of \(X\). If \(X\) has a discrete distribution with possible values \(x_j\) and probabilities \(p_j\), then the expectation is a probability-weighted sum. If \(X\) has a density \(f_X\), then it is an integral using that density:
respectively, when the corresponding expectation is finite. These are ways to evaluate the definition for different kinds of distributions. The function \(M_X\) is determined by the distribution: if two random variables have the same distribution, their MGFs agree wherever the expectations are finite. A single value such as \(M_X(1)\), by itself, is not the MGF; the MGF is the function of \(t\).
How the Argument \(t\) Changes the Weighting
For \(t>0\), \(e^{tx}\) increases as \(x\) increases, so larger values of \(X\) receive greater weight in the expectation. For \(t<0\), the exponential factor decreases as \(x\) increases, so smaller values receive relatively greater weight. At \(t=0\), every possible value contributes a factor of \(1\), which explains why the expectation is \(1\).
The exponential is applied to the value of the random variable: the integrand or summand is \(e^{tx}\), not \(e^t x\). If \(X\) is measured in units, \(tX\) must be dimensionless; thus, \(t\) has reciprocal units. For instance, if \(X\) is measured in hours, \(t\) is interpreted in reciprocal hours.
MGF and Probability-Generating Function
A probability-generating function (PGF) is defined for a nonnegative integer-valued random variable, such as a count. It uses a different argument and a different transformation:
The relationship follows directly by substituting \(s=e^t\) into the PGF definition:
The equality uses the exponent rule \((e^t)^N=e^{tN}\) for each possible integer value of \(N\), followed by taking the expectation. Thus, a PGF and an MGF are closely related for counts, but they are not the same function with the same argument. The MGF applies more broadly, including to random variables that can take negative or non-integer values. A PGF, in its standard meaning, does not.
Worked Example: An MGF and PGF for a Hypothetical Claim Count
A hypothetical policy has a claim count \(N\) during one month with \(P(N=0)=0.25\), \(P(N=1)=0.50\), and \(P(N=2)=0.25\). Find its MGF as a function of \(t\), its PGF as a function of \(s\), and evaluate the MGF at \(t=\ln 2\). Use the direct expectation method; this also avoids the common mistake of treating \(t\) as the PGF argument.
Step 1: Apply the MGF definition. The three possible values of \(N\) give $$ M_N(t)=0.25e^{t\cdot 0}+0.50e^{t\cdot 1}+0.25e^{t\cdot 2} =0.25+0.50e^t+0.25e^{2t}. $$
Step 2: Form the PGF using its own argument. Replacing \(e^{tN}\) with \(s^N\) gives $$ G_N(s)=0.25s^0+0.50s^1+0.25s^2 =0.25+0.50s+0.25s^2. $$
Step 3: Evaluate the MGF. Since \(t=\ln 2\), \(e^t=2\) and \(e^{2t}=e^{2\ln 2}=4\). Therefore, $$ M_N(\ln 2)=0.25+0.50(2)+0.25(4)=0.25+1+1=2.25. $$
Check. The PGF gives the same result when evaluated at \(s=e^t=2\): \(G_N(2)=0.25+0.50(2)+0.25(4)=2.25\), as required by \(M_N(t)=G_N(e^t)\).
Evaluating the Definition for Different Distributions
The same definition applies whether a variable is discrete or continuous. For a continuous distribution, the expectation weights \(e^{tx}\) by the density and integrates over possible values. In either case, the result is a function of the chosen parameter, rather than a single fixed number.
Worked Example: MGF of a Hypothetical Uniform Repair Time
Suppose a hypothetical repair time \(T\), measured in hours, has a uniform distribution on \([0,2]\). Its density is \(f_T(x)=1/2\) for \(0\le x\le2\) and \(0\) otherwise. Find \(M_T(t)\), including its value at \(t=0\), and evaluate it at \(t=\ln 2\) per hour. Use the density form of the expectation; this avoids the mistake of summing probabilities for a continuous variable.
Step 1: Set up the expectation. Only values from \(0\) to \(2\) have positive density, so $$ M_T(t)=\int_0^2 e^{tx}\frac{1}{2}\,dx. $$
Step 2: Evaluate for \(t\ne0\). An antiderivative of \(e^{tx}\) with respect to \(x\) is \(e^{tx}/t\). Hence, $$ M_T(t)=\frac{1}{2}\left[\frac{e^{tx}}{t}\right]_0^2 =\frac{e^{2t}-1}{2t},\qquad t\ne0. $$ At \(t=0\), use the original definition: \(M_T(0)=\int_0^2(1/2)\,dx=1\). The special value is necessary because the displayed fraction has denominator zero at \(t=0\).
Step 3: Evaluate at \(t=\ln 2\). The rate is in reciprocal hours, so \(tT\) is dimensionless. Since \(e^{2\ln 2}=4\), $$ M_T(\ln 2)=\frac{4-1}{2\ln 2} =\frac{3}{2\ln 2} \approx 2.1640. $$ The decimal is rounded to four places.
Check. At \(t=0\), the MGF is \(1\), consistent with an expectation of the constant \(1\). The calculation at \(\ln 2\) used the density over the full interval \([0,2]\).
MGFs Also Apply to Variables That Can Be Negative
A PGF is tailored to counts, but the MGF definition does not require \(X\) to be nonnegative or integer-valued. The factor \(e^{tX}\) is defined for every real \(X\) and real \(t\). Whether its expectation is finite is a separate question; the definition is used only at arguments where that expectation is finite.
Worked Example: MGF of a Signed Hypothetical Reserve Change
A hypothetical one-period reserve adjustment \(R\), measured in thousands of dollars, is \(-1\), \(0\), or \(1\), each with probability \(0.25\), \(0.50\), or \(0.25\), respectively. Find its MGF and evaluate it at \(t=\ln 2\) per thousand dollars. State whether its standard PGF is applicable. Use the direct expectation method; this avoids incorrectly treating every discrete variable as a count.
Step 1: Weight each transformed value by its probability. $$ M_R(t)=0.25e^{-t}+0.50e^0+0.25e^t =0.25e^{-t}+0.50+0.25e^t. $$
Step 2: Substitute \(t=\ln 2\). Here \(e^t=2\) and \(e^{-t}=1/2\), so $$ M_R(\ln 2) =0.25\left(\frac12\right)+0.50+0.25(2) =0.125+0.50+0.50 =1.125. $$
Step 3: Check whether a PGF applies. The variable can be negative, so it is not a nonnegative integer-valued count. Its MGF is defined by the expectation above, but it does not have a standard PGF.
Check. At \(t=0\), the formula gives \(0.25+0.50+0.25=1\), confirming the required value \(M_R(0)=1\).
Common Mistakes and Why the Function Matters
An MGF packages a distribution into an expectation of an exponential transformation. Its value changes with \(t\), and the entire function—not just one evaluation—is the object of interest. In later work, the function’s algebraic form can make distribution calculations more manageable. The current definition alone does not assert that every random variable has an MGF on an interval around zero, nor does it establish a general rule for recovering a distribution from an MGF.
- Using \(e^tX\) instead of \(e^{tX}\). The exponential applies to the product \(tX\), so each contribution is \(e^{tx}\).
- Confusing the MGF with a probability. \(M_X(t)\) is an expectation of a positive transformed value. It need not lie between \(0\) and \(1\), as the value \(2.25\) in the claim-count example shows.
- Using \(t\) directly as the PGF argument. For a count, the relationship is \(M_N(t)=G_N(e^t)\). The PGF argument corresponding to \(t\) is \(e^t\).
- Applying a PGF to any discrete variable. The standard PGF is for nonnegative integer-valued variables. An MGF can be defined for other kinds of random variables when the expectation is finite.
- Substituting \(t=0\) into a simplified fraction without checking. A formula obtained by integration or algebra may have a removable zero-denominator form at \(t=0\). The definition gives \(M_X(0)=1\).
Check Your Understanding
For each problem, use the definition and distinguish the MGF argument from the PGF argument where relevant.
- A hypothetical number of equipment failures \(N\) is \(0\) with probability \(0.4\) and \(2\) with probability \(0.6\). Write \(M_N(t)\) and evaluate \(M_N(\ln 3)\). (Answer: \(M_N(t)=0.4+0.6e^{2t}\), and \(M_N(\ln 3)=5.8\).)
- A hypothetical indicator \(B\) equals \(1\) with probability \(0.2\) and \(0\) otherwise. Write its PGF and MGF, then evaluate the MGF at \(t=\ln 5\). (Answer: \(G_B(s)=0.8+0.2s\), \(M_B(t)=0.8+0.2e^t\), and \(M_B(\ln 5)=1.8\).)
- A hypothetical inspection duration \(U\) is uniform on \([0,2]\) hours. Find its MGF for \(t\ne0\) and evaluate it at \(t=\ln 2\) per hour, rounding to four decimals. (Answer: \(M_U(t)=(e^{2t}-1)/(2t)\), and \(M_U(\ln 2)=3/(2\ln 2)\approx2.1640\).)
- A hypothetical nonnegative integer-valued count \(C\) has probabilities \(P(C=0)=0.2\), \(P(C=1)=0.3\), and \(P(C=3)=0.5\). Write its MGF and PGF, then evaluate \(M_C(\ln 2)\). (Answer: \(M_C(t)=0.2+0.3e^t+0.5e^{3t}\), \(G_C(s)=0.2+0.3s+0.5s^3\), and \(M_C(\ln 2)=4.8\).)
- A hypothetical signed adjustment \(Q\) is \(-2\) or \(1\), each with probability \(0.5\). Write its MGF, evaluate \(M_Q(\ln 2)\), and state whether its standard PGF applies. (Answer: \(M_Q(t)=0.5e^{-2t}+0.5e^t\), \(M_Q(\ln 2)=1.125\), and the standard PGF does not apply because \(Q\) can be negative.)