Random Variables

Suppose two dice are rolled and you care only about their sum. The underlying outcome is a pair like (3,5)(3,5). But your interest lives entirely in the number 88. This gap — between the raw, often unwieldy sample space and the numerical summaries we actually reason about — is exactly what the concept of a random variable is built to close. A random variable is not "variable" in the algebraic sense. It is also not random in the sense of being undefined. Instead, it is a completely determined function. Its "randomness" is inherited entirely from the probabilistic structure of the space it maps from. This matters because almost nothing in applied probability is stated in terms of raw outcomes. We ask for the probability that a sum exceeds 99. We ask whether a queue has more than three customers. We ask if a stock return is negative. These are all statements about numbers, not about elements of an abstract Ω\Omega. To make such statements rigorous, we need the pullback X−1(B)={ω:X(ω)∈B}X^{-1}(B) = \{\omega : X(\omega) \in B\} to always be an event. This ensures P\mathbb{P} can assign it a probability. That single requirement — measurability — is the entire technical content of the definition. It is what allows every subsequent object (distributions, expectations, densities) to be built on solid ground. The big picture: probability theory begins with (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}). This is an abstract measure-theoretic scaffold established once and for all by The Axioms of Probability. Random variables are the bridge that lets us transport this abstract machinery onto the real line. There, calculus, algebra, and ordinary numerical intuition apply. Once a random variable XX is fixed, it induces its own probability measure on R\mathbb{R} — the law of XX. The study of random variables becomes, in large part, the study of these induced measures. This happens via distribution functions, densities, and mass functions. This article gives the precise definition of a random variable as a measurable function. It explains why measurability is not a technicality but a load-bearing requirement. It proves the key structural theorem that guarantees induced probabilities are well-defined. It also works through examples with genuinely non-symmetric numbers. It closes by pointing toward the two natural next steps. These are the discrete theory built from probability mass functions, and the general theory built from cumulative distribution functions.

Key takeaways
  • A random variable is a function X:Ω→RX : \Omega \to \mathbb{R}, not a number and not literally random.
  • The defining requirement is measurability: {ω:X(ω)≤x}∈F\{\omega : X(\omega) \le x\} \in \mathcal{F} for every real xx.
  • Measurability is exactly what is needed so that P(X∈B)\mathbb{P}(X \in B) makes sense for events built from XX.
  • Every random variable induces a probability measure on R\mathbb{R} called its law or distribution.
  • Sums, products, and (measurable) functions of random variables are again random variables.
  • Key idea: randomness lives in P\mathbb{P} on Ω\Omega; XX is a fixed rule that transports it to the real line.

Where this lives today

The measurable-function definition of a random variable is not merely a formality — it is the load-bearing structure underneath essentially all of modern quantitative science. In statistics, every estimator (a sample mean, a maximum-likelihood estimate) is itself a random variable, a measurable function of the data, and its sampling distribution is exactly the induced law described here. In stochastic processes and mathematical finance, an entire process {Xt}\{X_t\} is a family of random variables indexed by time, and questions about stopping times or filtrations hinge on which σ\sigma-algebra each XtX_t is measurable with respect to — directly generalizing the single-variable definition above. In information theory and machine learning, random variables model both noisy data and internal randomness of algorithms (e.g. random initializations, stochastic gradient noise), with measurability ensuring quantities like cross-entropy loss are well-defined expectations. In statistical physics, macroscopic observables (energy, magnetization) are random variables on a microstate space, exactly mirroring the abstract-Ω\Omega-to-R\mathbb{R} structure introduced here. In cryptography, the security of a scheme is often phrased via random variables representing an adversary's view or output, with measurability guaranteeing that "probability of successful attack" is a well-posed number rather than an ill-defined heuristic.

Ask the tutor: How does the choice of σ\sigma-algebra F\mathcal{F} change which functions on Ω\Omega qualify as random variables?

DefinitionRandom Variable

Let (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}) be a probability space, where Ω\Omega is the sample space, F\mathcal{F} is a σ\sigma-algebra of events on Ω\Omega, and P\mathbb{P} is a probability measure on (Ω,F)(\Omega,\mathcal{F}). A random variable is a function

X:Ω→RX : \Omega \to \mathbb{R}

such that for every x∈Rx \in \mathbb{R},

