SECTION 1
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.
1654 • Pascal–Fermat Correspondence
1657 • Huygens' De Ratiociniis in Ludo Aleae
1713 • Bernoulli's Law of Large Numbers
1933 • Kolmogorov's Axioms
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.
SECTION 2
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)
KEY TAKEAWAY
SECTION 3
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.
SECTION 4
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.
PROBABILITY MASS FUNCTION (PMF)
The PMF assigns a probability to each value in the support. The requirement that all probabilities sum to 1 is the discrete analogue of the total-area-equals-one condition for continuous densities.
EXPECTED VALUE (MEAN)
Each possible value xᵢ is multiplied by its probability and the products are summed. The result μ (mu) is the population mean of the distribution—the theoretical long-run average.
EXPECTED VALUE OF A FUNCTION OF X
This is the Law of the Unconscious Statistician (LOTUS). To find the expected value of any function g applied to X, weight g(xᵢ) by P(X = xᵢ). No need to derive the distribution of g(X) first.
VARIANCE AND STANDARD DEVIATION
The variance measures the average squared deviation from the mean. The computational shortcut E[X²] − (E[X])² often simplifies hand calculations by avoiding the subtraction (xᵢ − μ) at every term.
Linearity of Expectation
SECTION 5
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 |
Key discrete distributions with their PMFs, expected values, and variances
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.
SECTION 6
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).
Expected Profit on an Insurance Policy
- 1
Step 1 — Define the Random Variable
The company always collects $500 in premium. Net profit X = 500 − (payout). The possible values of X are: if no claim, X = 500 − 0 = 500; if minor claim, X = 500 − 2,000 = −1,500; if major claim, X = 500 − 20,000 = −19,500.Support of X: {−19,500, −1,500, 500} - 2
Step 2 — Construct the PMF
Assign each value its probability: P(X = 500) = 0.80, P(X = −1,500) = 0.15, P(X = −19,500) = 0.05. Verify: 0.80 + 0.15 + 0.05 = 1.00 ✓PMF verified: probabilities sum to 1 - 3
Step 3 — Compute E[X]
Apply E[X] = Σ xᵢ · p(xᵢ): E[X] = (500)(0.80) + (−1,500)(0.15) + (−19,500)(0.05) = 400 + (−225) + (−975) = −800.E[X] = −$800 - 4
Step 4 — Interpret E[X]
On average, the company loses $800 per policy per year. This signals that the premium of $500 is insufficient to cover the expected claims. To break even in expectation, the company would need to charge a premium of at least $1,300 (since payouts average $1,300: 0.15 × 2,000 + 0.05 × 20,000 = 300 + 1,000 = 1,300).Break-even premium ≈ $1,300 - 5
Step 5 — Compute Var(X)
First find E[X²]: E[X²] = (500²)(0.80) + (−1,500²)(0.15) + (−19,500²)(0.05) = (250,000)(0.80) + (2,250,000)(0.15) + (380,250,000)(0.05) = 200,000 + 337,500 + 19,012,500 = 19,550,000. Then Var(X) = E[X²] − (E[X])² = 19,550,000 − (−800)² = 19,550,000 − 640,000 = 18,910,000. Standard deviation σ = √18,910,000 ≈ $4,348.56.Var(X) = 18,910,000; σ ≈ $4,348.56
Practical Note
SECTION 7
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}. |
Strengths and limitations of expected value as a distributional summary
KEY TAKEAWAY
SECTION 8
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) = ∫ · f(x) dx |
Discrete-to-continuous correspondence
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.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
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.