# Density of order statistics

I need help with order statistics:

Given a sample $X_1, \ldots, X_n$, $X_i \sim U_{0,1}$, i.e. the $X_i$ are uniformly distributed on $[0,1]$, determine the following for the corresponding order statistics:

a) the density of $X_{(k)}$

b) the joint density of $X_{(1)}, X_{(n)}$

c) the density of the range $R:=X_{(n)} - X_{(1)}$

d) the limit distribution for $2n(1-R)$ with $n \rightarrow \infty$.

Here is my idea for the first one:

a) For the density of an order statistic we've shown:

$$f_{X_{(k)}}(t) = \binom{n}{k} k F_X(t)^{k-1}(1-F_X(t))^{n-k}f_X(t)$$ Given the fact that $X_i \sim U_{0,1}$, the density is pretty easy to determine, i.e.

$$f_{X_{(k)}}(t) = \binom{n}{k} k t^{k-1}(1-t)^{n-k} \mathbb{1}_{[0,1]}$$

b) For b), I think I can use the following formula:

$$f_{(i),(j)} = \dfrac{n!f(x_i)f(x_j)(F(X_i))^{i-1}(F(x_j)-F(x_i))^{j-1-i}(1-F(x_j))^{n-j}}{(i-1)!(j-1-i)!(n-j)!}$$ to get

$$f_{(1),(n)} (x_1,x_n) = (n-1)n(x_n-x_1)^{n-2}$$ Is that correct?

c) My idea was to use the transformation rule for densities, so

$$\begin{pmatrix} x \\ y \end{pmatrix} = \phi ( z,u) = \begin{pmatrix} z-u \\ u \end{pmatrix}$$

$$\begin{pmatrix} z \\ u \end{pmatrix} = \phi^{-1}(x,y) = \begin{pmatrix} x+u \\ y \end{pmatrix}$$

with $J_{\phi^{-1}}(x,y) = \begin{vmatrix} 1 & 0 \\ 0 & 1 \end{vmatrix} = 1$

Then $f_R = f_{(n)}(\phi^{-1}(x,y))f_{(1)}(\phi^{-1}(x,y))\cdot1 = \cdots$ - how do I proceed now?

d) Here I don't know how to start...

Thank you for the help!

• b) No of course $X_{(1)}$ and $X_{(n)}$ are not independent. (For example conditionally on $X_{(1)} = s$ you know that $X_{(n)} > s$ almost surely..) – air Nov 4 '16 at 16:56
• Why are you posting your homework here? – wolfies Nov 4 '16 at 17:15
• @wolfies it doesn't matter that it is homework, it is a nice question and clearly shows the op's work. I think it's perfectly fine :-) – Ant Nov 4 '16 at 17:30
• It's not a nice question. It's just standard textbook material, which the OP is meant to answer himself, and instead of doing so, and learning to think ... he has posted his starter attempts at doing an exercise. This sort of material (standard exercise marked (a) to (d) followed by "here is what I tried" which is hardly an attempt at anything ... is just an embarrassment to SE, and an abuse of the university's ability to grade its own students. It's also a question that has been asked probably half-a-dozen times on SE, so it is just another boring duplicate of well-trodden material. – wolfies Nov 4 '16 at 17:34

For b) as @air commented, independance is false. I would compute the joint CDF $F_{X_{(1)},X_{(n)}} (x,y) := \Bbb P [ X_{(1)} \leq x \cap X_{(n)} \leq y]$, and use the following lemma :

If $F_{X,Y}$ is twice continuously differentiable,then $(X,Y)$ has density $f_{X,Y} = \frac {\partial ^2f}{\partial x \partial y}F_{X,Y}$. (The result holds with weaker conditions, using the more general form of the differenciation under integral theorem)

The rest follows, your idea of using change of variables is good.

• I think I got it now, the density or $R$ should be $f_r = (n-1)nr^{n-2}(1-r)$, where $r = x_{(n)} - x_{(1)}$. How should I start now for (d)? Do you know? – ducks17 Nov 7 '16 at 15:52
• I haven't checked your answer for c), but it seems right. Now you want to know what happens to $2n(1-R)$ when $n$ goes to infinity. What could you compute about $2n(1-R)$ now ? Once you've done that you could try to see what happens when n goes to infinity... – justt Nov 7 '16 at 18:30
• I could compute the distribution function of $R$ via integrating the density? Or do I have to compute the density of $2n(1-R)$? – ducks17 Nov 7 '16 at 21:38
• Well, you have a change of variables theorem for the density, but not for the distribution function, so the density should be the way to go... – justt Nov 7 '16 at 21:43
• Ah, I think I got it: via the transformation rule I can calculate the density and then I just let $n$ got to infinity, which should yield $/frac{1}{4} /exp(-/frac{r}{2}) r$... – ducks17 Nov 7 '16 at 21:56

\begin{align} f_{X_{(k)}} (x) & = \frac d {dx} \Pr( X_{(k)} \le x) \\[10pt] & = \frac d {dx} \Pr\left( \text{at least $k$ of $X_1,\ldots,X_n$ are} \le x \right) \\[10pt] & = \frac d {dx} \sum_{j=k}^n \binom n j x^j (1-x)^{n-j}. \end{align} Now we come to the part that poses the principal difficulty in finding the answer. Differentiating each term in this sum relies on the product rule, except in the term where $j=n$. Here's what happens \begin{align} & \frac d {dx} \left( \cdots + \binom n \ell x^\ell(1-x)^{n-\ell} + \binom n {\ell+1} x^{\ell+1} (1-x)^{n-\ell-1} + \cdots \right) \\[15pt] = {} & \cdots +{} \binom n \ell \left(\ell x^{\ell-1} (1-x)^{n-\ell} - x^\ell (n-\ell)(1-x)^{n-\ell-1}\right) \tag a \\[10pt] & \phantom{\cdots+{}} \binom n {\ell + 1} \left( (\ell+1)x^\ell(1-x)^{n-\ell-1} - x^{\ell+1} (n-\ell-1) (1-x)^{n-\ell-2} \right) + \cdots \tag b \end{align} Observe that the second term in line (a) cancels out the first term in line (b) because $$-\binom n \ell (n-\ell) + \binom n {\ell+1} (\ell+1) = 0.$$ The effect is that all terms except the first one --- the one in which $j=k$ --- cancel out.