# Definition of random variable with respect to event space

It is given that:

We toss two dice with sample space $\Omega = \{ (i, j), 1 \leq i, j \leq 6 \}$ and the $\sigma$-algebra is generated by the events $A_k = \{ (i,j) : \max(i,j) = k \}$ $(k = 1, \ldots , 6)$. Show that whereas $X_1 = \max(i, j)$ is a random variable in the corresponding probability space, $X_2 = i + j$ is not a random variable.

I know that to be a random variable, $X_1$ and $X_2$ need to have a pre-image in the event space $\Sigma$.

$X_1$ can take on values from 1 to 6 depending on the highest number in the $(i,j)$ pair. $X_2$ can take on values from 2 (1,1) to 12 (6,6).

So if i follow the rule, one element outcome of $X_1$ and $X_2$ should have an outcome which is an element of $\Sigma$ as a pre-image. I understand that each value of $X_1$ (1 up to 6) is a possible outcome of $\Sigma$. But it is less clear for $X_2$, if I have a sum equals to 12, should I say it's not a random variable because there's not 12 in the $\Sigma$ even if the $\Sigma$ includes (6,6)?

I know that to be a random variable, $X_1$ and $X_2$ need to have a pre-image in the event space $\Sigma$.[…] So if i follow the rule, one element outcome of $X_1$ and $X_2$ should have an outcome which is an element of $\Sigma$ as a pre-image.
Actually, a function $X$ from some measurable space $(\Omega, \Sigma)$ to $\mathbb{R}$ equipped with the Borel σ-algebra is defined as a random variable if it's measurable; that is, for every Borel set $B$, the preimage $X^{-1}(B) = \{\omega : \omega \in \Omega, X(\omega) ∈ B\}$ is measurable. Notice the focus on $X^{-1}(B)$ (preimages of Borel sets) rather than $X^{-1}(\{x\})$ (preimages of individual real numbers).
So, to prove that $X_1$ is a random variable, you have to show that for every Borel set $B$, $X_1^{-1}(B) \in \Sigma$. And to show that $X_2$ isn't a random variable, you have to find a Borel set $B$ such that $X_2^{-1}(B) \notin \Sigma$. For the case of $X_2$, remember that while a set theorist knows that Borel sets are pretty special (there are only $|ℝ|$ Borel sets, whereas there are $2^{| \mathbb{R} |}$ subsets of $\mathbb{R}$), practically any specific set of real numbers you write down is going to be Borel. Non-Borel sets take some effort to construct.