A random variable, or stochastic variable, is a quantity that is subject to ‘random’ variation.
Some authors in probability theory distinguish between random variables and random elements: a random element is a generic entity (such as a point of a set or space) subject to random variation, while a random variable is specifically a number subject to random variation.
The formalization of this idea in modern probability theory (Kolmogorov 33, III) is to take a random variable to be a measurable function $f$ on a probability space $(X,\mathcal{F},\mu)$ (e.g. Grigoryan 08, 3.2, Dembo 12, 1.2.1).
One thinks of $X$ as the space of all possible configurations (all the “possible worlds” with respect to the idealized situation under consideration), thinks of the measure $\mu(U)$ of any subset of it as the probability that one of the configurations $x \in U \subset X$ is randomly realized, and thinks of $f(x)$ as the value of the given random variable in the situation of that configuration.
Often, a random element is a measurable function $X\to Y$, where $Y$ is a generic measurable space, while the term random variable is reserved for the case where $Y$ is $\mathbb{R}$, $\mathbb{R}^n$, or a more general vector space. One speaks for example of random elements of a set, and of real-valued or vector-valued random variables.
In particular, the term random variable tends to be used for those situation where there is a notion of expectation value. For example the expectation value of a (real-valued) random variable $f$ is the integral
of $f$ against the probability measure $\mu$, i.e. the average value of the random variable over all possible configuration, weighted by their probability.
There is at least some similarity of the concept of random variables to usage of the function monad (“reader monad”) in the context of monads in computer science.
In Verdier 14 it says:
The intuition behind the Reader monad, for a mathematician, is perhaps stochastic variables. A stochastic variable is a function from a probability space to some other space. So we see a stochastic variable as a monadic value.
and in Toronto-McCarthy 10b, slide 35:
you could interpret this by regarding random variables as reader monad computations.
See also (Toronto-McCarthy 10b, slide 24). Toronto-McCarthy 10a, 2.2, Toronto 14 call the function monad the random variable idiom.
Given a measure space $(X,\Sigma,\mu)$, a random variable is also often defined as an equivalence class of measurable real-valued functions on $X$ where two such functions are identified when they differ only on a subset of measure zero.
In this context, it has been observed by P. Deligne^{1} that the po-set of measurable subsets $\Sigma$ can be equipped with a suitable Grothendieck topology.
In the resulting Grothendieck topos $Meas(X,\Sigma,\mu)$ the object of Dedekind real numbers $R_D$ corresponds to the sheaf of random variables on $X$ in this sense.
A Dedekind real in a topos $Sh(X)$ of sheaves on a topological space is just a continuous real-valued function on $X$. This suggests the view that the sheaf-theoretic perspective on $(X,\Sigma,\mu)$ sweeps the measure-theoretic details under the rug and brings out the conceptual essence of a random variable as simply a real-valued ‘function’ or ‘variable real number’ on $X$ and goes in the same direction as the connection to the function monad mentioned in the previous section.
The details of this example, due to D. Scott, are described in (Johnstone 1977, p.213).
The modern formal concept originates around
Surveys and lecture notes include
Alexander Grigoryan, Measure theory and probability, 2008. (pdf)
Amir Dembo, Probability theory, 2012. (pdf)
For more information on the above topos-theoretic example consult
Discussion from a point of view of type theory/computer science includes
Neil Toronto, Jay McCarthy, From Bayesian notation to pure Racket, via measure-theoretic probability, in Implementation and Application of Functional Languages, 2010. (article)
Neil Toronto, Jay McCarthy, From Bayesian Notation to Pure Racket, talk notes 2010. (pdf)
Neil Toronto, Useful Languages for Probabilistic Modeling and Inference, PhD Thesis, 2014. (pdf, slides)
Olivier Verdier, The Reader and Writer Monads and Comonads, 2014.
Last revised on July 11, 2024 at 04:22:58. See the history of this page for a list of all contributions to it.