I am trying to find the expected minimum and maximum distance between consecutive points on the unit positive rea interval .I have tried the following so far :Given $n$ uniform random variables on the interval [0,1], let's denote the ordered variables as $U_{(1)}, U_{(2)}, \ldots, U_{(n)}$. The minimum gap can be found as:

\begin{equation} \text{min_gap} = \min(U_{(1)}, U_{(2)} - U_{(1)}, \ldots, U_{(n)} - U_{(n-1)}, 1 - U_{(n)}) \end{equation}

The distribution of the first order statistic $U_{(1)}$ is:

\begin{equation} f_{U_{(1)}}(x) = nx^{n-1} \end{equation}

The joint probability density function (PDF) of $U_{(r)}$ and $U_{(s)}$, denoted $f_{U_{(r)}, U_{(s)}}(x, y)$, where $0 \leq x < y \leq 1$, is:

\begin{equation} f_{U_{(r)}, U_{(s)}}(x, y) = \frac{n!}{(r-1)!(s-r-1)!(n-s)!} x^{r-1} (y-x)^{s-r-1} (1-y)^{n-s} \end{equation}

Hence, for the differences between subsequent order statistics, the joint distribution of two adjacent order statistics $U_{(i)}$ and $U_{(i+1)}$ is:

\begin{equation} f_{U_{(i)}, U_{(i+1)}}(x, y) = \frac{n!}{(i-1)!(n-i-1)!} x^{i-1} (y-x) (1-y)^{n-i-1} \end{equation}

Considering the differences $U_{(i+1)} - U_{(i)}$, we can integrate out $x$ to get:

\begin{equation} f_{U_{(i+1)} - U_{(i)}}(z) = \int_{0}^{1-z} \frac{n!}{(i-1)!(n-i-1)!} x^{i-1} z (1-x-z)^{n-i-1} \, dx \end{equation} Now, from here things seem to get complicated.For instance for $n$ iid points chosen on the unit interval (0,1) ,the expected gap between the consecutive points for some given $i$ can be computed as : \begin{equation} E[U_{(i+1)} - U_{(i)}] = \int_0^1 z \left( \int_{0}^{1-z} \frac{n!}{(i-1)!(n-i-1)!} x^{i-1} z (1-x-z)^{n-i-1} \, dx \right) \, dz. \end{equation} It is not clear to me even how to compute it .So how do I find the expected minimum and expected maximum between the consecutive points ,analytically or analytical-cum numerically .Could there be simpler approach/Thanks for any help in this regard

  • $\begingroup$ The "gaps" are also commonly named spacings, which may help in searchs. See e.g. [](arxiv.org/pdf/1909.06406.pdf). $\endgroup$
    – Yves
    Commented Oct 13, 2023 at 5:49
  • $\begingroup$ Mind that in the last equation we have $E[๐‘ˆ_{(๐‘–+1)}โˆ’๐‘ˆ_{(๐‘–)}]$, not $E[z]$. I suggest to remove the tag "geometric-distribution" and add the tags "order-statistics", "spacings" and possibly "extreme-value" if the interest is on the smallest spacing for $n$ large. $\endgroup$
    – Yves
    Commented Oct 13, 2023 at 14:21
  • $\begingroup$ @Yves ,thank you for pointing it out .I made the edit $\endgroup$ Commented Oct 14, 2023 at 2:29

1 Answer 1


According to Theorem 1.1 with $k:=1$ in this preprint by Iosif Pinelis, the minimum spacing $G_{n+1:1}$ has its survival function given by

$$ \text{Pr}\{ G_{n+1:1} > x \} = \left[ 1 - (n+1) \, x \rule{0pt}{1em} \right]^n_+, \qquad 0 \leqslant x \leqslant 1, $$ where $u_+ := \max\{0, u\}$. This is a special case of the following family using two parameters $\alpha >0$ and $\beta>0$ $$ \text{Pr}\{ G_{n+1:1} > x \} = \left[ 1 - \frac{x}{\beta} \right]^\alpha_+, \qquad x \geqslant 0 $$

with $\beta := 1/ (n+1)$ and $\alpha := n$. This is a simple reparameterisation of the two-parameter Generalized Pareto distribution with negative shape $\xi = -1/n$. Using simple integration we see that

$$ E[ G_{n+1:1}] = \frac{1}{(n+1)^2}, \qquad \text{Var}[ G_{n+1:1}] = \frac{n}{(n+1)^4 (n +2)}. $$

For large $n$ we have $\text{Var}[G_{n+1:1}] \approx (n + 1)^{-4}$, so the coefficient of variation is close to $1$. The distribution of $Z := (n+1)^2G_{n+1:1}$ is then close to an exponential distribution with unit rate since for fixed $z$ $$ \text{Pr}\{ Z > z \} = \text{Pr}\left\{ G_{n+1:1} > \frac{z}{(n+1)^2} \right\} = \left[ 1 - \frac{z}{n + 1} \right]^n_+ \approx e^{-z}. $$

n <- 40
nSim <- 10000
## compute the min of the (n + 1) spacings for a sample 'x'
minG <- function(x) min(diff(c(0, sort(x), 1)))
## simulate 'nSim' samples of size 'n' as columns of 'X'
X <- matrix(runif(nSim * n), nrow = n)
## compute the minimum spacing and normalize
Z <- (n + 1)^2 * apply(X, 2, minG)
c(mean(Z), 1.0)
c(sd(Z), sqrt(n / (n + 2)))  
plot(d <- density(Z), xlab = "", main = "density and exponential approx.")
lines(d$x, dexp(d$x, rate = 1), col = "red", lwd = 1.5)

Your Answer

By clicking โ€œPost Your Answerโ€, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.