Given the PDF of $X$ which is right hand continuous, compute PDF of $Y$ = CDF$(x)$ Let x have a piecewise right hand continuous pdf, $f_X(x)$, which is defined as follows.
$$f_X(x) = \begin{cases}
\frac{1}{2}(x+2)^2 & -2 \leq x < -1 \\
-\frac{1}{2}x +\frac{1}{12}\delta (x+1) & -1 \leq x < 0 \\
\frac{1}{2}x & 0 \leq x < 1 \\
\frac{1}{2}(x-2)^2 + \frac{1}{12}\delta(x-1) & 1 \leq x \leq 2 \\
\end{cases}
$$
Let Y = $F_X(x)$. Compute $f_Y(y)$.

My approach: I have tried writing this:
$$
F_Y(y) = Pr\{Y \leq y\} = Pr \{F_X(x) \leq y\}
$$
But I honestly have no idea how to handle this piecewise function in this situation. So far, I've tried to compute the derivative of $F_Y(y)$ using:
$$
f_Y(y) = lim_{dy->0^+}\frac{Pr\{Y \leq y + dy \} - Pr\{Y \leq y \}}{dy}
$$
to no avail.
 A: To explain the solution step by step, a couple of drawings are needed but with this sketch I am sure you will be able to conclude by yourself.
First observe, that IF your X rv was continuous, $Y\sim U(0;1)$ by integral transform, being
$$F_Y(y)=F_X\left[F_X^{-1}(y)  \right]=y$$
Your case is very similar but you have 2 discontinuity points in $F_X$ or, equivalently, you have 2 dirac impulses of $1/12$ each.
Immediately the result is that
$$f_Y(y)=\frac{1}{12}\delta\left( y-\frac{3}{12} \right)+\frac{1}{12}\delta\left( y-\frac{10}{12} \right)+\mathbb{I}_{\left(0;\frac{2}{12}  \right)\cup \left(\frac{3}{12};\frac{9}{12}  \right)\cup\left(\frac{10}{12};1 \right)}$$
or alternatively, using special function $\delta$ and $\text{Rect}$,
$$f_Y(y)=  \text{Rect}\left( \frac{12y-1}{2} \right)+ \frac{1}{12}\delta\left( y-\frac{3}{12} \right)+ \text{Rect}\left( \frac{12y-6}{6} \right)   +\frac{1}{12}\delta\left( y-\frac{10}{12} \right)+\text{Rect}\left( \frac{12y-11}{2} \right)   $$
Observe also that $f_Y(y)$ is not a pdf, being it not absolutely continuous. In some branches as Signal Theory they define these function as "mixed densities"

To derive analytically this solution I suggest you

*

*First derive $F_X(x)$
$$F_X(x) =
\begin{cases}
0,  & \text{if $x<-2$} \\
\frac{(x+2)^3}{6},  & \text{if $-2\le x<-1$} \\
\frac{1}{4}+\frac{1-x^2}{4},  & \text{if $-1\le x<0$} \\
\frac{1}{2}+\frac{x^2}{4},  & \text{if $0\le x<1$} \\
1+\frac{(x-2)^3}{6},  & \text{if $1\le x<2$} \\
1, & \text{if $x\ge 2$ }
\end{cases}$$

*

*Do a drawing of $F_X$


*Do  a drawing of its inverse, $F_Y$


*Derive $f_Y$, considering that it is discrete in 2 points
