Exploring Order Stats for Uniform random distribution
The probability density function (pdf) of the standard uniform population and the pdfs of the first, second, third, fourth and largest order statistics from a random sample of size 5.

> orderStat <- function(m) {
+     N <- 10000
+     res <- numeric(N)
+     for (i in 1:N) {
+         x <- sort(runif(5), decreasing = F)
+         res[i] <- x[m]
+     }
+     return(res)
+ }
> x1 <- orderStat(1)
> x2 <- orderStat(2)
> x3 <- orderStat(3)
> x4 <- orderStat(4)
> x5 <- orderStat(5)
> cols <- rainbow(5)
> ylim <- c(0, 5)
> hist(x1, freq = F, breaks = seq(0, 1, 0.01), col = cols[1], main = "",
+     ylim = ylim)
> par(new = T)
> hist(x2, freq = F, breaks = seq(0, 1, 0.01), col = cols[2], main = "",
+     ylim = ylim)
> par(new = T)
> hist(x3, freq = F, breaks = seq(0, 1, 0.01), col = cols[3], main = "",
+     ylim = ylim)
> par(new = T)
> hist(x4, freq = F, breaks = seq(0, 1, 0.01), col = cols[4], main = "",
+     ylim = ylim)
> par(new = T)
> hist(x5, , freq = F, breaks = seq(0, 1, 0.01), col = cols[5],
+     main = "", ylim = ylim)
> par(new = F)
> legend("center", legend = 1:5, fill = cols)

OrderStats-001.jpg