Expectation, Variance, and Moment Generating Functions
Expectation, Variance, and Moment Generating Functions are the three foundational tools for summarizing the location, spread, and full distributional shape of a random variable. The expectation is the probability-weighted average (the center of mass), the variance measures squared dispersion about that center, and the moment generating function encodes ALL moments at once and uniquely determines the distribution when it exists. They apply across all of probability, statistics, physics, finance, and engineering. Core ideas trace to Huygens (1657), Chebyshev, and later formalization by Kolmogorov (1933).For a random variable , the expectation is the average value weighted by probability, the variance quantifies how far values typically lie from that average, and the moment generating function (MGF) packages the entire sequence of moments into a single function whose derivatives at recover them. These quantities matter because they reduce infinite-dimensional distributional information to interpretable numbers and because sums of independent variables behave simply under them — variances add and MGFs multiply. The surprising fact: two distributions with identical means and variances can look wildly different, yet if their MGFs agree on any interval around zero, the distributions are provably identical. The MGF thus acts as a fingerprint, turning convolution problems into algebra.
The Core Insight
A distribution can be probed at increasing depth: the expectation pins its center, the variance pins its scale, higher moments pin skew and tail weight, and the moment generating function assembles them into a master object. Operations that are hard on distributions — adding independent variables, scaling, shifting — become trivial on these summaries. This is the same philosophy as a Fourier transform: replace a complicated function (the density) by a transform (the MGF) where the hard operation (convolution) becomes a simple one (multiplication).
Formal Statement
Expectation
For a discrete random variable with probability mass function over support , the expectation is
For a continuous random variable with probability density function ,
Here ranges over outcomes, and are nonnegative and integrate/sum to 1. The expectation exists when or (absolute convergence).
Law of the Unconscious Statistician (LOTUS)
For any (measurable) function ,
Variance and Standard Deviation
The variance is the expected squared deviation from the mean :
The standard deviation restores the original units. Variance has units of squared; standard deviation has the units of .
Moments and Central Moments
The -th raw moment is ; the -th central moment is . Thus and . The skewness and kurtosis are
Moment Generating Function
The moment generating function of is
When exists in a neighborhood of , moments are recovered by differentiation:
Key Properties
For constants and independent variables :
Why It Holds / Derivation
Variance Shortcut Formula
We prove from equation [4].
- Start from the definition with .
- Expand the square: .
- Apply linearity of expectation: .
- Substitute : the middle term becomes .
- Combine: .
MGF Generates Moments
We justify equation [7].
- Write the power series , valid for all real arguments.
- Provided converges in an interval , we may interchange expectation and summation (dominated convergence), giving .
- This is a Taylor series in ; by uniqueness of power-series coefficients, is the coefficient of .
- Differentiating times and setting kills all lower terms and the factorials of higher terms vanish at , isolating .
Mean (center of mass), $\pm\sigma$ spread, and the role of the MGF as a transform
Pafnuty Chebyshev | 1821–1894
The Russian mathematician Pafnuty Chebyshev placed expectation and variance at the heart of rigorous probability. His Chebyshev inequality, , derived purely from the existence of a finite variance, gave the first distribution-free tail bound and provided the engine for his proof of the law of large numbers. He trained a school (Markov, Lyapunov) that turned moments into the principal tool of limit theory, paving the road to the central limit theorem via the method of moments.
Building Intuition
Think of a probability distribution as a thin metal rod whose mass is spread along the number line according to . The expectation is the balance point — the center of mass where the rod would balance on a knife edge. The variance is the rod's moment of inertia about that balance point: it measures how the mass is distributed away from the center, with mass far out penalized quadratically. Standard deviation rescales this back to ordinary distance units, answering "how far, typically, are we from the center?"
The MGF is best understood as a generating gadget. Imagine you want to know all the moments at once. Rather than computing infinitely many integrals, you compute one function , and then each moment falls out by differentiation, like extracting coefficients from a polynomial. The exponential acts as a "moment vacuum cleaner": its Taylor expansion sucks in every power of simultaneously, and the parameter tags each moment with its own power so they can be separated later.
Statistical Mechanics Viewpoint
A physicist immediately recognizes as a partition-function-like object. In statistical mechanics, generates the energy moments: and . The same algebra appears here through the cumulant generating function , whose derivatives at zero yield cumulants: and . That energy fluctuations relate to heat capacity is precisely the statement that the second cumulant is the variance — thermodynamics and probability share one generating-function skeleton.
Worked Examples
Exponential Distribution: Mean, Variance, MGF
Given: with density for , (e.g., inter-arrival time of customers). Step 1 — MGF. For ,Sum of Two Independent Dice: Linearity and Variance Addition
Given: Two fair six-sided dice , independent. For one die: . Step 1 — Single-die variance. . Then . Step 2 — Sum's mean (linearity, no independence needed). . Step 3 — Sum's variance (independence ⇒ covariance 0). . Step 4 — Standard deviation. .Note that variances added but standard deviations did not ().
Common Misconceptions
Variance does NOT add for the standard deviation, and only adds for variance when variables are uncorrelated. A frequent error is writing . Standard deviations add in quadrature: only when independent. A second trap: in general — for nonlinear , Jensen's inequality gives when is convex (e.g., , which is exactly why variance is nonnegative). Third: the MGF need not exist; if the defining integral diverges for all , no moments can be extracted this way.A Distribution with No MGF and Even No Mean
The Cauchy distribution with density has , so does not exist, the variance is undefined, and diverges for every . Yet the Cauchy distribution is perfectly well-defined, symmetric, and bell-shaped — a vivid reminder that "looks like a bump" does not guarantee finite moments. Its characteristic function exists, which is why characteristic functions (always defined) supersede MGFs in rigorous theory.
Connections
Expectation and variance are the first two members of an infinite hierarchy unified by the MGF, which is the real analogue of the Characteristic Function (use instead of ). The logarithm of the MGF gives the Cumulant Generating Function, whose derivatives produce cumulants that add under independence. Variance addition under independence is the seed of the Law of Large Numbers and the Central Limit Theorem, both of which Chebyshev's variance bound and the method of moments help prove. Covariance generalizes variance to the joint setting and underlies Linear Regression and the Multivariate Normal Distribution. The MGF's multiplicative property mirrors the Convolution Theorem — sums of independent variables convolve densities and multiply transforms.
Real-World Applications
- Insurance and actuarial science: expected claim size sets premiums; variance and higher moments size the risk reserve and tail exposure.
- Finance (portfolio theory): Markowitz mean–variance optimization picks asset weights to maximize for a fixed ; covariance matrices drive diversification.
- Queueing and operations (telecom, call centers): exponential inter-arrival MGFs feed Erlang and M/M/1 models predicting wait times and buffer sizes.
- Signal processing and communications: noise power equals variance; MGFs (Chernoff bounds) bound bit-error probabilities in fading channels.
- Statistical physics: the partition function is a moment/cumulant generator; energy variance equals heat capacity times .
- Quality control (Six Sigma): process capability indices compare specification limits to , directly using mean and standard deviation.
- Machine learning: variance–bias decomposition of expected error, and the reparameterization of Gaussians by their first two moments, underlie regression, PCA, and variational inference.
Historical Development
- 1654 — Pascal and Fermat correspond on the "problem of points," implicitly computing expected values of gambling outcomes.
- 1657 — Christiaan Huygens publishes De Ratiociniis in Ludo Aleae, the first printed treatise giving expectation ("expectatio") a formal definition.
- 1713 — Jacob Bernoulli's Ars Conjectandi proves the (weak) law of large numbers, tying long-run averages to expectation.
- 1733–1812 — De Moivre and Laplace develop the normal approximation, implicitly using mean and variance of binomial sums; Laplace introduces generating functions.
- 1867 — Chebyshev publishes his inequality, giving the first variance-based tail bound and a clean proof of the law of large numbers.
- 1900s — Markov and Lyapunov refine the method of moments, using moment convergence to prove central limit theorems.
- 1920s — R. A. Fisher systematizes moments, cumulants, and the term "variance" (coined 1918) in mathematical statistics.
- 1933 — Kolmogorov's Grundbegriffe axiomatizes probability via measure theory, defining expectation as a Lebesgue integral and securing all earlier results.
- 1937 — Cramér and others advance large-deviation theory using MGFs and Chernoff-type exponential bounds.
Subtleties & Limits
The MGF is powerful but fragile: it may fail to exist (heavy-tailed laws like Cauchy, log-normal, and Student-), so moment-based identification breaks down. Even when all moments are finite, they need not determine the distribution — the moment problem (Stieltjes, Hamburger) shows the log-normal distribution shares its entire moment sequence with infinitely many distinct distributions, so equal moments do not imply equal laws. The characteristic function repairs existence (it is always defined and uniquely determines the distribution), but inverting it constructively, and characterizing precisely which moment sequences correspond to a unique distribution (the determinacy conditions of Carleman and Krein), remain technically delicate. Generalizing moments and concentration bounds to high-dimensional and dependent data is an active research frontier.