# How to show that $\{X \le Y\}$ is an event?

Show that if $X$ and $Y$ are random variables, then $\{X \le Y \}$ is an event. I am studying pre-measure probability theory and only the simplest definitions are known.

My approach:
I know that a random variable $X:\Omega \to \mathbb R$ is such that for any $B \in \mathcal{B}(\mathbb R)$, $X^{-1}(B) \in \mathcal{F}$. Where $B$ is a member of the Borel Sets on the real line.

For a single random variable, I could say that for any $t \in \mathbb R$, $\{X^{-1}(B)\} \in \mathcal{A}$, where $\{X^{-1}(B)\} = X^{-1}((-\infty, t]))$, ( so every $X^{-1}$ is an event...). I'm not sure how to extend this to show that $\{X\le Y\}$, is also an event; I feel like I am missing something really simple.

Thanks!

-
By $(X\leq Y)$, do you mean the function that returns $1$ if $X\leq Y$ and $0$ otherwise? – Aaron Sep 18 '12 at 0:57
Sorry about that, I had asked something different than what I wanted to say, which is, that $X \le Y$ is an event. – user38784 Sep 18 '12 at 1:18
I don't get that $X\leq Y$ is an event. A random variable is a mapping...so what do you exactly mean with $X\leq Y$? – Cristian Sep 18 '12 at 1:20
I believe that it means that an event $w: X(w) \le Y(w)$, I was hoping someone would have some insight on this and I believe it is largely the source of my confusion with this problem. – user38784 Sep 18 '12 at 1:27
I think he means that the set $\{\omega\in \Omega: X(\omega) \leq Y(\omega)\}$ is measurable. – Quinn Culver Sep 18 '12 at 1:28

Note that $X\leq Y$ if and only if, for all $q\in\mathbb{Q}$, we have $X\leq q$ or $Y\geq q$. It follows that $$\{X\leq Y\}=\bigcap_{q\in\mathbb{Q}}\left(\{X\leq q\}\cup \{Y\geq q\}\right)$$ is a countable intersection of measureable sets, so is measureable.
$Z=X-Y$ is again a random variable. $X\leq Y$ is equivalent to $Z\leq0$, and $Z^{-1}((-\infty,0])$ is an event.