Notation in the definition of random variable I am trying to understand definition of random variable.
Given a probability space $(\Omega, \mathcal F, P),$ a random variable $X$ is a function from the sample space $\Omega$ to the real numbers $\mathbb R.$ Once the outcome $\omega \in \Omega$ of the experiment is revealed, the corresponding $X(ω)$ is known as realization of the random variable.
Consider two sample spaces $\Omega_1$ and $\Omega_2$ and a sigma-algebra $\mathcal F_2$ of sets in $\Omega_2.$ Then, for $X$ to be a random variable, there must exist a sigma-algebra $\mathcal F_1$ in $Ω_1$ such that for any set $S$ in $\mathcal F_2$ the inverse image of $S,$ defined by:
$$X^{-1}(S) := \{ω \mid X(ω) ∈ S\}$$
I do not know how to read this and I am hoping some one can explain each part to me.
 A: It may be pertinent to frame the answer defining a random variable as a measurable function $X$ from the sample space of a probability space $(\Omega, \mathcal F, \mathbb P)$ to the space $(\mathbb R, \mathcal B)$ of the real numbers endowed with the Borel sigma algebra (i.e. the smallest sigma algebra which contains the open sets of $\mathbb R$), such that
$$X^{-1}(A)=\{\omega \in \Omega \mid X(\omega)\in A\}\in \mathcal F \;\; \forall A \in \mathcal B.$$
Constructing the sigma-field (or sigma-algebra) generated by two random variables will bring home the idea as follows:
The random experiment is tossing a fair die once, which has as possible outcomes or sample space $\Omega=\{1,2,3,4,5,6\}.$
It is up to the definition of the probability space to determine which events will have assigned probabilities. We could consider the events even or odd outcome and contrapose it to the events prime or not-prime. Thus we define two random variables: $X: \Omega \to \{0,1\}$ maps the outcome to $1$ if the die lands on an odd number, and otherwise $0.$ On the other hand, the second random variable $Y: \Omega\to \{0,1\}$ maps to $1$ when the die lands on a prime number.
Now these two random variables will generate two different sigma algebras. In the first case, the pre-image of the random variable $X$ will include the set $V=\{1,3,5\}$ corresponding to the value of the random variable $1$ in the Borel set $A_1=\{1\}:$
$$V=X^{-1}(A_1)=\{\omega\in\Omega \mid X(\omega) \in A_1\}=\{1,3,5\}$$
This reads: The pre-image (not the inverse function!) of the set $A_1$ for the random variable $X$ is the set $\{\text{...}\}$ containing those outcomes ($\omega$) in the big set $\Omega$ such that (that is the little bar $\mid$) the random variable maps to elements in $A_1.$ And the fact that $\{1,3,5\}\in \mathcal F$ (see below) makes the function $X$ measurable.
Logically, there would be the set $W =\{2,4,6\}$ corresponding to the pre-image of the value $0$ in the Borel set $ A_2=\{0\},$ or
$$W=X^{-1}(A_2)=\{\omega\in\Omega \mid X(\omega) \in A_2\}=\{2,4,6\}$$
The sigma algebra will also contain complementary, union and finite intersections, ending up with the sigma algebra $\mathcal F=\{\{1,3,5\} , \{2,4,6\}, \emptyset,\Omega \},$ of which $\{1,3,5\}$ and $\{2,4,6\}$ are called atoms (an atom of $\mathcal F$ is a set $F \in \mathcal F$ such that the only subsets of $F$ which are also in $\mathcal F$ are the empty set $\emptyset$ and $F$ itself). And the probability space will determine (in a fair die) that $\frac12$ is assigned to each one of them by the PMF: $\mathbb P\left(\{1,3,5\}\in \mathcal F\right )= \sum_{\mathbf 1_{1,3,5}} p(\omega_i )=3\frac 1 6.$
Here is the construct:

All Borel sets of interest have pre-images corresponding to sets in the sigma algebra $\mathcal F.$
If instead the events of interest were powers of 2 and powers of 3, the sigma algebra would contain $\small \left\{\emptyset, \Omega,\{1,2,4\},\{3,5,6\},\{1,3\},\{2,4,5,6\},\{1,2,3,4\},\{1,3,5,6\},\{1,2,4,5,6\},\{2,3,4,5,6\}\right\}$, the function simply mapping the face of the die to the numbers $1,\dots,6$ would not be a random variable, because the set formed by the pre-image of the singleton Borel set $\small \{5\}$ is not in the sigma algebra (not measurable): $\small \text{pre-image}(\{5\})=\{5\}\notin \mathcal F$.
Going back to the random variable $X,$ i.e. (odd, even), it will not contain information allowing separation of $1$ from $3$ for example, because they are both outcomes belonging to the same event ("odd").
The same exercise for $Y$ will result in two atomic sets $\{2,3,5\}$ and $\{1,4,6\},$ and a sigma algebra $\mathcal G=\{\{2,3,5\} , \{1,4,6\}, \emptyset,\Omega \}.$
This random variable $Y,$ in contradistinction to $X,$ contains information allowing us to separate the outcomes $1$ and $3.$
A: Probability notation can be a bit confusing at first! Maybe a simple example helps to see why the notation is actually chosen in a somewhat natural way:
Let's look at a specific probability space $(\Omega, F, P)$ that corresponds to the toss of a coin. So the sample space is $\Omega = \{H, T\}$, where we denote 'Heads' by $H$ and 'Tails' by $T$. We set $F = 2^\Omega$ and we're looking at a fair coin toss, so $P(H) = P(T) = \frac{1}{2}$.
Now we define the random variable $X:\Omega \rightarrow \mathbb{R}, X(H) = 0, X(T) = 1$. You can think of the r.v. $X$ as doing an 'experiment', in this case tossing the coin, and recording a $0$ for 'Heads' and a $1$ for 'Tails'. Now of course your question is, "What is the probability that my experiment results in a Heads?". So, linguistically you would want to write something like:
$$P(X = 0) = \frac{1}{2}$$
This is why we define it exactly this way:
$$P(X = 0) := P(X^-1(\{0\})) = P(\{\omega | X(\omega) = 0\})\, (= P(H) = \frac{1}{2})$$
We have to do it like this, because the probability measure $P$ 'lives' on the left-hand side (the $\Omega$-side) and can only measure things there, but the outcomes of the experiment 'live' on the right-hand side.
I hope this doesn't confuse more than it helps...
