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 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
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.
Derivation hint: This is the countable additivity axiom itself; disjointness ensures no outcome is double-counted.
A random variable is a function that is measurable: for every ,
Derivation hint: We require preimages of to be events so that is defined; these sets generate the Borel -algebra, so all Borel preimages become measurable. Here is the numerical value observed when outcome occurs. The measurability condition guarantees every "interesting" set for Borel is an event.
The CDF of is
Derivation hint: Compose the measure with the preimage from [2]; well-definedness is exactly the measurability requirement. Every CDF satisfies: (i) non-decreasing, (ii) right-continuous, (iii) and .
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: takes values in a countable set; described by a probability mass function (PMF) , with .
- Continuous (absolutely continuous): has a probability density function (PDF) with
Derivation hint: absolutely continuous by Lebesgue's differentiation theorem exists a.e. and integrates back to . For continuous , for each point; probability lives in intervals: .
The expectation (mean) of , when it exists, is
Derivation hint: The middle form is a Lebesgue–Stieltjes integral against ; it specializes to a sum or ordinary integral depending on whether jumps or is smooth. The variance measures spread:
Derivation hint: Expand and use linearity with constant.
Why It Holds / Derivation
Claim: For a measurable , — i.e. we can integrate against the distribution of without knowing . 1. By definition , an integral over the abstract space. 2. The random variable pushes forward to a measure on via . 3. Change of variables for pushforward measures: for any measurable ,
This holds first for indicators (where it is exactly the definition of ), then for simple functions by linearity, then for general by monotone convergence, then for signed by splitting into positive and negative parts. 4. 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.
∎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.
Worked Examples
Given: A four-sided die with PMF .
Find: and .
Steps: 1. Check normalization: ✓ 2. Mean via [5]:
3. Second moment:
4. Variance via [6]: .
Answer: (dimensionless pip-count).
Given: with density for , (e.g. customer arrivals).
Find: , , and .
Steps: 1. CDF via [4]: for . 2. Mean via [5] (integration by parts):
3. Tail probability: .
Answer: .
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.
Let have the standard Cauchy density . Then
So and is undefined. Sample averages of Cauchy data do not converge to any number — they keep fluctuating with the same Cauchy distribution. This dramatically refutes the intuition that "averaging always stabilizes."
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
Historical Development
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.
See Also
Cumulative Distribution Functions · Moment Generating Functions · Convolution of Distributions · Joint Distributions and Independence · Central Limit Theorem · Law of Large Numbers · Measure Theory Basics · Conditional Expectation