# Why random variable is defined as a mapping from the sample space?

Consider a probability space $(\Omega, \mathcal{F}, P)$. Why in the definition of a random variable $X$ it is required that $X$ is a mapping from the sample space and not from the $\sigma$-algebra of events? That is, why $X: \Omega \rightarrow R$ and not $X: \mathcal{F} \rightarrow R$?

• You want the preimage of a subset of $\mathbb{R}$ to be an element of $\mathcal{F}$ (so you can assign a measure to it), not a collection of elements of $\mathcal{F}$. – Qiaochu Yuan Jun 19 '11 at 23:26
• A collection of elements of $\mathcal{F}$, interpreted as the union of these elements, is an element of $\mathcal{F}$. – Leo Jun 19 '11 at 23:32
• Yes, but that's completely unnecessary when you can just take a union of points in $\Omega$ instead. – Qiaochu Yuan Jun 19 '11 at 23:35
• You can, however, think of $X$ as a map from $R$ to $F$,by taking preimages. You then get a morphism of sigma-algebras. Some probabilistic questions can be phrased only in terms of this morphism. – Mark Jun 19 '11 at 23:38

This was originally posted as a comment:

Here is a question whose goal is to make you understand what others already wrote. Follow your suggestion and assume that X: $\mathcal{F}\to\mathbb{R}$ for your favorite random variable X (say, the result of the throw of a die, that is, an integer from 1 to 6). What numbers would be X(∅) and X(Ω)?

This is a very good point, thank you. It made me realize that events from $\mathcal{F}$ may happen simultaneously; in particular, event Ω always happens with any event. If we define X on $\mathcal{F}$, how to choose its values then? For a "die" random variable, for example, there is no way to define it on $\mathcal{F}$.

• You're welcome. In their book "Probability, random variables, and stochastic processes" Papoulis and Pillai discuss, in section 2-2, the Probability space. They say that "In the applications of probability theory to physical problems, the identification of experimental outcomes is not always unique." For a die rolling experiment, we can define the sample space $S$ to be $S_1=\{f_1, \dots, f_6\}$ ($f_i$ faces of die) or $S_2=\{even, odd\}$. For me, $S_2$ can be seen as a subset of $S_1$ representing events – Learn_and_Share Nov 17 '17 at 20:02
• @MedNait Sorry but do you have a question here? – Did Nov 17 '17 at 20:03
• i.e. $S_2$ can be seen as a field $\mathcal{F}$ of events constructed from $S_1$. Which is to say that if we consider our sample space as $S_2$ we can interpret a random variable $X$ as being mapped from this sample space $S_2$ or from the field $\mathcal{F}$ equivalently! am I wrong? Please correct me if I am. What are your thoughts on that? – Learn_and_Share Nov 17 '17 at 20:04
• @MedNait My thoughts are that if you have another, even related, problem, you should ask it as a new question on the site. – Did Nov 17 '17 at 20:10

The sample space can be viewed as the "states of nature." A random variable represents a measurement of the system under observation. The $\sigma$-algebra represents the subsets of the sample space to which we can assign probability.

• This is correct. But if we consider example in this question, we see that random variable can not be defined for each possible outcome (element of $\Omega$) without considering other outcomes and without considering the defined events. So why not consider just $\mathcal{F}$ instead? – Leo Jun 19 '11 at 23:39
• How does this answer the question? You just wrote the definitions. – nbro Dec 24 '19 at 23:39

The main reason is that in probability theory one often works with multiple $\sigma$-algebras defined on a common sample space $\Omega$.

A very standard example is a collection of $\sigma$-algebras $({\mathcal F})_{n \in {\mathbb Z}}$ such that ${\mathcal F}_n \subset {\mathcal F}_{n+1}$ for all $n \in {\mathbb Z}$. If one thinks about the $\sigma$-algebra as an amount of knowledge about $\Omega$ then this would represent gradual gathering of information. Therefore if $X$ is ${\mathcal F}_n$-measurable for some $n \in {\mathbb Z}$ it will naturally be measurable in all "later" algebras ${\mathcal F}_m$, $m \geq n$. From this point of view, it's more natural to think about $X$ as residing in $\Omega$ rather than in one concrete $\sigma$-algebra. [Note: nevertheless, it's true that there exists also a canonical $\sigma$-algebra associated with $X$, namely $\sigma(X)$ which is a smallest $\sigma$-algebra that makes $X$ measurable.]

Another reason one doesn't want to restrict random variable to one particular $\sigma$-algebra is that we often use operations such as conditional expectation $\mu(X\mid {\mathcal A})$ of random variable w.r.t. $\sigma$-algebra. Operations like these effectively change what you'd consider a domain of the random variable from one $\sigma$-algebra to another.

There is much more to be said and it all has to do with probabilistic way of thinking but the bottom line would be that in probability theory one has a huge amount of freedom of how to model the given problem: there is no canonical sample space, no canonical $\sigma$-algebra and no canonical measure; each of them can be extended and restricted as the need requires.