X−1((−∞,x])={ω∈Ω:X(ω)≤x}∈F.X^{-1}((-\infty, x]) = \{\omega \in \Omega : X(\omega) \le x\} \in \mathcal{F}.

A function satisfying this condition is called F\mathcal{F}-measurable (or Borel measurable, since it is equivalent to measurability with respect to the Borel σ\sigma-algebra B(R)\mathcal{B}(\mathbb{R}) generated by intervals). We write {X≤x}\{X \le x\} as shorthand for the event above, and more generally {X∈B}\{X \in B\} for X−1(B)X^{-1}(B) whenever BB is a Borel set.

Intuition

Think of Ω\Omega as the true, possibly enormous or unstructured, space of outcomes: a sequence of coin flips, a random path of a particle, a hand of cards. The probability measure P\mathbb{P} lives on Ω\Omega and encodes everything about the experiment's uncertainty. A random variable XX is a reading device: it looks at an outcome ω\omega and reports a single real number X(ω)X(\omega), deterministically and always the same way. Roll the same two dice showing the same faces twice — you get the same sum both times. The variable does not "choose" a value; the outcome does, and XX just reads it off. Why require measurability? Because the only thing we know how to compute probabilities for are elements of F\mathcal{F}. If we want to ask "what is P(X≤8)\mathbb{P}(X \le 8)?", this question is only meaningful if the underlying set of outcomes {ω:X(ω)≤8}\{\omega : X(\omega) \le 8\} is itself an event — a member of F\mathcal{F} that P\mathbb{P} knows how to measure. Measurability guarantees this for every real threshold xx, and (as the theorem below shows) that guarantee automatically extends to every Borel set, which is essentially every set of reals one could reasonably want to consider.

Figure
The two-dice sum as a measurable function from Ω\Omega to R\mathbb{R}
Ω = {(i,j) : i,j ∈ {1,...,6}}, 36 equally likely outcomes sample points (i,j) 2 3 4 5 6 7 3 4 5 6 7 8 4 5 6 7 8 9 5 6 7 8 9 10 6 7 8 9 10 11 7 8 9 10 11 12 X : Ω → ℝ, X(i,j) = i+j 212 X = 8, 5/36 X = 7, 6/36
TheoremMeasurability via Generating Intervals

Let (Ω,F)(\Omega, \mathcal{F}) be a measurable space and let X:Ω→RX : \Omega \to \mathbb{R} be a function. The following are equivalent: 1. {X≤x}∈F\{X \le x\} \in \mathcal{F} for every x∈Rx \in \mathbb{R}. 2. {X∈B}∈F\{X \in B\} \in \mathcal{F} for every Borel set B∈B(R)B \in \mathcal{B}(\mathbb{R}). Consequently, if XX is a random variable, then PX(B):=P(X∈B)\mathbb{P}_X(B) := \mathbb{P}(X \in B) defines a well-defined probability measure on (R,B(R))(\mathbb{R}, \mathcal{B}(\mathbb{R})), called the law (or distribution) of XX.

Proof

Technique: the good-sets (Dynkin π\pi-λ\lambda) principle, applied to show a collection of "good" Borel sets is a σ\sigma-algebra containing a generating class.

(2) ⇒\Rightarrow (1). Every interval (−∞,x](-\infty, x] is a Borel set, since Borel sets are generated by such intervals (or, equivalently, by open sets, and each (−∞,x](-\infty,x] is a countable intersection of open sets (−∞,x+1/n)(-\infty, x+1/n)). So (2) applied to B=(−∞,x]B = (-\infty,x] immediately gives (1). This direction requires no further argument.

(1) ⇒\Rightarrow (2). This is the substantive direction. Define

G={B⊆R:X−1(B)∈F}.\mathcal{G} = \{ B \subseteq \mathbb{R} : X^{-1}(B) \in \mathcal{F} \}.

