# Continuous random variable that is constant for a fraction of the domain

Consider a random variable $$X$$ defined on $$[0,1]$$, which is $$X(\omega)= \begin{cases} 0.5, \omega \in [0,0.5]\\ \omega, \omega \in (0.5,1] \end{cases}$$. Intuitively, this definition makes sense to me. However, $$X$$ is $$0.5$$ for a fixed fraction of the domain. Thus, $$\Pr[X = 0.5] = 0.5$$, which cannot be true, right? Also, if I'm not mistaken the CDF would not be continuous.

Does this mean there cannot be a continuous random variable which has one value for a fraction of its domain? Or what am I confusing here?

Edit: Sorry I forgot. The pdf of $$X$$ is the uniform distribution on $$[0,1]$$.

• Is $X(\omega)$ your PDF, i.e. $f_X(x)$? – gunes Mar 4 at 8:32
• $X$ is not a continuous random variable; it is a mixed random variable that takes on values in $[\frac 12,1]$ with a probability mass or atom of $0.5$ at $\frac 12$. The CDF has a jump discontinuity at $\frac 12$ and is right-continuous on $[\frac 12, \infty)$. – Dilip Sarwate Mar 4 at 13:57