Measure-Theoretic Probability

a random variable as a measurable function

In elementary courses a random variable is described loosely as a number that depends on chance. The rigorous definition pins this down: a random variable is a function from the sample space to the real numbers that is well-behaved enough that every question of the form is X in this range a legitimate event. That extra requirement — measurability — is what guarantees the probability P(X in B) actually makes sense for the ranges B you care about.

Precisely, given a probability space (Omega, F, P), a random variable X is a function X: Omega -> R such that for every Borel set B in R, the preimage X^(-1)(B) = { omega in Omega : X(omega) in B } belongs to F. In words: whenever you describe an outcome-set by a condition on the value of X, that set must be one of your allowed events. It is enough to check this for the half-lines, i.e. that { omega : X(omega) <= x } is an event for every real x, because the half-lines generate the Borel sets (a Dynkin-style fact). Once X is measurable, P(X in B) is defined as P(X^(-1)(B)) — you pull the question back through X and measure it on the original space. This is the precise meaning of the loose phrase the probability that X lands in B.

Why does measurability matter rather than being a technicality? Because without it, P(X <= x) might refer to a non-measurable set and have no value at all, and the cumulative distribution function would not exist. Measurability is exactly the minimal condition that makes a function carry probability faithfully from Omega out to the real line. Reassuringly, every function you can write down with formulas, sums, limits, and continuous operations is automatically measurable, so the condition never bites in practice — it only excludes pathological functions built with the axiom of choice.

For two coin tosses, Omega = {HH, HT, TH, TT} and X = number of heads sends HH -> 2, HT -> 1, TH -> 1, TT -> 0. The event {X = 1} pulls back to {HT, TH}, which is in F, so P(X = 1) = P({HT, TH}) = 1/2 — the function carries probability cleanly from Omega to the line.

A random variable pulls Borel sets back to events; measurability is what makes P(X in B) meaningful.

Measurability is checked by preimages going the right way: X is measurable if X^(-1)(Borel) lands in F, not the other way around; and it suffices to verify {X <= x} is an event for every x.

Also called
measurable function可測函數隨機變數的嚴格定義