Let X1 X2 X3 be iid random variables with density fx Let Y1
Let X1, X2, X3 be iid random variables with density f(x). Let Y1 denote the smallest of {x1,x2,x3}; Y2 denote the second smallest of {x1,x2,x3}; and Y3, the largest of {x1,x2,x3}. Let X = (X1,X2,X3) and Y = (Y1,Y2,Y3) denote the corresponding random vectors.
 
 1. Find the joint density of Y. Hints:
• Introduce some notation for sorted triplets, say S = {(x1, x2, x3) : x1 < x2 < x3}.
• Note that the event (Y A) can be decomposed into disjoint sets by considering all six possible one-to-one mapping : {1, 2, 3} {1, 2, 3}: (Y A) = ((X(1), X(2), X(3)) S A).
2. If a sample of three iid uniform random variables on (0, 1) is observed, what it the probability that the median (second smallest) is between 1/5 and 4/5?
Solution
Let X1, X2, X3 be iid random variables with density f(x).
Let Y1 denote the smallest of {x1,x2,x3}; Y2 denote the second smallest of {x1,x2,x3}; and Y3, the largest of {x1,x2,x3}.
Let X = (X1,X2,X3) and Y = (Y1,Y2,Y3) denote the corresponding random vectors.
 we have to find the joint density of Y.
let g(y1,y2,y3) be the jonit density of Y.
g(y1,y2,y3) = 3! f(y1) f(y2) f(y3)
P(1/5 < Y < 4/5) = 3! y(1-y) dy (y is from 1/5 to 4/5)
= 3! (y - y^2) dy
= 3! [ {y^2/2 - y^3/3 } ]
= 3! / 6 [ 3y^2 - 2y^3 ]
= 3! / 6 [ { (3*(4/5)^2 - 2*(4/5)^3 } - { 3*(1/5)^2 - 2*(1/5)^3 } ]
= 3*2 / 6 [ 0.896 - 0.136 ]
= 0.76

