Probability & Statistics Codexery

Random variable

A measurable function from sample space to measurable space.

Random variable

A random variable, also known as a random quantity, aleatory variable, or stochastic variable, is a mathematical formalization of a quantity or object which depends on random events. In its strict mathematical definition, the term does not refer to randomness or variability itself but rather to a function. This function maps from a set of all possible outcomes, called the sample space, to a measurable space. For example, when tossing a coin, the sample space contains the possible results (e.g., heads or tails). The function then assigns a numerical value to each outcome, such as mapping heads to -1 and tails to 1; the range of such a function is typically a subset of the real numbers. This formal definition allows random variables to be rigorously analyzed within the axiomatic framework of measure theory. A random variable is therefore defined as a measurable function from a probability measure space (the sample space) to a measurable space. This enables the study of its pushforward measure, known as the distribution, which is a probability measure on the set of all possible values. Two random variables can have identical distributions yet differ significantly, such as being independent. Common special cases include discrete random variables, which take values in a countable set, and absolutely continuous random variables, whose values lie in an interval of real numbers. More general possibilities include random sequences or random functions, particularly in the theory of stochastic processes. A realized outcome of a random variable is called a random variate. According to mathematician George Mackey, Pafnuty Chebyshev was the first to think systematically in terms of random variables. In statistics, the term “random variable” is traditionally limited to the real-valued case, which allows definition of expected value, variance, and cumulative distribution functions. However, the general definition applies to any measurable space of values, such as Boolean values, categorical variables, complex numbers, vectors, matrices, sequences, trees, sets, shapes, manifolds, or functions. These more general objects are often called random elements, valuable in fields like graph theory, machine learning, and computer science for modeling non-numerical data structures. A random element may also be represented as a vector of real-valued random variables.

field
Probability theory, Statistics
known_for
Formalizing random quantities as measurable functions; first systematic thinker was Pafnuty Chebyshev

Lore & Background

According to George Mackey, Pafnuty Chebyshev was the first person 'to think systematically in terms of random variables.' The term 'random variable' in its mathematical definition refers to neither randomness nor variability but instead is a mathematical function. The domain is the set of possible outcomes in a sample space, and the range is a measurable space, typically a subset of the real numbers. Informally, randomness represents chance or uncertainty, but the mathematical analysis is independent of interpretational difficulties and based on rigorous axiomatic setups.

In formal measure theory, a random variable is a measurable function from a probability measure space (the sample space) to a measurable space. This allows for the pushforward measure, called the distribution, which is a probability measure on the set of all possible values. Two random variables can have identical distributions yet differ significantly, for instance by being independent. Common special cases include discrete random variables, whose image is finite or countably infinite and can be described by a probability mass function, and absolutely continuous random variables, whose image is an interval and can be described by a probability density function (where individual points have zero probability). Not all continuous random variables are absolutely continuous. Any random variable can be described by its cumulative distribution function, which gives the probability of being less than or equal to a given value. While traditionally limited to real-valued cases in statistics, the definition extends to any measurable space, allowing random elements such as Boolean values, vectors, matrices, graphs, or functions. For example, a random word may be represented as a random integer indexing a vocabulary, or a random graph on a given number of vertices. A random variate is a particular outcome or realization of a random variable.

Reader's Guide

In the formal language of measure theory, a random variable is defined as a measurable function from a probability measure space (the sample space) to a measurable space. This allows consideration of the pushforward measure, called the distribution of the random variable. It is common to consider discrete random variables (valued in a countable subset) and absolutely continuous random variables (valued in an interval of real numbers). Any random variable can be described by its cumulative distribution function. The term 'random variable' in statistics is traditionally limited to real-valued cases, but the definition is valid for any measurable space, allowing random elements such as Boolean values, vectors, functions, and more. This broader concept is useful in fields like graph theory, machine learning, and computer science.

Did You Know?

More in Probability & Statistics 1-24

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →