# Distribution of range of Uniform $(0,1)$ distribution

Let $X_1,...,X_n$ be iid as $U \sim [0,1]$ with pdf $f(x) = 1(0 <x< 1)$. Determine the range distribution.

I have managed to determine the distribution of the minimum and the maximum, however I cannot/do not know how to determine the distribution of range.

Minimum: $f_N = n(1-x)^{n-1}$ and maximum $f_M= nx^{n-1}$

I am aware that the calculation of range distribution is based on convolution: $f_R=\int f_{N,M}(x,x-r)dx$, However I cannot get the correct result, which according to my lecture slides is : $f_R= n(n-1)r^{n-2}(1-r)$

Could someone break this down for me ? My math background is not great

• I want to determine the distribution of the range statistic, not the range itself. I have edited the question, hope it makes sense now ? – Nneka Jun 24 '18 at 14:56
• You have to start with the joint density $(X_{(1)},X_{(n)})$ rather than the marginals. Apart from convolution, you could use a change of variables $(X_{(1)},X_{(n)})\to (R,S)$ where $R=X_{(n)}-X_{(1)}$ and $S=X_{(1)}$. Then you would have to integrate over $S$ to find the marginal pdf of the sample range $R$. – StubbornAtom Jun 24 '18 at 15:43
• To clarify, $X_{(1)}=\min X_i$ and $X_{(n)}=\max X_i$. – StubbornAtom Jun 24 '18 at 15:49

For any sequence of iid samples, of amount $n$, having pdf $f_{\small X}(x)$ and CDF $F_{\small X}(x)$, then it should be clear that $\tfrac{n!}{1!(n-2)!1!}f_{\small X}(u) f_{\small X}(v) \big(F_{\small X}(v)-F_{\small X}(u)\big)^{n-2}$ will be the probability density function for having one sample having value $u$, one having value $v$, and the remaining $n-2$ lying between them.   The coefficient counts the ways to 'select' which samples are the first and last.   (The measure of 'ties' can be considered negligable.)

With $f_{\small X}(x)=\mathbf 1_{0\leqslant x\leqslant 1}$ and $F_{\small X}(x)=x\mathbf 1_{0\leqslant x\leqslant 1}$, this thus becomes:

$$f_{\small \lower{0.5ex}{X_{(1)},X_{(n)}}\!}(u,v)=n(n-1)(v-u)^{n-2}\mathbf 1_{0\leqslant u<v\leqslant 1}$$

Where $X_{(1)}=\min\{X_k\}_{k=1}^n, X_{(n)}=\max\{X_k\}_{k=1}^n$

Suppose $U=\min (X_1,\cdots,X_n)$ and $V=\max (X_1,\cdots,X_n)$.

Start from the fact that the joint density of $(U,V)$ is given by $$f_{U,V}(u,v)=n(n-1)(v-u)^{n-2}\mathbf1_{0<u<v<1}$$

If you are not familiar with the above result, check your textbook or notes. It is a standard result in order statistics.

Transforming $(U,V)\to (R,S)$ such that $R=V-U$ and $S=U$. The jacobian is unity as it is a linear transformation. Observe that $0<u<v<1\implies 0<s<r+s<1\implies 0<r<1, 0<s<1-r$.

So you get the joint density of $(R,S)$ as

\begin{align}f_{R,S}(r,s)&=f_{U,V}(s,r+s)\\&=n(n-1)r^{n-2}\mathbf1_{0<s<r+s<1}\end{align}

Finally the marginal pdf of $R$ would be

\begin{align}f_R(r)=\int_0^{1-r}f_{R,S}(r,y)\,\mathrm{d}y\,\mathbf1_{0<r<1}\end{align}

Thus you end up with the required answer, which says that the sample range $R\sim \mathcal B(n-1,2)$, the beta distribution of the first kind with parameters $(n-1,2)$.

Consider an iid U(0,1) sample of size $$n$$. The range is the maximum minus the min. The distribution of this statistic is the same as the distribution of the maximum if you had obtained a sample of $$n-1$$ only. That is, $$X_{(n)} - X_{(1)} \overset{d}{=} X_{(n-1)} \sim B(n-1,2),$$ where the last step comes from $$X_{(i)} \sim B(i,n+1-i)$$.

• Can you prove your statement: that the range distribution is the same as the distribution of the maximum if you had obtained a sample of $n−1$ only? – NCh Nov 24 '19 at 13:42