We show G\mathcal{G} is a σ\sigma-algebra on R\mathbb{R} containing every interval (−∞,x](-\infty, x]; since B(R)\mathcal{B}(\mathbb{R}) is by definition the smallest σ\sigma-algebra containing these intervals, this forces B(R)⊆G\mathcal{B}(\mathbb{R}) \subseteq \mathcal{G}, which is exactly claim (2). Step 1: G\mathcal{G} contains the generating intervals. By hypothesis (1), (−∞,x]∈G(-\infty, x] \in \mathcal{G} for every xx. Step 2: G\mathcal{G} contains R\mathbb{R}. Since X−1(R)=Ω∈FX^{-1}(\mathbb{R}) = \Omega \in \mathcal{F} (as F\mathcal{F} is a σ\sigma-algebra on Ω\Omega), we have R∈G\mathbb{R} \in \mathcal{G}. Step 3: G\mathcal{G} is closed under complementation. Suppose B∈GB \in \mathcal{G}, so X−1(B)∈FX^{-1}(B) \in \mathcal{F}. The key set-theoretic fact about preimages is

X−1(Bc)={ω:X(ω)∉B}=Ω∖X−1(B)=(X−1(B))c.X^{-1}(B^c) = \{\omega : X(\omega) \notin B\} = \Omega \setminus X^{-1}(B) = \big(X^{-1}(B)\big)^c.

Since F\mathcal{F} is closed under complements, (X−1(B))c∈F\big(X^{-1}(B)\big)^c \in \mathcal{F}, hence X−1(Bc)∈FX^{-1}(B^c) \in \mathcal{F}, i.e. Bc∈GB^c \in \mathcal{G}. Step 4: G\mathcal{G} is closed under countable unions. Let B1,B2,…∈GB_1, B_2, \ldots \in \mathcal{G}. The preimage of a union is the union of preimages:

X−1(⋃n=1∞Bn)=⋃n=1∞X−1(Bn).X^{-1}\Big(\bigcup_{n=1}^\infty B_n\Big) = \bigcup_{n=1}^\infty X^{-1}(B_n).

Indeed ω\omega lies in the left side iff X(ω)∈⋃nBnX(\omega) \in \bigcup_n B_n iff X(ω)∈BnX(\omega) \in B_n for some nn iff ω∈X−1(Bn)\omega \in X^{-1}(B_n) for some nn, iff ω\omega lies in the right side. Since each X−1(Bn)∈FX^{-1}(B_n) \in \mathcal{F} and F\mathcal{F} is closed under countable unions, the right-hand side is in F\mathcal{F}. Hence ⋃nBn∈G\bigcup_n B_n \in \mathcal{G}. Steps 2–4 show G\mathcal{G} is a σ\sigma-algebra (containing R\mathbb{R}, closed under complements, closed under countable unions — closure under countable intersections then follows from De Morgan's laws applied to Steps 3 and 4). Step 1 shows G\mathcal{G} contains all the intervals (−∞,x](-\infty,x]. Since B(R)\mathcal{B}(\mathbb{R}) is the smallest σ\sigma-algebra containing these intervals and G\mathcal{G} is a σ\sigma-algebra containing them, minimality gives B(R)⊆G\mathcal{B}(\mathbb{R}) \subseteq \mathcal{G}. This proves (1) ⇒\Rightarrow (2).

Well-definedness of the law. Define PX(B)=P(X−1(B))\mathbb{P}_X(B) = \mathbb{P}(X^{-1}(B)) for B∈B(R)B \in \mathcal{B}(\mathbb{R}). By the equivalence just proved, X−1(B)∈FX^{-1}(B) \in \mathcal{F} for every such BB, so P(X−1(B))\mathbb{P}(X^{-1}(B)) is a genuine, well-defined number in [0,1][0,1] by the axioms established in The Axioms of Probability. We verify the three probability axioms for PX\mathbb{P}_X:

  • Nonnegativity: PX(B)=P(X−1(B))≥0\mathbb{P}_X(B) = \mathbb{P}(X^{-1}(B)) \ge 0 since P≥0\mathbb{P} \ge 0 on F\mathcal{F}.
  • Total mass one: PX(R)=P(X−1(R))=P(Ω)=1\mathbb{P}_X(\mathbb{R}) = \mathbb{P}(X^{-1}(\mathbb{R})) = \mathbb{P}(\Omega) = 1.
  • Countable additivity: if B1,B2,…B_1, B_2, \ldots are pairwise disjoint Borel sets, then their preimages X−1(Bn)X^{-1}(B_n) are pairwise disjoint subsets of Ω\Omega (if ω∈X−1(Bi)∩X−1(Bj)\omega \in X^{-1}(B_i) \cap X^{-1}(B_j) for i≠ji \ne j then X(ω)∈Bi∩Bj=∅X(\omega) \in B_i \cap B_j = \emptyset, contradiction). Using the preimage-of-union identity from Step 4 and countable additivity of P\mathbb{P},
PX(⋃nBn)=P(⋃nX−1(Bn))=∑nP(X−1(Bn))=∑nPX(Bn).\mathbb{P}_X\Big(\bigcup_n B_n\Big) = \mathbb{P}\Big(\bigcup_n X^{-1}(B_n)\Big) = \sum_n \mathbb{P}(X^{-1}(B_n)) = \sum_n \mathbb{P}_X(B_n).

Hence PX\mathbb{P}_X is a probability measure on (R,B(R))(\mathbb{R}, \mathcal{B}(\mathbb{R})). ■\blacksquare

∎
CorollaryAlgebra of Random Variables

If XX and YY are random variables on the same probability space (Ω,F,P)(\Omega,\mathcal{F},\mathbb{P}), and g:R→Rg : \mathbb{R} \to \mathbb{R} is Borel measurable (in particular, if gg is continuous, monotone, or piecewise continuous with countably many pieces), then X+YX+Y, XYXY, cXcX for c∈Rc \in \mathbb{R}, and g(X)g(X) are all random variables on (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}).

