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 . 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 .
Definition and conventions
A real random variable is a measurable map : for every Borel set , the inverse image belongs to . Equivalently, is an event for every real . Its law and cumulative distribution function are
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 with equal weights and all subsets measurable. Define to be zero on and one on . Then and . Set . The two variables have the same distribution, yet . Equality in distribution is not equality of functions.
Now give the same outcome set only the sigma-algebra generated by . A function that equals one only at is not a random variable for this coarser model: the inverse image of 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, and an event indicator 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.