The probability density function of the random variable X is as follows
$f_{X}(x) = \begin{cases} 1/4, & \text{if 0 < x < 1} \\ 1/4, & \text{if 2 < x < 4}\\ 1/4, & \text{if 6 < x < 7}\\ 0, & \text{elsewhere}\\ \end{cases}$
I know that
- I can find the cumulative distribution function by integrating the probability density function from $-\infty$ to $x$,
- and also that for values of $x$ less than or equal to $0$, the CDF will be $0$,
- and for values of $x$ greater than or equal to $7$, the CDF will be $1$.
I know how to integrate each piece, however how do I fill in the gaps between the pieces, such as $1 < x < 2$?
I thought that since it is cumulative, this part would just be the same as the part before it since it doesn't add anymore probability, however if I were to let, for example, $F_x(x)$ = $\frac{1}{4}x$ for 0 < x < 2, then if I were to differentiate this to get back to the PDF, it isn't going to result in the correct domain.