(Proof sketch, stated for completeness — not the focus of this article: one shows {X+Y<x}=⋃q∈Q({X<q}∩{Y<x−q})∈F\{X + Y < x\} = \bigcup_{q \in \mathbb{Q}} \big(\{X < q\} \cap \{Y < x - q\}\big) \in \mathcal{F} using countability of Q\mathbb{Q} and closure of F\mathcal{F} under countable unions and finite intersections; measurability of g(X)g(X) follows from {g(X)∈B}=X−1(g−1(B))\{g(X) \in B\} = X^{-1}(g^{-1}(B)) and part (2) of the theorem above applied twice, since g−1(B)g^{-1}(B) is Borel whenever gg is Borel measurable and BB is Borel.)

Worked examples

Example 1 — A biased, non-symmetric coin-flip random variable. Let Ω={H,T}\Omega = \{H, T\} with F={∅,{H},{T},Ω}\mathcal{F} = \{\emptyset, \{H\}, \{T\}, \Omega\} and P({H})=0.37\mathbb{P}(\{H\}) = 0.37, P({T})=0.63\mathbb{P}(\{T\}) = 0.63. Define

X(ω)={5.2ω=H−1.9ω=T.X(\omega) = \begin{cases} 5.2 & \omega = H \\ -1.9 & \omega = T. \end{cases}

Check measurability directly from the definition: for any x∈Rx \in \mathbb{R},

{X≤x}={∅x<−1.9{T}−1.9≤x<5.2Ωx≥5.2.\{X \le x\} = \begin{cases} \emptyset & x < -1.9 \\ \{T\} & -1.9 \le x < 5.2 \\ \Omega & x \ge 5.2. \end{cases}

Every one of these four possible sets (∅,{T},Ω\emptyset, \{T\}, \Omega) lies in F\mathcal{F}, so XX is a random variable. Its law is the Borel measure

PX(B)=0.37⋅1{5.2∈B}+0.63⋅1{−1.9∈B},\mathbb{P}_X(B) = 0.37 \cdot \mathbf{1}_{\{5.2 \in B\}} + 0.63 \cdot \mathbf{1}_{\{-1.9 \in B\}},

a two-point (Bernoulli-type) distribution on R\mathbb{R}, concentrated at −1.9-1.9 and 5.25.2 with the given asymmetric weights — illustrating that the numeric values assigned by XX are irrelevant to which weights attach to which outcome; only the underlying P\mathbb{P} on {H,T}\{H,T\} determines the probabilities. Now compute a genuine probability statement: P(X>0)=P({X>0})\mathbb{P}(X > 0) = \mathbb{P}(\{X > 0\}). Since {X>0}={H}\{X > 0\} = \{H\} (as 5.2>05.2>0 but −1.9≯0-1.9 \not > 0), and {H}∈F\{H\} \in \mathcal{F}, this is a legitimate event with P(X>0)=0.37\mathbb{P}(X>0) = 0.37. Had XX mapped HH and TT to values with {X>0}\{X>0\} landing outside F\mathcal{F}, this computation would be undefined — which cannot happen here precisely because F\mathcal{F} is the full power set of {H,T}\{H,T\}, but would be a genuine risk on a coarser σ\sigma-algebra (see the counterexample below).

Example 2 — Sum of two non-identical dice, an explicit induced law. Let Ω={1,…,6}2\Omega = \{1,\dots,6\}^2 (36 outcomes), F=2Ω\mathcal{F} = 2^\Omega the power set, and suppose the two dice are not fair in the same way: die 1 shows each face with probability 1/61/6 (fair), but die 2 is loaded so that face 66 has probability 1/41/4 and faces 11–55 each have probability 3/203/20 (check: 5×3/20+1/4=15/20+5/20=15 \times 3/20 + 1/4 = 15/20 + 5/20 = 1). Assume independence of the two dice, as defined in Independence of Events, so

P({(i,j)})=P(die 1=i)⋅P(die 2=j).\mathbb{P}(\{(i,j)\}) = \mathbb{P}(\text{die 1} = i)\cdot \mathbb{P}(\text{die 2} = j).

Define X(i,j)=i+jX(i,j) = i + j. This is a random variable on (Ω,2Ω,P)(\Omega, 2^\Omega, \mathbb{P}) trivially, since F=2Ω\mathcal{F} = 2^\Omega makes every subset of Ω\Omega an event, so every preimage automatically lies in F\mathcal{F}. Compute P(X=9)\mathbb{P}(X = 9) explicitly. The pairs (i,j)(i,j) with i+j=9i + j = 9 and i,j∈{1,…,6}i,j \in \{1,\dots,6\} are

(3,6), (4,5), (5,4), (6,3).(3,6),\ (4,5),\ (5,4),\ (6,3).

Using independence and the two different marginal laws:

P(3,6)=16⋅14=124,P(4,5)=16⋅320=140,P(5,4)=16⋅320=140,P(6,3)=16⋅320=140.\mathbb{P}(3,6) = \tfrac16 \cdot \tfrac14 = \tfrac{1}{24}, \quad \mathbb{P}(4,5) = \tfrac16 \cdot \tfrac{3}{20} = \tfrac{1}{40}, \quad \mathbb{P}(5,4) = \tfrac16 \cdot \tfrac{3}{20} = \tfrac{1}{40}, \quad \mathbb{P}(6,3) = \tfrac16 \cdot \tfrac{3}{20} = \tfrac{1}{40}.

Summing with a common denominator of 120120: 124=5120\tfrac{1}{24} = \tfrac{5}{120} and each 140=3120\tfrac1{40} = \tfrac{3}{120}, so

P(X=9)=5+3+3+3120=14120=760≈0.1167.\mathbb{P}(X=9) = \frac{5 + 3 + 3 + 3}{120} = \frac{14}{120} = \frac{7}{60} \approx 0.1167.

This exhibits the full pipeline: XX is measurable (trivially, since F\mathcal{F} is the power set), the event {X=9}\{X=9\} is identified explicitly as a subset of Ω\Omega, and PX({9})\mathbb{P}_X(\{9\}) is computed from the underlying (here asymmetric) measure P\mathbb{P} on Ω\Omega — precisely the content of the theorem above applied to the single point B={9}B = \{9\}.

CounterexampleWhy measurability cannot be dropped

Consider Ω={1,2,3,4}\Omega = \{1,2,3,4\}, each outcome equally likely under the axioms of probability, so P({ω})=14\mathbb{P}(\{\omega\}) = \tfrac14 for each ω\omega. Take the coarse σ\sigma-algebra

F={∅, {1,2}, {3,4}, Ω},\mathcal{F} = \big\{\emptyset,\ \{1,2\},\ \{3,4\},\ \Omega\big\},

which is a legitimate σ\sigma-algebra (closed under complements and unions, contains Ω\Omega), representing an observer who can only tell whether the outcome is in {1,2}\{1,2\} or {3,4}\{3,4\}, not the exact outcome. Define Y(ω)=ωY(\omega) = \omega itself, i.e. Y(1)=1,Y(2)=2,Y(3)=3,Y(4)=4Y(1)=1, Y(2)=2, Y(3)=3, Y(4)=4 — the identity map. Test measurability at x=2x = 2:

{Y≤2}={1,2}.\{Y \le 2\} = \{1,2\}.

That happens to lie in F\mathcal{F}. But test at x=1x = 1:

{Y≤1}={1}.\{Y \le 1\} = \{1\}.

Is {1}∈F\{1\} \in \mathcal{F}? Scanning the four sets in F\mathcal{F} — ∅,{1,2},{3,4},Ω\emptyset, \{1,2\}, \{3,4\}, \Omega — the singleton {1}\{1\} is not among them. So {Y≤1}∉F\{Y \le 1\} \notin \mathcal{F}, and YY fails to be a random variable on (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}). The failure is not cosmetic. If we tried to ask "P(Y=1)\mathbb{P}(Y = 1)?", the set {Y=1}={1}\{Y=1\} = \{1\} is simply not assigned a probability by P\mathbb{P} on this σ\sigma-algebra — P\mathbb{P} is only defined on F\mathcal{F}, and {1}∉F\{1\} \notin \mathcal{F}. There is no consistent way to extend P\mathbb{P} to give {1}\{1\} a value without additional information, since P({1,2})=1/2\mathbb{P}(\{1,2\}) = 1/2 is compatible with infinitely many different splits between P({1})\mathbb{P}(\{1\}) and P({2})\mathbb{P}(\{2\}) once we leave F\mathcal{F}. This is exactly why the theorem's hypothesis — measurability with respect to the ambient F\mathcal{F}, not merely with respect to the power set — is not removable: dropping it produces functions for which basic probability statements are simply undefined, not merely hard to compute. By contrast, the coarser function X(ω)=1{ω∈{3,4}}X(\omega) = \mathbf{1}_{\{\omega \in \{3,4\}\}} (indicating group membership) is measurable with respect to this same F\mathcal{F}, since {X≤x}\{X \le x\} is always ∅\emptyset, {1,2}\{1,2\}, or Ω\Omega depending on xx — all in F\mathcal{F}. This contrast shows measurability is a genuine constraint linking how fine a function's distinctions are to how much the underlying σ\sigma-algebra can "see."

Scope, edge cases & common traps

SituationWhat to checkCommon error
F=2Ω\mathcal{F} = 2^\Omega (power set)Any function Ω→R\Omega \to \mathbb{R} is automatically measurableNone — this is the "no traps" case, common in finite/discrete models
F\mathcal{F} strictly smaller than 2Ω2^\OmegaMust verify {X≤x}∈F\{X \le x\} \in \mathcal{F} for every real xxChecking measurability at only finitely many xx and declaring victory
Composing g(X)g(X)gg must be Borel measurable, not just any functionAssuming any gg preserves random-variable status
Multiple random variables X,YX, Y on different spacesSums/products only defined if on the same Ω\OmegaAdding random variables from unrelated probability spaces
Distinguishing "law of XX" from "XX itself"The law is a measure on R\mathbb{R}; XX is a function on Ω\OmegaConflating XX with its distribution, especially when two different XX's share a law

The mathematician behind it

Origins · 1 minAndrey Nikolaevich Kolmogorov and how this was discovered
AN
Andrey Nikolaevich Kolmogorov
1903–1987 · Moscow School of Probability

Kolmogorov gave probability theory its modern axiomatic, measure-theoretic foundation in his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung ("Foundations of the Theory of Probability"). Before this work, probability was a loose collection of combinatorial techniques without a unifying rigorous framework; Kolmogorov's insight — importing Lebesgue's measure theory wholesale — made concepts like the random variable as a measurable function, the expectation as a Lebesgue integral, and the strong law of large numbers all provable within a single consistent system. He also made foundational contributions to Markov processes, turbulence, algorithmic complexity (Kolmogorov complexity), and topology, but it is the 1933 axiomatization that underlies every rigorous statement in this article.

History
- 1901–1902: Lebesgue develops measure and integration theory, the mathematical substrate later borrowed for probability.
- 1920s: Borel and others study measurable sets and functions on the real line in depth, establishing the Borel σ\sigma-algebra.
- 1933: Kolmogorov publishes the Grundbegriffe, defining probability spaces and random variables as measurable functions.
- 1930s–1940s: Doob, Lévy, and Khinchin extend the measure-theoretic framework to stochastic processes and limit theorems.
- 1950s onward: The measurable-function definition of a random variable becomes the universal standard across pure and applied probability.
Is a random variable actually random?

No — despite the name, XX is a completely fixed, deterministic function once the experiment's outcome ω\omega is known. If you roll dice and get (3,5)(3,5), the sum X(3,5)=8X(3,5) = 8 every single time; there is no additional randomness introduced by XX itself. All of the unpredictability comes from not knowing ω\omega in advance, which is governed entirely by the probability measure P\mathbb{P} on Ω\Omega. The word "random" refers to the fact that the input ω\omega is drawn according to P\mathbb{P}, and XX merely transports that uncertainty forward through a fixed rule into a real number.

Why do we need the Borel σ\sigma-algebra on R\mathbb{R} instead of just the power set of R\mathbb{R}?

The Borel σ\sigma-algebra, generated by intervals, is rich enough to contain every set one encounters in ordinary analysis (open sets, closed sets, countable unions and intersections thereof) while still being small enough to admit a consistent, countably additive measure such as Lebesgue measure. The full power set of R\mathbb{R} is provably too large: assuming the axiom of choice, it contains non-measurable sets (e.g. Vitali sets) on which no translation-invariant countably additive measure can be consistently defined. Restricting to Borel sets sidesteps this pathology entirely while losing nothing needed for probability, calculus, or statistics.

Can two different random variables have the same distribution?

Yes, and this is an important distinction to keep straight. Consider a fair coin with Ω={H,T}\Omega=\{H,T\}, and define X(H)=1,X(T)=0X(H)=1, X(T)=0 and Y(H)=0,Y(T)=1Y(H)=0, Y(T)=1. Both XX and YY have the identical law — a fifty-fifty distribution on {0,1}\{0,1\} — yet they are different functions, and in fact X=1−YX = 1-Y pointwise, so they are perfectly (negatively) correlated rather than equal. Distributional statements alone never determine the pointwise relationship between two random variables; that requires knowing them as functions on the same Ω\Omega, or knowing their joint law.

Does every function from Ω\Omega to R\mathbb{R} qualify as a random variable?

Only if it is measurable with respect to the given σ\sigma-algebra F\mathcal{F}. When Ω\Omega is finite or countable and F\mathcal{F} is taken to be the full power set of Ω\Omega (the typical convention in elementary discrete probability), every function automatically satisfies the measurability condition, because every subset of Ω\Omega, and hence every preimage, is trivially in F\mathcal{F}. But when F\mathcal{F} is a strictly smaller σ\sigma-algebra — modeling limited information, as in the counterexample above — some functions fail to be measurable and are therefore not valid random variables on that space.

How does this definition connect to discrete random variables and CDFs?

This measurable-function definition is the common foundation from which both major branches of the theory grow. When the range of XX is finite or countable, one typically studies XX through its probability mass function p(x)=P(X=x)p(x) = \mathbb{P}(X=x), the subject of Discrete Random Variables. When XX may take a continuum of values, or when one wants a single unified tool that works for any random variable, one studies the function F(x)=P(X≤x)F(x) = \mathbb{P}(X \le x), the cumulative distribution function — whose existence and well-definedness for every real xx is precisely guaranteed by the measurability condition proved in the theorem above.

Why does the proof use π\pi-λ\lambda-style "good sets" reasoning instead of just checking a formula?

Because Borel sets in general have no simple closed-form description — they are built by countably many unions, intersections, and complements starting from intervals, and can be extraordinarily complicated. The good-sets technique sidesteps needing an explicit description: instead of checking measurability for each Borel set individually, one shows the collection of sets with the measurability property is itself a σ\sigma-algebra containing the generating intervals. Minimality of the Borel σ\sigma-algebra as "the smallest such collection" then forces every Borel set into that collection automatically. This is a standard, reusable proof pattern throughout measure theory and probability.

Is measurability something I need to check by hand every time I define a random variable?

In practice, almost never, once you know the standard building blocks. Constants, indicator functions of events in F\mathcal{F}, sums, products, limits, and continuous or monotone functions of random variables are all automatically measurable — this is the content of the corollary above and its extensions. Explicit verification "from scratch" (as in the worked examples) is mainly a pedagogical exercise to internalize why the property holds; working probabilists build new random variables from old ones using these closure properties rather than re-checking preimages every time.

Before this

Where this leads