Find CDF of random variable which depends on other variable Let $X$ be a random variable with uniform distribution on $[-1, 1]$. Find the CDF of random variable Y given by the following formula:
  
  $Y = \left\{\begin{matrix}
 -\frac{1}{2},&amp; X &lt; - \frac{1}{2}\\ 
 X,&amp; -\frac{1}{2} \leq X \leq \frac{1}{4}\\ 
 \frac{1}{4}, &amp; X &gt; \frac{1}{4}
\end{matrix}\right.$


So I've found PDF and CDF of $X$:

$f_X(x) = \begin{cases}
 \frac{1}{2}, &amp; x \in [-1, 1]\\ 
 0, &amp; \text{otherwise}
\end{cases}$

$F_X(a) = \int_{-\infty}^{a} f_X(x) dx = \left\{\begin{matrix}
 0, &amp; a \leq -1\\ 
 \frac{a+1}{2}, &amp; a \in (-1, 1) \\ 
 1, &amp; a \geq 1 
\end{matrix}\right.$

I tried to find Y's CDF by:

$F_Y(a) = P(Y \leq a)$

$= P(-\frac{1}{2} \leq a, X &lt; - \frac{1}{2}) + P(X \leq a, - \frac{1}{2} \leq X \leq \frac{1}{4}) + P(\frac{1}{4} \leq a, X &gt; -\frac{1}{4})$

But what should I do next? I'm finding such CDF for the first time and my notes say I need to consider a few different cases, but I have no clue what they should look like and how to do it. Any tips would be helpful.
Tip: You can find a CDF, but not a pdf, for all points on the support.

Notice that $Y$ will have a support of the interval $[-\tfrac 12;\tfrac 14]$, but will have a probability mass at the two end points, with a probability density in the interval between. &nbsp; It is a mixed distribution.

That is $~\mathsf P(Y{=}-\tfrac 12)~=~\mathsf P(-1{\leq}X{&lt;}-\tfrac 12)~$ and $~\mathsf P(Y{=}\tfrac 14)~=~\mathsf P(\tfrac 14{&lt;}X{\leq}1)~$.

So then


   $$F_Y(a)~=~\mathsf P(Y\leq a) ~=~ \begin{cases} 0 &amp;:&amp; a&lt;-\tfrac 12\\ \tfrac {2a+3}4 &amp; : &amp; -\tfrac 12\leq a &lt; \tfrac 14 \\ 1 &amp;:&amp; \tfrac 14 \leq a \end{cases}$$


If you've peeked, notice the step discontinuities.
Note that $P(Y\leq y) = \int_\mathbb{R} P(Y \leq Y | X = x) f_X(x) dx$ by the law of total probability. 

You can split the integral up by $x&lt; -1/2$, $-1/2 \leq x \leq 1/4$ and $x&gt; 1/4$ and do it.