Definition of a random variable and the measure in the pre-image space I have a question regarding the definition of a random variable.
$$ X\colon (\Omega,\Sigma,P) \to (\mathbb{R},\mathcal{B}(\mathbb{R}), P_X)$$
I'm struggling with the intuition of the $P$ in the preimage probability space. Why is it not defined as:
$$ X\colon (\mathbb{R},\mathcal{B}(\mathbb{R}), P_X) \to (\mathbb{R},\mathcal{B}(\mathbb{R}), P_X)$$
 A: First it is worth highlighting that a random variable cannot exist on its own. There needs to be some underlying probability space, e.g., using notation in the question $(\Omega, \Sigma, P)$. This probability space is precisely what allows to construct different random variables having specific joint distributions, independence properties, correlation properties between each other and so on. You can think of it as something that justifies the statements like:

Let $X_{1}, X_{2}, \dots$ be i.i.d random variables having distribution...

or

Let $X$ and $Y$ be random variables having joint distribution...

So the random variables we care about are tied together by some underlying probability space. We can then answer questions about our random variables using the probability measure of that underlying probability space - e.g. assuming $X$ takes values in $(\mathbb{R}, \mathcal{B}(\mathbb{R}))$ we can calculate $P(X < 0)$. Writing out in full:
$$
\tag{1}
\label{random-variable-measure}
P(X < 0) = P(\{\omega \in \Omega \mid X(\omega) < 0\}),
$$
we see that we can indeed calculate the above probability using $P$, since the definition of a random variable $X$ on $(\Omega, \Sigma, P)$ requires, that $\forall B \in \mathcal{B}(\mathbb{R})\ \  X^{-1}(B) \in \Sigma$.
Equation \ref{random-variable-measure} generalizes to inducing a measure $P_{X}$ on $(\mathbb{R}, \mathcal{B}(\mathbb{R}))$ given by $P_{X}(B) = P(X^{-1}(B))$. So now instead of having some obscure measure $P$ on $(\Omega, \Sigma)$, we have a new measure $P_{X}$ on a much friendlier measurable space $(\mathbb{R}, \mathcal{B}(\mathbb{R}))$. In introductory discrete probability theory $P_{X}$ is often called the probability mass function.
I recommend David Williams' "Probability with Martingales" for an intuitive introduction to measure-theoretic probability theory.
