Brushing up on some probability problems and came across this one. I'm a little confused on how exactly get the probability density function and frin probability from that.
Given the distribution of random variable Y: $$F_Y(y)=\begin{cases} 0, y\leq0 \\ \frac{y}{8}, 0\lt y \leq 2 \\ \frac{y^2}{16}, 2\leq y \lt 4\\ 1, y \geq 4 \end{cases} $$
Find density function.
I found this out to be just the integral of each equation:
$$f_Y(y)=\begin{cases} 0, y\leq0 \\ \frac{y^2}{16}, 0\lt y \leq 2 \\ \frac{y^3}{48}, 2\leq y \lt 4\\ y, y \geq 4 \end{cases} $$
since the is the case if it were just one solid equation.
Find $P (1\leq Y \leq 3)$ and $P(Y \geq 1.5) $.
Would this just be P(3) - P(1) and to do this would just be plugging in 3 and 1 into $f_Y(y)$. Or would I have to take another integral since $$P(a \leq X \leq b) = \int_a^b f_Y(y) dy $$ How would this work with the second probability? Since P(infinity) = infinity. I'm just confused as to how many integrals I have to take to find probability given the random variable Y.