I'm trying to derive the distribution of a random variable $Y$ given that I know the distribution of a random variable $X$ and the relationship they share.
The $pdf$ of $X$ is expressed as:
$ f_{X} = \begin{cases} 1/3 & \text{if -2 $<$ $x$ < 1}\\ 0 & \text{otherwise} \end{cases} $
I also know that $Y = g(X) = |{X}|$
In problems like this, I learned one must first calculate the $CDF$ of $Y$ and then derived in relation to $y$.
$F_{Y}(y) = \mathbb{P}( Y \le y) = \mathbb{P}(|X| \leq y) = \mathbb{P}( X < y) + \mathbb{P}( X \geq -y) $
Given that $Y$ is the absolute value of $X$, the inequality can be seen as the area of triangles (as far as I understand it).
But considering these are continuous random variables, I can't see how I'll integrate to find $\mathbb{P}(.)$