Suppose a value $x$ is chosen at random in the interval $[0,10]$. In other words, $x$ is an observed value of a random variable $X \sim \mathrm{UNIF}(0,10)$. The value $x$ divides the interval $[0,10]$ into two sub-intervals.
a.) Find the CDF of the length of the shorter sub-interval.
b.) What is the probability that the ration of lengths of the shorter to the longer sub-interval is less than $\frac{1}{4}$
I have no idea to start with this problem. The book says the answer to a.) is $\mathrm{UNIF}(0,5)$ but I am not sure how they found this as a CDF.
Note that the length of the shorter interval ranges from $0$ to $5$. If it crosses $5$, then the other interval becomes the 'shorter' interval. Since the longer interval follows a uniform distribution (let us denote it by $X$), then $10 - X$ is also a uniform distribution which ranges from $0$ to $5$.
Therefore, $CDF = \frac{x}{2}, x \in [0,10] = UNIF(0,5)$