$f(x)=1/3$ if $0<x<1$ and $2<x<4$ and $0$ elsewhere
i found the cdf which is $F(x) = \frac13 x$ for $0<x<1,$ $\frac13$ for $1<x<2,$ $\frac x3-\frac13$ for $2<x<4,$ $1$ for $x>4$
how do i find the 25th and 50th percentile from a cdf like this?
pls help ! thanks
The CDF of your overall variable is the sum of the piecewise CDFs:
$F(x)=\mathbf{1}(x)_{>0}\min\{\frac{x}{3},\frac{1}{3}\}+\mathbf{1}(x)_{>2}\min\{\frac{x-2}{3},\frac{2}{3}\}$