Probability of median of numbers in a range how to calculate the probability that median of 3 random numbers from 0 to n, that are not in [0.2n, 0.8n] ? I think it should me P(2 numbers < 0.2n) + P(2 numbers > 0.8n) + P(all numbers < 0.2n or > 0.8n). Is it right?
 A: I solved this with combinations in mind: 
If two of the numbers are less than 0.2n, we are guaranteed to have a median outside of [0.2n,0.8n], no matter what the value of the final number. The combinations of these events will look as follows:


*

*The final number is  less than 0.2n = $P(<0.2n)^3$
*In terms of combinations, there is only one way to get this case.

*The final number is between 0.2n and 0.8n = $P(<0.2n)^2P(>0.2n ~and <0.8n)$
*In terms of combinations, there are three ways to obtain this

*The final number is greater than 0.8n = $P(<0.2n)^2P(>0.8n)$
*In terms of combinations, there are three ways to obtain this


So in the case that we get two random numbers less than 0.2n, our probability of getting a median outside of [0.2n,0.8n] is:
$ P(<0.2n)^2 [ P(<0.2n) + 3*P(>0.2n ~and <0.8n) + 3*P(>0.8n)] $
Repeating this for the case where two numbers are greater than 0.8n and adding the results gives the final equation of:
$ P(median~is <0.2n~and >0.8n) =$ 
$P(<0.2n)^2 [ P(<0.2n) + 3*P(>0.2n ~and <0.8n) + 3*P(>0.8n)] + 
P(>0.8n)^2 [ 3*P(<0.2n) + 3*P(>0.2n ~and <0.8n) + P(>0.8n)]$

which can be solved:
$ = 0.2^2[0.2 + 3*0.6 + 3*0.2] + 0.2^2[3*0.2 + 3*0.6 + 0.2]$

$ = 0.208$

Symbols:
$P(<0.2n)$ = Probability a random number is less than 0.2n
$P(>0.2n~and <0.8n)$ = Probability a random number is greater than than 0.2n and less than 0.8n
$P(>0.8n)$ = Probability a random number is greater than 0.8n
