notesonly.in

One notebook for every subject — open it anywhere.

Log in

Moment Generating Functions Explained: An Easy Introduction

The moment generating function (MGF) of a random variable X is defined as M_X(t) = E(e^{tX}), the expected value of e raised to t times X, for t near 0 where this exists. Its magic is that derivatives at zero produce the moments of X: the first derivative gives the mean, the second gives E(X²), and so on. Instead of computing each moment with a separate sum or integral, you differentiate one function repeatedly.

The MGF matters for two reasons. First, it is a computational shortcut: moments of binomial, Poisson, exponential and normal distributions all fall out of a few derivatives. Whenever a textbook proves a distribution result elegantly, an MGF is usually doing the work behind the scenes.

Key Concepts

  • Definition: M_X(t) = E(e^{tX}) = Σ e^{tx}·p(x) for discrete X, or ∫ e^{tx}·f(x) dx for continuous X.
  • Moment extraction: the n-th derivative at zero gives the n-th moment: M′(0) = E(X), M′′(0) = E(X²).
  • Existence: the MGF must exist in some interval around 0; heavy-tailed distributions like the Cauchy have no MGF.
  • Uniqueness: the MGF determines the distribution completely wherever it exists near 0.
  • Linear transforms: M_{aX+b}(t) = e^{bt}·M_X(at), shifting and scaling distributions algebraically.
  • Sums of independents: for independent X and Y, M_{X+Y}(t) = M_X(t)·M_Y(t); MGFs multiply, their most used property.

Formulas

Definition: M_X(t) = E(e^{tX}). Moments: E(X^n) = M_X^{(n)}(0), the n-th derivative at t = 0. Mean and variance: μ = M′(0), σ² = M′′(0) − [M′(0)]². Transform: M_{aX+b}(t) = e^{bt}·M_X(at). Independent sum: M_{X+Y}(t) = M_X(t)·M_Y(t). Common MGFs: Bernoulli(p): q + p·e^t; Binomial(n, p): (q + p·e^t)^n; Poisson(λ): e^{λ(e^t − 1)}; standard normal: e^{t²/2}; exponential(λ): λ/(λ − t) for t < λ.

Worked Example

Let X be Bernoulli(p): X = 1 with probability p, X = 0 with probability q = 1 − p. The MGF is M(t) = E(e^{tX}) = q·e^{0} + p·e^{t} = q + p·e^t. Differentiate: M′(t) = p·e^t, so M′(0) = p = E(X), the mean. Again: M′′(t) = p·e^t, so M′′(0) = p = E(X²). Then Var(X) = E(X²) − [E(X)]² = p − p² = p(1 − p) = pq. Both the mean and variance emerged from two derivatives of one function, with no separate summations needed.

Common Misconceptions

  • Every distribution has an MGF: False. Very heavy-tailed distributions like the Cauchy have none because E(e^{tX}) diverges for every t ≠ 0; the characteristic function E(e^{itX}) is the universal replacement.
  • Matching means implies matching MGFs: No. Many distributions share a mean; only the full MGF, equivalently all moments, pins down the distribution.
  • The MGF gives probabilities directly: It gives moments by differentiation. Recovering probabilities requires inversion techniques, not a single formula.

Real-World Applications

MGFs prove the facts statisticians rely on: that sample averages become normal (central limit theorem), that sums of independent Poissons stay Poisson in queuing models, and that portfolio returns combine predictably. Actuaries use them for moments of aggregate insurance claims, and engineers for sums of independent noise sources in signal processing. Wherever independent random quantities are added, MGFs turn convolution into multiplication.

The moment generating function M_X(t) = E(e^{tX}) packages all moments of X into one function, with E(X^n) from the n-th derivative at zero. It is unique to each distribution, multiplies over independent sums, and transforms cleanly under scaling and shifting. From quick mean-variance calculations to proofs of the central limit theorem, it is the power tool of distribution theory.