5

In most probability theory texts you'll see a random variable definition that goes something like this:

A probability space is a triple $(\Omega, \mathcal{F}, P)$, a real valued random variable is a function $X:\Omega \rightarrow \mathbb{R}$

The computer scientist in my head can't get around what seems to be a type-error. Is a random variable dependent on $P$ or not. My intuition says it is, which is why we say things like 'uniformly distributed random variable', but in this case shouldn't a random variable be a function from the probability space, i.e. $X:(\Omega, \mathcal{F}, P) \rightarrow \mathbb{R}$. In fact this is how it is defined in Wolframs mathworld.

Alternatively, one could imagine in a functional programming language a function which counts the number of heads from a set of coin tosses. This function could be independent of whether or not the coin is fair or biased, etc, and hence in some way independent of $P$.

I understand some of this may be just for convenience when speaking, but this is how a random variable is rigorously defined, so I believe I must be missing something. In other words, my question is, is a random variable associated with probabilities or independent of it.

zenna
  • 1,519
  • 2
    The random variable $X:\Omega\to\mathbb{R}$ does not depend on the probability measure $P$, since it's just a function with the requirement that $X^{-1}(B)\in \mathcal{F}$ for all Borel sets $B$. The distribution of $X$, however, depends very much on what probability measure you equip $(\Omega,\mathcal{F})$ with since the distribution of $X$ (under $P$) is the probability measure on the Borel sets of $\mathbb{R}$ given by $P\circ X^{-1}$. – Stefan Hansen Mar 15 '14 at 06:53

3 Answers3

3

Your observation is reasonable, but your suggested cure for the problem, making $(\Omega,\mathcal F,P)$ the domain of $X$, won't work because the domain of a function needs to be a set (or a type or something like that). My impression is that, when people refer to a function $X:\Omega\to\mathbb R$ as a random variable, they always do so in the context of a probability-space structure ($\mathcal F$ and $P$) on $\Omega$. If no such structure is given, then I wouldn't call $X$ a random variable. And if there is uncertainty about which structure is intended, then, as you said, notions like "distribution" of $X$ will not be well-defined.

If I had to formalize the notion of random variable, in Bourbaki style, I would probably say that a random variable is a pair consisting of a probability space $(\Omega,\mathcal F,P)$ together with a function $X:\Omega\to\mathbb R$. As with many mathematical concepts, one often omits mentioning part of an entity (in this case the probability space) when it is understood from the context.

Andreas Blass
  • 76,956
1

A random variable is technically independent of a probability space, except for its domain.

Your functional programming metaphor is correct: this is exactly how we think of randomness and random variables in advanced probability theory. In a pure functional programming language (e.g. Haskell), we can't have randomness because it's a "side effect". In mathematics, we can't have randomness because we can't model it logically (except to quantify it with measures).

In both functional programming and mathematics, because we can't have randomness in our programs/logic, we pull it out and confine it to a thing we call a random source/probability space, which we assume creates/quantifies randomness. This leaves our programs/logic pristine and pure, so we can continue to use our libraries/theorems without fear of them not working because of corruption from random effects.

Allow me to speak frankly: syntax like $X : (\Omega,\mathcal{F},P) \to \mathbb{R}$ is a poor attempt at connoting something about $X$. It's confusing to newcomers and so badly thought out that it even fails to typecheck, and we mathematicians should do better.

Here's something that might work for you. A measure-theoretic model of a random process is a possibly infinite tuple

$$(\Omega,\mathcal{F},P,X_1,X_2,...)$$

where $X_1 : \Omega \to \Omega_1$ and $X_2 : \Omega \to \Omega_2$ and so on, are random variables: deterministic functions of an assumed-random source $\Omega$ whose assumed randomness is quantified by $P$. Their distributions $P_1,P_2,...$ are defined by

$$P_n(A) = P(X_n^{-1}(A))$$

or the probability of all the outcomes $\omega \in \Omega$ for which $X_n(\omega)$ is an observable outcome in $A$.

Defining a measure-theoretic model keeps the probability space and random variables in one object. If you lean object-oriented, you can imagine that $X_n$ are public accessors that return random observable outcomes, $P_n$ are public accessors that return probabilities of observable outcomes, and everything else are private implementation details that are subject to change, as long as the observed distributions remain the same.

  • The first line makes no sense. The probability space which a random variable is defined on is critical. For example, you can have convergence in distribution for a sequence of random variables defined on different probability spaces, this cannot occur for almost sure convergence or some other types of convergence. – Batman Mar 15 '14 at 06:09
  • Convergence in distribution is a property that arises from the combined properties of a probability space and random variables, or if you like, the measure-theoretic model. Such properties are not intrinsic to the random variables, which are well-defined, deterministic functions with or without a probability measure defined on their domains. – Neil Toronto Mar 15 '14 at 07:49
  • The OP is struggling with the fact that the formal definition doesn't seem to impart intrinsic properties to random variables (i.e. a probability distribution), but that philosophically, we regard them has having these intrinsic properties. The best way forward is not to insist that our philosophy is formal truth, but to demonstrate how our philosophy is only an interpretation of the facts. – Neil Toronto Mar 15 '14 at 07:58
  • Thanks Neil. Your latter comment is indeed true. Most of the other answers seem to restate what I already stated in the question. This is probably not the forum for it, but coincidentally your advisor came here (to MIT) last week and as it turns out, I think you and I are working on very similar things, albeit differently motivated. – zenna Mar 16 '14 at 02:58
-1

A random variable $X$ is a measurable map from the probability space $(\Omega, \mathcal{F}, P)$ to another measure space $(S, \mathcal{S})$ (usually $(\mathbb{R}, \mathcal{B}(\mathbb{R}))$. It is not just a function between $\Omega$ and $S$ - the measurability of the map (which intrinsically depends on the measure spaces $(\Omega, \mathcal{F}, P)$ and $(S, \mathcal{S})$) is a key part of the definition of the random variable $X$.

It is just cumbersome to write out the entire measure space every time, so we just write $X: \Omega \to S$ and keep the measures and $\sigma$-fields implicit.

Batman
  • 19,870