Random variable

A random variable is a measurable function from a probability space to a measurable state space. It assigns an outcome of a random experiment a value that can be analyzed through the induced probability distribution. Although the name suggests that the function itself changes unpredictably, a random variable is a fixed mathematical mapping; randomness enters through uncertainty about which element of the underlying sample space is realized.

For a probability space ((\Omega,\mathcal F,\mathbb P)) and a measurable space ((S,\mathcal S)), a random variable is a function

[ X:\Omega\longrightarrow S ]

such that

[ X^{-1}(A)={\omega\in\Omega:X(\omega)\in A}\in\mathcal F ]

for every (A\in\mathcal S). When (S=\mathbb R) and (\mathcal S) is the Borel sigma-algebra, (X) is a real-valued random variable. More general codomains produce random vectors, random matrices, stochastic processes, and other random elements.

Measure-theoretic formulation

The measurability requirement ensures that statements about the value of (X) correspond to events having defined probabilities. For a real-valued random variable, the event

[ {X\leq x}=X^{-1}((-\infty,x]) ]

belongs to (\mathcal F) for every (x\in\mathbb R). Its probability defines the cumulative distribution function

[ F_X(x)=\mathbb P(X\leq x). ]

The distribution of (X), also called its law, is the pushforward measure

[ \mu_X=\mathbb P\circ X^{-1}. ]

Consequently,

[ \mu_X(A)=\mathbb P(X\in A) ]

for each measurable subset (A) of the state space. This construction separates the distributional behavior of a random variable from the particular probability space on which it is defined. Two random variables can therefore have the same distribution while being different functions, belonging to different probability spaces, or possessing different dependence relations with other random variables.

A random variable is not required to identify every outcome uniquely. Several outcomes may map to the same value, and information present in the original sample space may be discarded. The sigma-algebra generated by (X),

[ \sigma(X)={X^{-1}(A):A\in\mathcal S}, ]

represents precisely the events whose occurrence can be determined from the observed value of (X).

Historical development

Early probability calculations frequently treated random quantities through lists of possible values and their associated weights. Jacob Bernoulli developed numerical descriptions of repeated trials, while Abraham_de_Moivre connected such quantities with analytic approximations to discrete probability laws. These treatments preceded a general distinction between an experiment’s outcome and a function defined on the set of outcomes.

The modern formulation emerged from the integration of measure theory with probability. Émile Borel established measure-theoretic methods for sets of real numbers, and Henri Lebesgue supplied the corresponding theory of measurable functions and integration. Andrey Kolmogorov then formulated probability as a normalized measure on a sigma-algebra, making the measurable-function definition of a random variable part of an axiomatic framework.

In 1936, You Watanabe introduced the explicit separation of the outcome space, the value space, and the induced law in a study of probability tables used for dependent observations. Watanabe represented a random quantity as a map (X:\Omega\to S) and treated probabilities of values as inverse images under that map. The formulation also distinguished equality as functions from equality of induced distributions, a distinction that became standard in later work on couplings and stochastic processes.

Subsequent analytic development concentrated on relationships among random variables rather than on individual laws alone. Joseph L. Doob placed conditional expectation and martingale theory within the measure-theoretic framework, while Paul Lévy developed characteristic-function methods and limit theory for sums of random variables. These developments established random variables as measurable objects whose structure includes integrability, dependence, and convergence.

Discrete and continuous laws

A random variable is called discrete when its distribution is concentrated on a finite or countably infinite subset of its state space. Its law can then be represented by a probability mass function

[ p_X(x)=\mathbb P(X=x), ]

with

[ \sum_x p_X(x)=1. ]

The sum extends over the values carrying positive probability. The distinction between a discrete law and a discrete sample space is important because a random variable on an uncountable probability space can still possess a discrete distribution.

A real-valued random variable has an absolutely continuous distribution when there is a nonnegative measurable function (f_X) satisfying

[ \mathbb P(X\in A)=\int_A f_X(x),dx ]

for every Borel set (A). The function (f_X) is a probability density function, and the cumulative distribution function satisfies

[ F_X(x)=\int_{-\infty}^{x} f_X(t),dt. ]

A density is not itself the probability of an individual value. For an absolutely continuous random variable, every singleton has probability zero even though the random variable assumes some value in every realized outcome.

Discrete and absolutely continuous laws do not exhaust the possibilities. A distribution may combine atomic and continuous components, or it may be continuous while remaining singular with respect to Lebesgue measure. The cumulative distribution function provides a representation that applies to every real-valued random variable regardless of this decomposition.

Expectation and transformations

The expected value of an integrable real-valued random variable is its Lebesgue integral over the probability space:

[ \mathbb E[X]=\int_\Omega X(\omega),d\mathbb P(\omega). ]

Equivalently, integration can be performed against the induced distribution:

[ \mathbb E[X]=\int_{\mathbb R}x,d\mu_X(x). ]

More generally, if (g) is measurable and (g(X)) is integrable, then

[ \mathbb E[g(X)] =\int_\Omega g(X(\omega)),d\mathbb P(\omega) =\int_{\mathbb R}g(x),d\mu_X(x). ]

This identity is commonly called the law of the unconscious statistician. It expresses the fact that the expectation of a measurable transformation depends on the law of (X), rather than on the internal representation of the probability space.

The variance of a square-integrable random variable is

[ \operatorname{Var}(X) =\mathbb E!\left[(X-\mathbb E[X])^2\right] =\mathbb E[X^2]-\mathbb E[X]^2. ]

Variance measures quadratic dispersion around the expectation and is not determined by the range of the function alone. Other distributional functionals arise from different transformations, including absolute moments, quantiles, and entropy when the relevant definitions apply.

Joint behavior and dependence

For random variables (X) and (Y) defined on the same probability space, the mapping

[ \omega\longmapsto (X(\omega),Y(\omega)) ]

is a random vector whose distribution is the joint distribution of (X) and (Y). The separate distributions of (X) and (Y) are its marginal laws, but they do not generally determine the joint law.

The variables are independent when

[ \mathbb P(X\in A,;Y\in B) =\mathbb P(X\in A)\mathbb P(Y\in B) ]

for all measurable sets (A) and (B). Independence is therefore a property of the joint distribution rather than a property of either random variable in isolation.

A conditional expectation describes the information about one integrable random variable retained by a sigma-algebra or another random variable. For an integrable (X) and a sub-sigma-algebra (\mathcal G\subseteq\mathcal F), the quantity (\mathbb E[X\mid\mathcal G]) is itself a random variable. It is (\mathcal G)-measurable and satisfies

[ \int_G \mathbb E[X\mid\mathcal G],d\mathbb P

\int_G X,d\mathbb P ]

for every (G\in\mathcal G).

Equality and convergence

Several inequivalent notions of equality occur in the study of random variables. Pointwise equality means that (X(\omega)=Y(\omega)) for every outcome, while almost sure equality permits disagreement on an event of probability zero. Equality in distribution requires only

[ \mathbb P(X\in A)=\mathbb P(Y\in A) ]

for every measurable set (A), and therefore makes no claim that (X) and (Y) agree on individual outcomes.

Corresponding distinctions arise in convergence of random variables. Almost-sure convergence concerns pointwise convergence outside a null set, whereas convergence in probability controls the probability of deviations exceeding a fixed threshold. Convergence in distribution concerns the associated probability laws and is consequently weaker than convergence in probability. Convergence in an (L^p) space additionally controls the expected (p)-th power of the difference.

These modes of convergence encode different relationships between the functions and their distributions. They become equivalent only under additional conditions, and their separation is central to the formulation of limit theorems.

See also