Cumulative distribution function with 3 variables Let $X$ be the random variable whose cumulative distribution function is
$$
F_X (x) = \begin{cases}
    0, & \text{for} \space x\lt 0 \\
    \frac{1}{2}, & \text{for} \space 0\le x\le 1 \\
    1, & \text{for} \space x\gt 1 \\
\end{cases}.
$$
Let $Y$ be a random variable independent of $X$ and uniformly distributed over the interval $(0,1)$. Define the random variable $Z$ as
$$
Z = \begin {cases}
    X, & \text{if} \space X\le \frac{1}{2} \\
    Y, & \text{if} \space X\gt \frac{1}{2} \\
\end{cases}
$$
Determine $\mathbb{P} (Z\le \frac{1}{5})$.
I believe that $X$ only takes the discrete values $0$ and $1$ with equal probability, but I'm not entirely sure. By intuition, I think that the answer is $\frac{1}{2}$. I'm unsure about this question, so any advice would be appreciated.

You should define $F(1)$ as $1$ instead of $\frac 1  2$.
$$P(Z \leq \frac 1  5)$$ $$=P(X \leq \frac 1  5)+P(Y \leq \frac 1  5, X>\frac 1  2)$$ $$=P(X \leq \frac 1  5)+P(Y \leq \frac 1  5)P( X>\frac 1  2)$$
$$=\frac 1 2 +\frac 1 5  (1-\frac 1 2 )=\frac 3 5.$$
