Compute $P(X_1=\min\{X_1,...,X_5\},X_5=\max\{X_1,...,X_5\})$ for $(X_i)$ i.i.d. uniformly distributed In my exam preparation I'm currently stuck at this task:
Let $X_1,..,X_5$ be i.i.d random variables each having uniform distributions in the interval (0, 1)
Find the probability that $X_1$ is the minimum and $X_5$ is the maximum among these random variables.
$P(X_1 \leq$ min{$X_2$,...,$X_5$)
=$P(X_1 \leq X_2, X_1 \leq X_3, ..., X_1 \leq X_5)$
=$P(X_1 \leq X_2)\cdot ... \cdot P(X_1  \leq X_5)$
=$P(X_1 - X_2 \geq 0)\cdot ... \cdot P(X_1 - X_5 \geq 0)$
=$\frac{1}{2}^4$
This is my (wrong) calculation for now. I made the maximum with the same flawed idea in mind and I just cannot think of the correct answer*. Thanks for any hint!
*Per answersheet it is $\frac{1}{20}$. But I need to understand how to get there.
 A: Your method fails  because the events $X_1<X_2$ and $X_1<X_3$ are not independent.
Per the given distribution and independence, the probability that any two of the random vars are equal is $0$. Hence one of them is the minimal and another is the maximal among them. By mere symmetry, the probability that $\min =X_1$ and $\max = X_5$ is the same as the probability of $\min=X_i$, $\max=X_j$ for any choice of $i\ne j$. As there are $20$ such choices, we arrive at $\frac1{20}$.
A: Let us consider the general case of $n$ independent random variables (instead of 5), and let $x_1=a$ and $x_n=b$. Then the probability that all $n-2$ variables $x_2,x_3,...,x_{n-1}$ are in the interval $(a,b)$ is given by $(b-a)^{n-2}$.
Now $a$ can be any number between $0$ and $b$, hence the probability that $b$ is maximum is given by 
$$p(n,\text{MAX} = b) = \int_0^b (b-a)^{n-2} \,da = \frac{b^{n-1}}{n-1}$$
Integrating over $b$ gives the final probability asked for in the OP:
$$p(n) = \int_0^1 \frac{b^{n-1}}{n-1} \,db = \frac{1}{n(n-1)}$$
For $n=5$ we recover the result $p(5) = \frac{1}{20}$.
