Skip to content

Moments from the MGF

Theorem

If the MGF MXM_X is finite on an open interval containing 00, then all moments of XX are finite and, for every nonnegative integer nn,

E[Xn]=MX(n)(0),\begin{aligned} \mathbb{E}[X^n]=M_X^{(n)}(0), \end{aligned}

where MX(n)M_X^{(n)} denotes the nnth derivative of MXM_X. The assumption is what justifies differentiating under the expectation.

The Moment Generating Function is an exponential expectation. Taking its Higher-Order Derivative brings down a power of XX each time, and evaluating at zero leaves E[Xn]\mathbb{E}[X^n]. The finiteness assumption justifies moving those derivatives under the expectation.


Interpretation

Differentiating the MGF at zero extracts the moments of the random variable one at a time: the first derivative gives EX\mathbb{E}X, the second gives E[X2]\mathbb{E}[X^2], and so on.

The MGF 1/(1 - t) of an Exponential(1) variable with its tangent line 1 + t and its quadratic approximation 1 + t + t squared at t = 0, whose coefficients give the first two moments.

For X∼Exp⁡(1)X\sim\operatorname{Exp}(1), MX(t)=1/(1−t)M_X(t)=1/(1-t) for t<1t<1. The tangent line 1+t1+t at t=0t=0 has slope MX′(0)=EX=1M_X'(0)=\mathbb{E}X=1, and the parabola 1+t+t21+t+t^2, written 1+t+22!t21+t+\tfrac{2}{2!}t^2 in the legend, matches the second derivative MX′′(0)=E[X2]=2M_X''(0)=\mathbb{E}[X^2]=2. Hence Var⁡(X)=2−12=1\operatorname{Var}(X)=2-1^2=1.

The reason is the expansion etX=1+tX+t2X2/2!+⋯\mathrm{e}^{tX}=1+tX+t^2X^2/2!+\cdots. Taking expectations term by term gives MX(t)=1+E[X] t+E[X2] t2/2!+⋯M_X(t)=1+\mathbb{E}[X]\,t+\mathbb{E}[X^2]\,t^2/2!+\cdots near 00, so, as for any Taylor series, E[Xn]\mathbb{E}[X^n] is the nnth derivative at 00, equivalently n!n! times the coefficient of tnt^n. For 1/(1−t)=1+t+t2+⋯1/(1-t)=1+t+t^2+\cdots, a geometric series for ∣t∣<1|t|<1, every coefficient is 11, so E[Xn]=n!\mathbb{E}[X^n]=n!. Finiteness of MXM_X on an open interval around 00 is what justifies the term-by-term step; without it MXM_X may be infinite on one side of 00, and then its derivatives at 00 are not defined.

The MGF delivers raw moments; the variance and other central moments then follow, as in Var⁡(X)=MX′′(0)−(MX′(0))2\operatorname{Var}(X)=M_X''(0)-(M_X'(0))^2. A common slip is to forget to set t=0t=0: MX′(t)M_X'(t) at some t≠0t\neq0 is not a moment of XX.


Key Results

  • EX=MX′(0)\mathbb{E}X=M_X'(0) and E[X2]=MX′′(0)\mathbb{E}[X^2]=M_X''(0).
  • Var⁡(X)=MX′′(0)−(MX′(0))2\operatorname{Var}(X)=M_X''(0)-(M_X'(0))^2.

Examples

  • For MX(t)=1−p+petM_X(t)=1-p+p\mathrm{e}^t, the first two derivatives at zero both equal pp, giving variance p−p2p-p^2.
  • For MX(t)=λ/(λ−t)M_X(t)=\lambda/(\lambda-t), the first two moments are 1/λ1/\lambda and 2/λ22/\lambda^2, giving variance 1/λ21/\lambda^2.

Prerequisites

Sources

Symbols: lambda

Last updated: 20 October 2026 03:02