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).
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
For a discrete random variable with probability mass function over support , the expectation is
Derivation hint: weight each attainable value by its probability and sum; this is the definition of a probability-weighted average (center of mass). For a continuous random variable with probability density function ,
Derivation hint: replace the sum over discrete masses by an integral over the density; is the infinitesimal probability of the interval . Here ranges over outcomes, and are nonnegative and integrate/sum to 1. The expectation exists when or (absolute convergence).
For any (measurable) function ,
Derivation hint: one need NOT find the distribution of first; weight by the probability of directly, justified by pushing forward the measure of .
The variance is the expected squared deviation from the mean :
Derivation hint: expand , take expectation termwise using linearity, and substitute . The standard deviation restores the original units. Variance has units of squared; standard deviation has the units of .
The -th raw moment is ; the -th central moment is . Thus and . The skewness and kurtosis are
Derivation hint: normalize the third and fourth central moments by powers of to obtain scale-free shape descriptors; subtracting 3 makes the normal distribution's excess kurtosis zero.
The moment generating function of is
Derivation hint: apply LOTUS with ; the MGF exists only for those in an open interval about 0 where the sum/integral converges. When exists in a neighborhood of , moments are recovered by differentiation:
Derivation hint: expand , take expectation termwise (justified by absolute convergence near 0), so ; the coefficient of is the -th moment.
For constants and independent variables :
Derivation hint: linearity of expectation gives the first; for variance, the additive constant shifts the mean but not the spread, and the factor pulls out as because variance is quadratic.
Derivation hint: ; for the sum, independence factorizes .
Derivation hint: expand and collect the cross term, which defines covariance; if independent, the covariance vanishes.
Why It Holds / Derivation
We prove from equation [4]. 1. Start from the definition with . 2. Expand the square: . 3. Apply linearity of expectation: . 4. Substitute : the middle term becomes . 5. Combine: .
∎We justify equation [7]. 1. Write the power series , valid for all real arguments. 2. Provided converges in an interval , we may interchange expectation and summation (dominated convergence), giving . 3. This is a Taylor series in ; by uniqueness of power-series coefficients, is the coefficient of . 4. Differentiating times and setting kills all lower terms and the factorials of higher terms vanish at , isolating .
∎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.
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
Given: with density for , (e.g., inter-arrival time of customers).
Step 1 — MGF. For ,
Step 2 — Mean via . , so .
Step 3 — Second moment via . , so .
Step 4 — Variance. .
Numbers (): , , .
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.
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
Historical Development
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.
See Also
Characteristic Function · Cumulant Generating Function · Central Limit Theorem · Law of Large Numbers · Covariance and Correlation · Multivariate Normal Distribution · Jensen's Inequality · Chebyshev Inequality · Concentration Inequalities