Overview

A random variable translates an outcome into a number. Once the outcome is fixed, the function has a definite value; the randomness comes from the probability law on outcomes. Its distribution describes how likely its numerical values are, without necessarily retaining all details of the experiment that produced them.

This distinction permits different experiments to share a distribution. It also permits several observations on the same experiment to have the same distribution while depending strongly on each other.

Prerequisites

The underlying structure is a probability space (Ω,F,P)(\Omega,\mathcal F,P). One needs inverse images of sets and the idea of measurability. For real-valued observations, it is enough to check inverse images of intervals of the form (−∞,x](-\infty,x].

Definition and conventions

A real random variable is a measurable map X:Ω→RX:\Omega\to\mathbb R: for every Borel set BB, the inverse image X−1(B)X^{-1}(B) belongs to F\mathcal F. Equivalently, {X≤x}\{X\le x\} is an event for every real xx. Its law and cumulative distribution function are

μX(B)=P(X∈B),FX(x)=P(X≤x).\mu_X(B)=P(X\in B),\qquad F_X(x)=P(X\le x).

Vector-valued or more general measurable observations are often called random vectors or random elements. Here “random variable” means a finite real-valued function. Extended real values require explicit conventions when expectations are discussed.

Intuition

Measurability ensures that every numerical question answered by the observation corresponds to an event whose probability the model specifies. It is a compatibility requirement between an observation and the available information.

The law forgets which outcome produced each value. Consequently, it records individual probabilities but not the joint behavior of several observations unless their joint law is also specified.

Examples and non-examples

Let Ω={a,b,c,d}\Omega=\{a,b,c,d\} with equal weights and all subsets measurable. Define XX to be zero on a,ba,b and one on c,dc,d. Then P(X=1)=1/2P(X=1)=1/2 and E[X]=1/2E[X]=1/2. Set Y=1−XY=1-X. The two variables have the same distribution, yet P(X=Y)=0P(X=Y)=0. Equality in distribution is not equality of functions.

Now give the same outcome set only the sigma-algebra generated by {a,b}\{a,b\}. A function that equals one only at aa is not a random variable for this coarser model: the inverse image of {1}\{1\} is not measurable.

A constant function is a random variable. The adjective “random” does not require a nondegenerate law.

Important properties

Borel functions of a random variable are random variables, because inverse images compose. For example, X2X^2 and an event indicator 1{X>0}1_{\{X>0\}} are measurable observations.

The law is a probability measure. Its countable additivity follows by pulling disjoint sets back to disjoint events. Every CDF is nondecreasing and right-continuous; these properties follow from inclusion and continuity of probability along decreasing events.

A discrete law has point masses. An absolutely continuous law has a density. There are also singular continuous laws, so these two categories do not exhaust all distributions.

Connections and further reading

Expectation integrates the observation, and independence concerns the joint probabilities of several observations. Stochastic processes are indexed families of random variables; their sample paths organize all observations for one outcome. Lawler, Section 2 separates the function, its law, and its CDF. Peking University, §1.2.1 gives the Chinese definition and name.