Recently I was trying to see if there exist such interesting example:
Let there be such a random variable $\xi$, that it has probability density function $p(x)$. Is it posible that if I compose it with continuous function $g$ I would get random variable $g(\xi) \not\equiv c \in \mathbb{R}$ that would have discrete distribution.
I was trying hard but could not come up with example of such random variable and continuous function. I would love to listen some examples or explanation why it is not possible. Thanks in advance!
Let $$p(x) := \begin{cases} \frac 12 & x \in [-1,0] \\ \frac 12 & x \in [1,2] \\ 0 & x \not \in [-1,0] \cup [1,2] \end{cases}$$ and $$g(x) := \begin{cases} 0 & x \le 0 \\ x & x \in [0,1] \\ 1 & x \ge 1. \end{cases}$$
Then $g(\xi)$ is a Bernoulli random variable with $P(g(\xi) = 0) = P(g(\xi) = 1)= \frac 12$.