Historical Context & Motivation
The concepts of expected value and variance arose from a deceptively simple question: when a game of chance is interrupted before completion, how should the stakes be fairly divided among the players? This question, known as the problem of points, was posed to Blaise Pascal by the Chevalier de Méré in 1654 and ignited a correspondence between Pascal and Pierre de Fermat that is widely regarded as the birth of modern probability theory. Their solution required assigning a numerical weight to each possible outcome based on its likelihood — the germ of expected value. Over the next two centuries, mathematicians extended this idea far beyond gambling, transforming it into one of the most fundamental tools in statistics, physics, economics, and computer science.
At its core, the question these pioneers sought to answer is still the question we face today: given a random variable whose outcomes are governed by a known probability distribution, what single number best summarizes where the distribution is centered, and how spread out are the outcomes around that center? The expected value answers the first question; the variance answers the second. Together, they form the indispensable foundation upon which all further probabilistic analysis is built.
Core Principles & Definitions
Before computing expected value and variance, we need a precise vocabulary. A discrete random variable X is a function from a sample space to a countable set of real numbers; its behavior is completely specified by its probability mass function (PMF) p(x) = P(X = x). The following foundational ideas govern how we summarize such distributions numerically.
Expected Value (Mean)
Variance
Standard Deviation
Linearity of Expectation
Variance of a Linear Transform
Visual Explanation
The following diagram illustrates a concrete discrete random variable — the result of rolling a loaded die — showing the PMF as a bar chart together with the expected value (the vertical dashed line) and the ±1 standard deviation band. Observe how the expected value does not need to coincide with any actual outcome; it is the probability-weighted center of mass of the entire distribution.
Notice that the expected value E[X] = 2.95 falls between outcomes 2 and 3, pulled toward 3 because that outcome carries the highest probability weight. The ±1σ band captures the bulk of the probability mass, visually demonstrating that most outcomes are reasonably close to the mean. When the distribution is more spread out — say, if outcomes 1 and 6 both had probability 0.40 — the bars would cluster at the extremes, the variance would increase dramatically, and the ±1σ band would widen to reflect greater uncertainty.
Mathematical Framework
We now formalize the definitions introduced in Section 2. Let X be a discrete random variable taking values x₁, x₂, …, xₙ (or countably many values) with probability mass function p(xᵢ) = P(X = xᵢ). All sums below run over the support of X, i.e., the set of values where p(xᵢ) > 0.
Key Properties & Comparison of Common Distributions
Expected value and variance are not merely abstract definitions; they obey a rich set of algebraic rules that make them practical computational tools. Moreover, many standard discrete distributions have clean closed-form expressions for E[X] and Var(X). The diagram below compares the PMFs of three common distributions — the Bernoulli, binomial, and geometric — annotated with their means and variances.
| Distribution | Parameters | E[X] | Var(X) |
|---|---|---|---|
| Bernoulli | p ∈ (0, 1) | p | p(1 − p) |
| Binomial | n ∈ ℕ, p ∈ (0, 1) | np | np(1 − p) |
| Geometric | p ∈ (0, 1) | 1/p | (1 − p)/p² |
| Poisson | λ > 0 | λ | λ |
| Discrete Uniform | a, b ∈ ℤ, a ≤ b | (a + b)/2 | ((b − a + 1)² − 1)/12 |
Worked Example
Consider a carnival game where you pay $5 to spin a wheel. The wheel has four sectors labeled with the following prize amounts and probabilities:
| Prize ($) | Probability |
|---|---|
| 0 | 0.40 |
| 5 | 0.30 |
| 10 | 0.20 |
| 25 | 0.10 |
Let X denote the prize won (before subtracting the cost). We will compute E[X], Var(X), and σ, then determine the expected net gain.
Strengths, Limitations & Common Pitfalls
Expected value and variance are powerful summary statistics, but they have both strengths and inherent limitations that every practitioner should understand. The table below contrasts what these measures do well with scenarios where they may be misleading or insufficient.
| Strengths | Limitations |
|---|---|
| Linearity of expectation applies universally — even for dependent random variables — making multi-variable computations tractable. | E[X] may not correspond to any achievable outcome (e.g., E[die roll] = 3.5), which can be misleading for discrete data. |
| Variance provides a single-number summary of spread that feeds directly into Chebyshev's inequality and the Central Limit Theorem. | Variance is sensitive to outliers because deviations are squared; a single extreme outcome can dominate the sum. |
| Closed-form expressions exist for all standard distributions, enabling rapid analysis without simulation. | Two distributions with identical mean and variance can have completely different shapes (e.g., different skewness), so these two numbers do not fully characterize a distribution. |
| Variance obeys Var(X + Y) = Var(X) + Var(Y) when X and Y are independent — enabling modular variance computations. | Independence is required for the additive variance property; forgetting to account for covariance is one of the most common errors in applied probability. |
Connections to Advanced Theory
The concepts of expected value and variance for discrete random variables extend naturally into several advanced areas. Understanding where these foundational ideas lead helps motivate their mastery and clarifies why they occupy such a central place in the mathematical landscape.
| Foundational Concept | Advanced Extension | Key Difference / Addition |
|---|---|---|
| E[X] = Σ xᵢ p(xᵢ) | E[X] = ∫ x f(x) dx (continuous) | Summation over a countable support generalizes to Lebesgue/Riemann integration over ℝ. |
| Var(X + Y) for independent variables | Var(X + Y) = Var(X) + Var(Y) + 2 Cov(X, Y) | Covariance and correlation capture linear dependence; essential for portfolio theory and multivariate statistics. |
| E[X] as the first moment | Moment-generating function M(t) = E[e^(tX)] | MGFs encode all moments; differentiation recovers E[X], E[X²], etc., and uniquely determine a distribution. |
| Law of Large Numbers (LLN) | Central Limit Theorem (CLT) | The LLN guarantees convergence of sample means to E[X]; the CLT further states the distribution of the sample mean approaches N(μ, σ²/n). |
| Chebyshev's inequality: P(|X − μ| ≥ kσ) ≤ 1/k² | Concentration inequalities (Hoeffding, Chernoff) | Tighter, distribution-specific bounds replace the universal but loose Chebyshev bound; critical in algorithm analysis and machine learning. |
Perhaps the most celebrated consequence of finite variance is the Central Limit Theorem: if X₁, X₂, …, Xₙ are i.i.d. with mean μ and variance σ², then the standardized sample mean (X̄ − μ)/(σ/√n) converges in distribution to the standard normal N(0, 1). This theorem is the reason the normal distribution appears throughout science, and it works precisely because the random variables possess finite expected value and variance. Without these two quantities, the CLT cannot even be stated.
Practice Problems
Summary
The expected value E[X] = Σ xᵢ p(xᵢ) provides the probability-weighted center of mass of a discrete distribution, while the variance Var(X) = E[X²] − (E[X])² quantifies the average squared deviation from the mean. The standard deviation σ = √Var(X) restores the original units of measurement. Together, these two summary statistics — the first and second central moments — are the most fundamental descriptors of any probability distribution.
Key operational properties include the linearity of expectation (E[aX + bY] = aE[X] + bE[Y], which holds for all random variables regardless of dependence) and the scaling rule for variance (Var(aX + b) = a²Var(X)). These properties enable efficient computation across standard distributions — Bernoulli, Binomial, Geometric, Poisson, and Discrete Uniform — each of which has clean closed-form formulas for mean and variance. Mastery of expected value and variance is prerequisite to the Law of Large Numbers, Central Limit Theorem, and essentially all further study in probability, statistics, and stochastic processes.