Random Variables and Distributions
A random variable is a measurable function assigning numbers to outcomes of a random experiment; its distribution describes how probability is spread over those numbers. Key result: every random variable is fully characterized by its cumulative distribution function (CDF), and integrable functions of it have well-defined expectations. Applies wherever uncertainty is quantified — statistics, physics, finance, machine learning. Foundational since Kolmogorov's 1933 axiomatization.
A random variable is a function from a sample space (equipped with a probability measure) to the real numbers, subject to a measurability condition that makes probabilities of events like well-defined. Its distribution is the induced probability measure on , encoded compactly by the cumulative distribution function . This concept matters because it translates messy, abstract outcomes (coin flips, particle positions, stock prices) into numbers we can average, compare, and compute with. The surprising fact: a single function — monotone, right-continuous, with limits 0 and 1 — captures everything probabilistic about , and conversely every such function arises from some random variable.
The Core Insight
A random variable separates the mechanism of randomness (the sample space and its measure) from the numerical observable we care about. Once we have the distribution of , the original can be forgotten entirely. All probabilistic questions about — its mean, variance, the chance it exceeds a threshold — depend only on the distribution, not on the underlying experiment. This is why a "fair die" and a "spinner landing in six equal sectors" are interchangeable: same distribution, same probabilistic content.
Formal Statement
Probability Space
A probability space is a triple where:
- is the sample space (set of all outcomes),
- is a -algebra of subsets of (the events), closed under complement and countable union,
- is a probability measure with and countable additivity.
Random Variable
A random variable is a function that is measurable: for every ,
Here is the numerical value observed when outcome occurs. The measurability condition guarantees every "interesting" set for Borel is an event.
Cumulative Distribution Function
The CDF of is
Every CDF satisfies: (i) non-decreasing, (ii) right-continuous, (iii) and .
Characterization of Distributions
A function is the CDF of some random variable if and only if it is non-decreasing, right-continuous, and has limits at and at . The distribution (the induced measure on Borel sets) is uniquely determined by .
Discrete and Continuous Types
- Discrete: takes values in a countable set; described by a probability mass function (PMF) , with .
- Continuous (absolutely continuous): has a probability density function (PDF) with
For continuous , for each point; probability lives in intervals: .
Expectation and Variance
The expectation (mean) of , when it exists, is
The variance measures spread:
Why It Holds / Derivation
Law of the Unconscious Statistician (LOTUS)
Claim: For a measurable , — i.e. we can integrate against the distribution of without knowing .- By definition , an integral over the abstract space.
- The random variable pushes forward to a measure on via .
- Change of variables for pushforward measures: for any measurable ,
- Setting and recognizing as the measure with CDF gives
The phrase "unconscious statistician" reflects that practitioners use this formula instinctively, often unaware that a measure-theoretic theorem justifies it.
Andrey Kolmogorov | 1903–1987
Kolmogorov's 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung placed probability on measure-theoretic foundations, defining a random variable precisely as a measurable function on a probability space. Before him, probability lacked a rigorous axiomatic basis and was riddled with paradoxes (Bertrand's paradox, ambiguous "geometric probability"). Kolmogorov's framework unified discrete and continuous probability under one roof, made conditional expectation rigorous, and connected probability to analysis, enabling the modern theories of stochastic processes, ergodic theory, and information.
Building Intuition
Think of the sample space as a bag of all possible "states of the world," each with a probability weight. A random variable is a measuring instrument: you reach into the bag, pull out a state , and read off a number . The distribution is the histogram you'd build by repeating this enormously many times.
The CDF answers "what fraction of the weight sits at or below ?" — it sweeps from 0 (far left) to 1 (far right). A jump in means a lump of probability sits exactly at that point (discrete atom). A smooth rise means probability is smeared out (density). The steepness of the rise is exactly the density : where climbs fast, values are likely.
Expectation is the balance point of the histogram — where it would teeter on a knife-edge. Variance is the average squared distance from that balance point: small variance means a tall thin pile near the mean; large variance means a wide flat spread.
CDF and PDF of a continuous random variable: the density is the slope of the CDF
Worked Examples
Discrete: Expected value of a biased die
Given: A four-sided die with PMF . Find: and . Steps:- Check normalization: ✓
- Mean via [5]:
- Second moment:
- Variance via [6]: .
Continuous: Exponential waiting time
Given: with density for , (e.g. customer arrivals). Find: , , and . Steps:- CDF via [4]: for .
- Mean via [5] (integration by parts):
- Tail probability: .
Common Misconceptions
A density is not a probability. For a continuous random variable, can exceed 1 (e.g. a Uniform density equals 2 everywhere on its support). Only integrals of over intervals are probabilities. Likewise, for continuous does not mean the value is impossible — it means it has zero measure, a subtle distinction. Impossible events have probability 0, but probability-0 events need not be impossible. Expectation may not exist. Not every random variable has a finite (or even defined) mean. The integral in [5] requires . When this fails, statements like "the average of " are meaningless, and the Law of Large Numbers does not apply in its usual form.Cauchy distribution: no mean
Let have the standard Cauchy density . Then
Connections
Random variables are the atoms from which the entire probabilistic edifice is built. The CDF connects to Cumulative Distribution Functions and Lebesgue–Stieltjes integration. Sums of independent random variables lead to Convolution of Distributions and the Central Limit Theorem. Conditional structure between several random variables is formalized in Joint Distributions and Independence, while the long-run behavior of averages appears in the Law of Large Numbers. The transform machinery — Moment Generating Functions and characteristic functions — uses LOTUS [3]–[5] to encode distributions analytically.
Real-World Applications
- Insurance & actuarial science: Claim sizes modeled as heavy-tailed random variables (lognormal, Pareto); premiums set from plus variance loading.
- Quality control (Six Sigma): Manufacturing measurements treated as Normal random variables; defect rates computed from tail probabilities .
- Finance (Value at Risk): Portfolio returns modeled as random variables; the -quantile gives the VaR threshold for regulatory capital.
- Queueing & telecommunications: Inter-arrival times modeled as Exponential random variables (Poisson processes) to size servers and bandwidth.
- Statistical physics: A particle's energy is a random variable distributed by the Boltzmann distribution ; macroscopic quantities are expectations.
- Machine learning: Model outputs are probability distributions over labels; cross-entropy loss is of predicted probability under the true label distribution.
- Epidemiology: Incubation periods and reproduction numbers modeled as Gamma/Negative-Binomial random variables to forecast outbreak spread.
Historical Development
- 1654 — Pascal and Fermat exchange letters on the problem of points, computing expected values of gambling outcomes — the implicit birth of expectation.
- 1713 — Jacob Bernoulli's Ars Conjectandi proves the (weak) Law of Large Numbers for binomial trials, the first limit theorem for a random variable's average.
- 1733–1812 — De Moivre and Laplace develop the Normal approximation to the binomial, an early Central Limit Theorem.
- 1809 — Gauss introduces the Normal distribution in the theory of measurement errors.
- 1900s — Borel and Lebesgue develop measure theory and the Lebesgue integral, the analytic tools probability needed.
- 1909 — Borel's strong law for binary digits foreshadows almost-sure convergence.
- 1933 — Kolmogorov's Grundbegriffe axiomatizes probability: random variable = measurable function, distribution = pushforward measure.
- 1937 — Cramér and Lévy systematize characteristic functions and distribution theory.
- 1950s onward — Doob, Itô, and others extend the framework to stochastic processes, turning random variables into the building blocks of modern probability.
Subtleties & Limits
Several deep subtleties surround even this elementary topic. (1) Non-measurable functions: with the Axiom of Choice one can construct sets (Vitali sets) and functions on that are not measurable, hence not random variables — these have no well-defined probability, exposing the role of set-theoretic foundations. (2) Singular continuous distributions: there exist CDFs (e.g. the Cantor function) that are continuous yet have no density and no atoms — they are neither discrete nor absolutely continuous, defying the textbook dichotomy. (3) Existence of moments: characterizing which transforms (moment problem) uniquely determine a distribution from its moments is subtle — the lognormal distribution is famously not determined by its moments. (4) Infinite-dimensional analogues: defining "random functions" or measures on function spaces (Gaussian processes, Brownian motion) requires substantial extra machinery (Kolmogorov extension theorem) and motivates ongoing research in stochastic analysis.