# Probability of median > 1.5

I was asked a probability question:

Given three numbers i.i.d as $\text{uniform}(0,2)$, what is the probability of the median greater than $1.5$?

My hunch is that each number has $P(X > 1.5) = (2-1.5)/(2-0) = 0.25$, the probability of $\text{median}> 1.5$ is equivalent to "at least two of the three numbers are greater than 1.5", which can be derived as the complement of 'exactly one number is greater than 1.5 or none of them is greater than 1.5'. This could be formulated as a binomial distribution:

$1 - C(\text{choose 1 from 3})\times(0.25)\times(1-0.25)^2 - C(\text{choose 0 from 3})\times(1-0.25)^3$

Is this the correct approach?

• It's a straight binomial probability. I don't think that your complement is making the calculation easier; the original has two terms you add, your complement has two two terms of similar complexity subtracted from 1. However, your answer should be correct. Commented Feb 5, 2016 at 1:57
• Thanks. I agree with you I should calculate it directly. This problem was from an interview. I was not sure whether my approach was right since the interviewer did not say anything about it. Commented Feb 5, 2016 at 18:19

I would suggest looking at the order statistics. If your three observations $X_1, X_2, X_3$ follow a $Uniform(0,2)$, then the median is $X_{(2)}$, where $X_{(2)}$ is the second order statistic. Your problem then becomes much simpler, as you want to find $P(X_{(2)}>1.5)$. You can easily look up the PDF of order statistics (and, in particular, order statistics for the Uniform distribution). Once you have that, it should become a (reasonably) basic calculus problem to integrate to find the probability that your median is greater than 1.5.