# Probability that a runner arrives before the other

Two athletes arrive at the finish line of a race in moments $X, Y$ independent. The first comes at a casual time $X$ between $16$ and $17$. The second comes at a casual time $Y$ between $16.15$ and $17$. Find:
$-$ The probability that $X \le Y$
$-$ The probability that $|Y-X|\le 0.15$

SOLUTION: $$X[16;17]$$ $$Y[16.15;17]$$ $$P(X \le Y) = \frac{60\cdot45-\frac{45^2}{2}}{60\cdot45} = \color{red}{0.625}$$ $$P(|X-Y|\le0.15)= \frac{60\cdot45-\frac{30^2}{2}-\frac{45^2}{2}}{60\cdot45} = \color{red}{0.458}$$ The results should be corrected, but i don't understand how he came to the following formulas (this solution is That of Professor), and i'd like to know if there is another method to solve these two questions. Thanks

• Are the distributions $X\&Y$uniform or what does random moment and casual time mean? – mathreadler Feb 20 '17 at 17:11
• @mathreadler reading the question, i think that they are uniform – Amarildo Feb 20 '17 at 17:15
• They look correct to me if we assume that $X$, $Y$ are uniformly distributed and that $16.15$ actually means $16$ minutes and $15$ seconds. – Leo163 Feb 20 '17 at 17:19
• Then the density functions will be constant and you have two dimensions or variables, $x_1 \& x_2$, what to do then is to find the areas to perform the integration over in this two dimensional space (and to recall from calculus what the integral of a constant is). – mathreadler Feb 20 '17 at 17:20
• @Leo163 tes they're right, but I don't understand how he obtained these formulas – Amarildo Feb 20 '17 at 17:22

Consider the first $\mathbb{P}[X\leq Y]$. You know $X\sim\mathcal{U}(16,17)$ and $Y\sim\mathcal{U}(16.25,17)$. If the second athlete comes at $y\in[16.25,17]$ ,then $\mathbb{P}[X\leq y]=y-16$. The pdf of $Y$ is $1/(3/4)$. Hence $\mathbb{P}[X\leq Y]=\int_{16.25}^{17}(y-16)\frac{1}{3/4}dy$.