# Examples of a random variable $X$ and a mapping $f$ such that $f(X)$ is not a random variable

I am reading Probability and Random Process and in chapter 4.2 where the author says something like that given a random variable $$X$$, $$f(X)$$ is also a valid random variable if $$f$$ is sufficiently smooth or regular by being continuous or monotonic. This explanation is a little bit abstract for me. Can anybody explain this further or maybe provide a counter example? Thanks a lot!

• The real answer is that f must not be measurable in the Borel sense. Commented Mar 5, 2021 at 2:47
• @MartínVacasVignolo But what does measurability have to do with smoothness?
– XXX
Commented Mar 5, 2021 at 2:49
• @Gracie continuous functions are Borel-Borel measurable, as are monotone functions. You can see this fails if you let $f$ be the indicator function of a nonmeasurable set on $[0,1]$ and $X$ is just the identity. Commented Mar 5, 2021 at 3:04

As defined by Grimmett and Stirzaker in sec. 2.1, a random variable $$X$$ on the sample space $$\Omega$$ with $$\sigma$$-algebra $$\mathcal F$$ is a real-valued function $$X$$ on $$\Omega$$ such that for every real $$x$$, $$\{\omega \in \Omega : X(\omega) \le x \} \in \mathcal F$$. Equivalently, for every Borel set $$B \subseteq \mathbb R$$, $$\{\omega \in \Omega: X(\omega) \in B\} \in \mathcal F$$.
Now $$\{\omega \in \Omega: f(X(\omega)) \in B\} = \{\omega \in \Omega: X(\omega) \in f^{-1}(B)\}$$. So in order for $$f(X)$$ to be a random variable (with the same $$\mathcal F$$), it suffices for $$f^{-1}(B)$$ to be Borel whenever $$B$$ is Borel. That is true if $$f$$ is a Borel measurable function. In particular it is true if $$f$$ is continuous.
On the other hand, for an example where $$f(X)$$ is not a random variable, you might take $$\Omega = \mathbb R$$ with Borel $$\sigma$$-algebra $$\mathcal F$$, and $$X(\omega)=\omega$$, and $$f$$ some function that is not Borel measurable.