I'm having a problem understanding this solution.
Let's say this solution is correct. If you take the the derivative of the resulting CDF you should get the correspoding PDF. In this case the PDF would be:
$ f_X(x) = \begin{cases} 0 & \text{if } x \notin [0, 1] \\ 1-p & \text{if } x \in [0,1] \end{cases} $
However when you integrate this function from $-\infty$ to $+\infty$ you get:
$\int_{-\infty}^{+\infty} f_X(x)\,dx = \int_{0}^{1} f_X(x)\,dx = \int_{0}^{1} (1-p)\,dx = (1-p)x\Big|_{0}^{1} = 1-p \neq 1$
The value of the integral above should be 1, shouldn't it? Does that mean that the CDF in the solution is wrong?
Could someone help me understand what is going on here?
