Probability that the second highest of three independent $U(0,1)$ random variables lies between $\frac{1}{3}$ and $\frac{2}{3}$. Let $U_1, U_2, U_3$ be independent random variables that are each distributed uniformly in $(0,1)$. What is the probability that the second highest value among them lies between $\frac{1}{3}$ and $\frac{2}{3}$.
Could someone help me solve this?
Let X be the second highest of U1, U2, U3
I did some research and found the pdf of second order statistic amongst n uniformly distributing random vairables and it is 
$f_{X(2)}(x) = \frac{n!}{(j-1)!(n-j)!}x^{j-1}(1-x)^{n-j} = 6x(1-x)$ when n = 3 and j = 2
 A: Let events $A,B,C$ be defined as follows


*

*$A$ is the event that at least two of $U_1,U_2,U_3$ are in the interval $[0,{\large{\frac{2}{3}}})$.$\\[6pt]$

*$B$ is the event that at least two of $U_1,U_2,U_3$ are in the interval $({\large{\frac{1}{3}}},1]$.$\\[6pt]$

*$C$ is the event that the median element of $U_1,U_2,U_3$ is in the interval $({\large{\frac{1}{3}}},{\large{\frac{2}{3}}})$.$\\[4pt]$
Our goal is to evaluate $P(C)$.

Noting that $C=A\cap B$, we get
$$P(C)=P(A\cap B) = P(A)+P(B) - P(A\cup B)$$
Applying the binomial probability formula, we get
$$P(A)=P(B)
=
{\small{\binom{3}{2}}}\left({\small{\frac{2}{3}}}\right)^2\left({\small{\frac{1}{3}}}\right)^1
+
{\small{\binom{3}{3}}}\left({\small{\frac{2}{3}}}\right)^3\left({\small{\frac{1}{3}}}\right)^0
={\small{\frac{20}{27}}}$$
Logically, at least one of the events $A,B$ must occur, hence $P(A\cup B)=1$, so
$$P(C)={\small{\frac{20}{27}}}+{\small{\frac{20}{27}}}-1={\small{\frac{13}{27}}}$$
A: We want the distribution of an order statistic. Here in our problem the order statistic is $X_2$ in $X_3>X_2>X_3$. Thus for the general case, the pdf is 
$$f_{X_j}(x) = \frac{n!}{(j-1)!(n-j)!} x^{j-1}(1-x)^{n-j}.$$
In our problem we have $n=3$, and we want the pdf of the second highest statistic, so $j=2$. Hence we must consider
$$f_{X_2}(x) = 3!x(1-x) = 6x(1-x).$$
Now evaluate the pdf for the interval $(1/3,2/3)$.
Another way is to evaluate the integral
$$P = 3!.\int_{\frac{1}{3}}^{\frac{2}{3}}\int_{0}^{x_2}\int_{x_2}^{1} dx_3 dx_1 dx_2.$$
Both methods will yield $\frac{13}{27}$.
