= Uniform order statistic
{title2=$U_{(r)}\sim\operatorname{Beta}(r,n+1-r)$}
For <independent and identically distributed random variables> $U_1,\ldots,U_n$ with the continuous <uniform distribution> on $(0,1)$, the $r$th <order statistic> has <Beta distribution>
$$
U_{(r)}\sim\operatorname{Beta}(r,n+1-r),\qquad 1\leq r\leq n.
$$
Its <probability density function>, <mean>, and <variance> are
$$
f_r(t)=\frac{n!}{(r-1)!(n-r)!}\,t^{r-1}(1-t)^{n-r},\qquad 0<t<1,
$$
$$
\mathbb E[U_{(r)}]=\frac{r}{n+1},\qquad
\operatorname{Var}(U_{(r)})=\frac{r(n+1-r)}{(n+1)^2(n+2)}.
$$
The <probability density function> is zero outside $[0,1]$; values assigned to its endpoints do not change any <probability>. Peter Kempthorne's MIT lecture notes derive the <uniform order statistic> law and these <moments>. https://ocw.mit.edu/courses/18-443-statistics-for-applications-spring-2015/06daf6d78e7eb0465d6bb53e8f96b2ff_MIT18_443S15_LEC11.pdf[Peter Kempthorne, MIT 18.443, Lecture 11, slides 12–14]{ref}.
For $n=5$, the <minimum>, <sample median>, and <sample maximum> correspond to $r=1,3,5$. Their <probability density functions> are $5(1-t)^4$, $30t^2(1-t)^2$, and $5t^4$, respectively. The <sample median> therefore has <Beta distribution> $\operatorname{Beta}(3,3)$, <mean> $1/2$, and <variance> $1/28\approx0.0357143$. Its <cumulative distribution function> is
$$
\mathbb P(U_{(3)}\leq t)=10t^3(1-t)^2+5t^4(1-t)+t^5=10t^3-15t^4+6t^5,\qquad 0\leq t\leq1.
$$
For instance, $\mathbb P(U_{(3)}\leq1/4)=53/512\approx0.103516$. The <mean> of the <minimum> is $1/6$, and the <mean> of the <sample maximum> is $5/6$. The fixed observed <sample median> $0.4$ in the <order statistic> example is one possible outcome; $1/2$ is the average over repeated <statistical samples> from this <uniform distribution>.
\Image[/uniform-order-statistic-densities.png]
{title=Minimum, median, and maximum densities for five independent uniform observations}
Each curve has area one. The extreme <order statistics> favor the ends, while the <sample median> favors the center. The endpoint density height $5$ is legitimate: the <probability density function> gives area per unit length, rather than point <probability>. In particular, a continuous <uniform distribution> has zero <probability> of producing an endpoint.
For a short proof, the <binomial distribution> counting identity under <order statistic> gives $\mathbb P(U_{(r)}\leq t)=\sum_{k=r}^{n}\binom{n}{k}t^k(1-t)^{n-k}$. Taking its <derivative> cancels consecutive terms, leaving the displayed <probability density function>. Recognize its normalizing <factorial> coefficient as that of the <Beta distribution>, then substitute $\alpha=r$, $\beta=n+1-r$ into the <Beta distribution> <mean> and <variance> formulas. Although the original observations are <independent>, their <order statistics> generally are dependent; see the positive <covariance of two uniform order statistics>.
Back to article page