I came across this problem.
If we throw two dice the sample space is $\Omega = \{ (i, j), 1 \leq i, j \leq 6 \}$. The $\sigma$-algebra is generated by the events $A_k = \{ (i,j) : \max(i,j) = k \}$
Show that $x_1=max(i,j)$ is a random variable and $X_2=i+j$ isn't a random variable
There's a short explanation which explains the relation within the borel sets of the random variable and their preimages.
"Actually, a function $X$ from some measurable space $(\Omega, \Sigma)$ to $\mathbb{R}$ equipped with the Borel $\sigma$-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)"
1) Whenever you have a random variable, are the events of the random variable always borel sets? I mean if we have that the probability space of the random variable is $(\Omega_X,F_X,P_X)$, then for all the random variables, the family of events $F_X$ is always the $\sigma$-borel algebra?
2) If the preimages $X_1^{-1}(x)$ are $\left \{ 1,2,3,4,5,6 \right \}$, what are the preimages $X_2^{-1}(x)$? And what would be the preimages of $X_1^{-1}(B)$ and $X_2^{-1}(B)$?
How would you show that $X_1$ is a random variable and $X_2$ isn't?
Generators of the $\sigma$-algebra, first case:
$A_1=\{(1,1)\}$
$A_2=\{(1,2),(2,2),(2,1)\}$
$A_3=\{(1,3),(2,3),(3,3),(3,2),(3,1)\}$
$A_4=\{(1,4),(2,4),(3,4),(4,4),(4,3),(4,2),(4,1)\}$
$A_5=\{(1,5),(2,5),(3,5),(4,5),(5,5),(5,4),(5,3),(5,2),(5,1)\}$
$A_6=\{(1,6),(2,6),(3,6),(4,6),(5,6),(6,6),(6,5),(6,4),(6,3),(6,2),(6,1)\}$
Here $A_k:=\{(i,j)\in\Omega\mid\max(i,j)=k\}$
Generators of the $\sigma$-algebra, second case
$B_2=\{(1,1)\}$
$B_3=\{(1,2),(2,1)\}$
$B_4=\{(1,3),(2,2),(3,1)\}$
$B_5=\{(1,4),(2,3),(4,1),(3,2)\}$
$B_6=\{(1,5),(2,4),(3,3),(5,1),(4,2)\}$
$B_7=\{(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)\}$
$B_8=\{(2,6),(3,5),(4,4),(5,3),(6,2)\}$
$B_9=\{(3,6),(4,5),(6,3),(5,4)\}$
$B_{10}=\{(4,6),(5,5),(6,4)\}$
$B_{11}=\{(5,5),(6,5)\}$
$B_{12}=\{(6,6)\}$
Here $B_k:=\{(i,j)\in\Omega\mid i+j=k\}$