Historical Context & Motivation
The idea that chance events could be studied systematically—rather than merely endured—emerged from a celebrated exchange of letters between two French mathematicians in 1654. Blaise Pascal and Pierre de Fermat tackled what was known as the problem of points: how should the stakes of an interrupted gambling game be fairly divided among players, given the current score? Their solution required assigning numerical values to uncertain future outcomes and weighting those values by the likelihood of their occurrence—precisely the logic that underpins the modern concept of expected value.
Over the next three centuries, the framework matured. Christiaan Huygens formalized the notion of expectation in his 1657 treatise; Jacob Bernoulli proved the first version of the law of large numbers; and Andrey Kolmogorov placed the entire enterprise on rigorous measure-theoretic foundations in 1933. The concept of a random variable—a function that maps each outcome of a random experiment to a real number—was the crucial abstraction that unified these advances and made modern probability theory possible.
The central question this lesson addresses is deceptively simple: if the outcome of a random experiment is numerical, what single number best summarizes what we should 'expect' in the long run? Answering this question requires two linked ideas—discrete random variables to describe the possible values the experiment can produce, and expected value to compute their probability-weighted center of gravity.
Core Principles & Definitions
Before computing anything, we need a precise vocabulary. A random variable is a real-valued function defined on the sample space of a probability experiment. When the set of values the function can assume is finite or countably infinite, the variable is called discrete. In contrast, a continuous random variable can take on any value in an interval. This lesson focuses exclusively on the discrete case, where we can list each possible value alongside its probability.
Random Variable (X)
Probability Mass Function (PMF)
Support of X
Expected Value E[X]
Variance Var(X)
Visualizing a Discrete PMF and Its Expected Value
The most common visualization of a discrete random variable is a probability histogram (or spike plot), which places a bar or vertical line at each value in the support, with height equal to the corresponding probability. The expected value can then be visualized as a vertical line at the distribution's center of mass. The diagram below illustrates the PMF of a loaded die where the probability of rolling a 6 is twice that of any other face.
Examining the diagram reveals an important nuance: the expected value E[X] = 4 lies between the most probable value (6, which has the tallest bar) and the median of the remaining outcomes. The loading of the die shifts the balance point away from the fair-die expectation of 3.5 toward the heavier side. This visual intuition—expected value as the fulcrum of the probability mass—generalizes to every discrete distribution and provides a quick sanity check whenever you compute E[X] algebraically.
Mathematical Framework
We now formalize the definitions introduced in Section 2. Throughout, X denotes a discrete random variable with support {x₁, x₂, …} and probability mass function p(xᵢ) = P(X = xᵢ). All summations are taken over the support of X.
Common Discrete Distributions & Their Expected Values
Many real-world experiments produce discrete random variables whose PMFs follow well-known patterns. Recognizing these patterns saves considerable computation because their expected values and variances have closed-form expressions derived from the general formula. The table and diagram below summarize the most frequently encountered discrete distributions at the introductory level.
| Distribution | PMF p(x) | Support | E[X] | Var(X) |
|---|---|---|---|---|
| Bernoulli(p) | p(1) = p, p(0) = 1 − p | {0, 1} | p | p(1 − p) |
| Binomial(n, p) | C(n,x) · px · (1−p)n−x | {0, 1, …, n} | np | np(1 − p) |
| Geometric(p) | (1 − p)x−1 · p | {1, 2, 3, …} | 1/p | (1 − p)/p² |
| Poisson(λ) | e−λ · λx / x! | {0, 1, 2, …} | λ | λ |
| Discrete Uniform(a, b) | 1 / (b − a + 1) | {a, a+1, …, b} | (a + b) / 2 | [(b − a + 1)² − 1] / 12 |
The side-by-side comparison underscores a crucial insight: the expected value alone does not fully characterize a distribution. Two distributions can share the same E[X] while differing in variance, skewness, and support. The Binomial is bounded above by n and becomes more symmetric as p approaches 0.5, whereas the Poisson extends to infinity and is always right-skewed (though the skewness decreases as λ grows). Recognizing which named distribution fits a given scenario allows you to look up E[X] and Var(X) directly rather than computing them term by term.
Worked Example: Insurance Claim Payout
Suppose an insurance company offers a one-year policy with the following payout structure. The policyholder pays a premium of $500 at the start of the year. If no claim occurs (probability 0.80), the company pays nothing. If a minor claim occurs (probability 0.15), the company pays $2,000. If a major claim occurs (probability 0.05), the company pays $20,000. Let X be the company's net profit per policy (premium collected minus payout). We wish to find E[X] and Var(X).
Properties, Strengths, and Common Pitfalls
The expected value is the most widely used summary of a probability distribution, but it is not without limitations. The following table contrasts its strengths against common misconceptions and pitfalls that arise in practice.
| Strengths | Limitations / Pitfalls |
|---|---|
| Linearity: E[aX + bY + c] = aE[X] + bE[Y] + c always holds, simplifying complex calculations. | Non-multiplicative in general: E[XY] ≠ E[X] · E[Y] unless X and Y are independent. |
| Law of large numbers guarantees convergence of sample means to E[X], giving the expected value operational meaning. | E[X] can be infinite or undefined for heavy-tailed distributions (e.g., the St. Petersburg paradox). |
| Basis for decision theory: choosing the action that maximizes expected payoff is a foundational rationality criterion. | Does not capture risk: two gambles with the same E[X] may differ vastly in variance and tail risk. |
| Decomposition via LOTUS allows E[g(X)] to be computed without finding the full distribution of g(X). | E[g(X)] ≠ g(E[X]) in general (Jensen's inequality). E.g., E[X²] ≥ (E[X])² for non-degenerate X. |
| Intuitive balance-point / center-of-mass interpretation aids understanding and error-checking. | E[X] need not be a possible value of X. For example, E[X] = 3.5 for a fair die, yet X ∈ {1,2,3,4,5,6}. |
Connection to Continuous Distributions & Moment-Generating Functions
The discrete framework developed in this lesson extends naturally to the continuous case, where the PMF is replaced by a probability density function (PDF) f(x) and summation is replaced by integration. The conceptual interpretation remains the same—expected value is a probability-weighted average—but the computational machinery shifts from Σ to ∫. Furthermore, the moment-generating function (MGF) MX(t) = E[etX] provides a compact way to encode all moments of a distribution at once, with E[X] recovered as M'(0).
| Concept | Discrete Version | Continuous Analogue |
|---|---|---|
| Probability function | PMF: p(x) = P(X = x) | PDF: f(x), where P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx |
| Expected value | E[X] = Σ xᵢ · p(xᵢ) | E[X] = ∫ x · f(x) dx |
| Variance | Var(X) = Σ (xᵢ − μ)² · p(xᵢ) | Var(X) = ∫ (x − μ)² · f(x) dx |
| Normalization | Σ p(xᵢ) = 1 | ∫ f(x) dx = 1 |
| MGF | M(t) = Σ e^(t·xᵢ) · p(xᵢ) | M(t) = ∫ e^(t·x) · f(x) dx |
The transition from discrete to continuous is more than a notational shift; it opens the door to the normal, exponential, and gamma families that dominate applied statistics. However, every key idea—linearity of expectation, LOTUS, the variance shortcut formula, and the law of large numbers—carries over unchanged. Mastering the discrete case therefore builds a foundation that transfers directly to the continuous setting and, eventually, to multivariate distributions, conditional expectations, and Bayesian inference.
Practice Problems
Lesson Summary
A discrete random variable X maps outcomes of a probability experiment to a countable set of real numbers. Its behavior is fully characterized by the probability mass function (PMF) p(x) = P(X = x), which satisfies 0 ≤ p(x) ≤ 1 and Σ p(x) = 1. The expected value E[X] = Σ xᵢ · p(xᵢ) provides a probability-weighted average that represents the long-run mean of the distribution—its center of mass on the number line. Linearity of expectation (E[aX + bY + c] = aE[X] + bE[Y] + c) is the most powerful computational tool for working with expected values, and the Law of the Unconscious Statistician (LOTUS) lets us compute E[g(X)] without deriving the distribution of g(X).
The variance Var(X) = E[X²] − (E[X])² measures spread around the mean, and its square root σ is the standard deviation. Named families—Bernoulli, Binomial, Geometric, Poisson, and discrete Uniform—have closed-form expressions for E[X] and Var(X) that eliminate term-by-term computation. These discrete concepts transfer directly to the continuous setting (PDF, integrals) and underpin advanced topics including moment-generating functions, conditional expectation, and Bayesian inference.