# Maximum of Three Uniform Random Variables

Here is the question, I am studying for exam P, and am using a study guide with a solution guide. I am stumped on this problem, and the solution in the back was very confusing. Any clarity I can get would be tremendously appreciated. Here is the problem:

Three individuals are running a one kilometer race. The completion time for each individual is a random variable. $X_i$ is the completion time, in minutes, for person $i$.

$X_1$: uniform distribution on the interval [2.9, 3.1]

$X_2$: uniform distribution on the interval [2.7, 3.1]

$X_3$: uniform distribution on the interval [2.9, 3.3]

The three completion times are independent of one another. Find the expected latest completion time (nearest .1)

I let $Y = \max\{X_1, X_2, X_3\}$

$F_Y(y) = P[Y \leq y] = P[\max\{X_1, X_2, X_3\} \leq y]$

So, in short, $5(y-2.9)(2.5)(y-2.7)(2.5)(y-2.9)$,

However, the author uses a piecewise function, with what I have above, but he has two different intervals which I don't understand where he got. This is what he has:

$$F_Y(y) = \begin{cases} 5(y-2.9)(2.5)(y-2.7)(2.5)(y-2.9), & 2.9 \leq y \leq 3.1 \\ 2.5(y-2.9), & 3.1 \leq y \leq 3.3 \\ \end{cases}$$

Sorry, for the jumbled piecewise function, I'm not sure how to space it out more.

My questions, is how did he get the second part where the interval is $3.1 \leq y \leq 3.3$

If $y > 3.1$, then you know that the first two runners are already done. So the probability that the last runner finishes in at most $y$ minutes is the probability that $X_3 \le y$; i.e., $$\Pr[Y \le y] = \Pr[X_3 \le y] = \frac{y-2.9}{3.3-2.9}, \quad 3.1 < y \le 3.3.$$
\begin{align}\text{You have:} \\ X_1 &\sim {\cal U} [2.9, 3.1] \iff F_{X_1}(y) = 5(y-2.9)\operatorname{\bf 1}_{[2.9,3.1]}(y) + \operatorname{H}(y-3.1) \\ X_2 &\sim {\cal U} [2.7, 3.1] \iff F_{X_2}(y) = \tfrac 5 2 (y-2.7)\operatorname{\bf 1}_{[2.7,3.1]}(y) + \operatorname{H}(y-3.1) \\ X_3 &\sim {\cal U} [2.9, 3.3] \iff F_{X_3}(y) = \tfrac 5 2 (y-2.9)\operatorname{\bf 1}_{[2.9,3.3]}(y) + \operatorname{H}(y-3.3) \\ F_Y(y) & = F_{X_1}(y)F_{X_2}(y)F_{X_3}(y) \end{align} Note that each of the three distributions are defined on have overlapping domains. These can be split into: $[2.7, 2.9); [2.9, 3.1); [3.1,3.3]$.
Now, the probability of a RV having a value less than its lower bound is 0, and the probability of having a value less than its upper bound is 1, so: $$F_Y(y) = \begin{cases} 0 & y < 2.7 \\ \overbrace{F_{X_1}(y)}^{=0}F_{X_2}(y)\overbrace{F_{X_3}(y)}^{=0} & y \in [2.7,2.9) \\ F_{X_1}(y)F_{X_2}(y)F_{X_3}(y) & y\in [2.9,3.1) \\ \underbrace{F_{X_1}(y)}_{=1}\underbrace{F_{X_2}(y)}_{=1}F_{X_3}(y) & y\in [3.1,3.3] \\ 1 & y>3.1 \end{cases}$$
$$\therefore F_Y(y) = \begin{cases} 0 & y < 2.9 \\ \tfrac {125}{4} (y-2.9)(y-2.7)^2 & y\in [2.9,3.1) \\ \tfrac{5}{2} (y-2.9) & y\in [3.1,3.3] \\ 1 & y > 3.3 \end{cases}$$