Tutorials › Statistical Theory I - Probability and Distribution Theory › The Dirichlet Law of Uniform Spacings

Ranks, Spacings, and Empirical Laws · Tutorial 478 of 994

The Dirichlet Law of Uniform Spacings

You will derive the joint law of the uniform spacings and see precisely why it is a Dirichlet distribution with every parameter equal to one.

Advanced 9 min read

What You'll Learn

  • Define the \(n+1\) spacings between the endpoints and consecutive order statistics.
  • Transform the order-statistic density and calculate the Jacobian.
  • State the spacing density with respect to \(n\)-dimensional simplex coordinates.
  • Identify the resulting law as \(\operatorname{Dirichlet}(1,\ldots,1)\).
  • Check the density’s normalization and distinguish simplex density from ambient-space density.
  • Calculate probabilities for spacing constraints by integrating over the simplex.

Why the Joint Law of the Spacings Matters

The ordered observations from a uniform sample do more than divide the interval into consecutive pieces: their entire vector of gaps has a simple joint distribution. Knowing that law gives a precise description of how the sample partitions \([0,1]\), while also making clear why the gaps cannot vary independently: their total is fixed.

Let \(U_1,\ldots,U_n\) be independent \(\operatorname{Uniform}(0,1)\) random variables, and write their order statistics as \(U_{(1)}<\cdots<U_{(n)}\). These inequalities hold with probability one because the sampling distribution is continuous. Include the two boundary gaps as well as the gaps between observations.

Definition: The \(n+1\) uniform spacings are \(S_1=U_{(1)}\), \(S_i=U_{(i)}-U_{(i-1)}\) for \(2\leq i\leq n\), and \(S_{n+1}=1-U_{(n)}\). They are positive with probability one and satisfy \(\sum_{i=1}^{n+1}S_i=1\).

The simplex constraint means that the joint law is not a density on an unrestricted \((n+1)\)-dimensional region. We will describe it using \(S_1,\ldots,S_n\) as coordinates, with \(S_{n+1}=1-\sum_{i=1}^{n}S_i\). This is the same constraint emphasized in the earlier material on uniform spacings; the purpose here is to derive the full joint law on that constrained space.

From Order Statistics to Spacings

For independent uniform observations, the joint density of the order-statistic vector \((U_{(1)},\ldots,U_{(n)})\) is \(n!\) on the region \(0<u_1<\cdots<u_n<1\), and zero elsewhere. Apply the change of variables \(s_1=u_1\), \(s_i=u_i-u_{i-1}\) for \(2\leq i\leq n\). Its inverse is \(u_i=\sum_{j=1}^{i}s_j\).

The Jacobian matrix of the inverse transformation is lower triangular: its entry in row \(i\), column \(j\) is \(1\) if \(j\leq i\), and \(0\) otherwise. Every diagonal entry is \(1\), so the absolute value of its determinant is \(1\). The order-statistic support becomes \(s_i>0\) for \(1\leq i\leq n\) and \(\sum_{i=1}^{n}s_i<1\); the remaining spacing is then positive.

Theorem: With respect to ordinary \(n\)-dimensional Lebesgue measure \(ds_1\cdots ds_n\), the density of \((S_1,\ldots,S_n)\) is $$ f(s_1,\ldots,s_n)= \begin{cases} n!, & s_i>0\ (1\leq i\leq n),\quad \sum_{i=1}^{n}s_i<1,\\ 0, & \text{otherwise}. \end{cases} $$ Equivalently, the full spacing vector has constant density \(n!\) in the first \(n\) simplex coordinates, with \(S_{n+1}=1-\sum_{i=1}^{n}S_i\).

This density is a direct consequence of the change-of-variables formula: the order-statistic density contributes \(n!\), and the transformation contributes a Jacobian factor of \(1\). The support condition also captures the original ordering exactly. Indeed, positive spacings give \(u_1=s_1>0\) and \(u_i-u_{i-1}=s_i>0\), while \(\sum_{i=1}^n s_i<1\) gives \(u_n<1\).

The Dirichlet Distribution and the Simplex Density

For clarity, specify the coordinate convention in the definition of the Dirichlet law. For \(k\geq2\), the open \((k-1)\)-simplex consists of \(s_1,\ldots,s_{k-1}>0\) with \(\sum_{i=1}^{k-1}s_i<1\), and \(s_k=1-\sum_{i=1}^{k-1}s_i\). A density on this simplex is understood with respect to \(ds_1\cdots ds_{k-1}\).

Definition: For parameters \(\alpha_1,\ldots,\alpha_k>0\), a random vector \(S=(S_1,\ldots,S_k)\) has a \(\operatorname{Dirichlet}(\alpha_1,\ldots,\alpha_k)\) distribution if its density in the first \(k-1\) simplex coordinates is $$ f(s_1,\ldots,s_{k-1}) = \frac{\Gamma(\alpha_1+\cdots+\alpha_k)} {\prod_{i=1}^{k}\Gamma(\alpha_i)} \prod_{i=1}^{k}s_i^{\alpha_i-1}, $$ on the open simplex, and is zero elsewhere. Here \(\Gamma(a)=\int_0^\infty t^{a-1}e^{-t}\,dt\) for \(a>0\).

The normalizing constant in this definition follows from the simplex integral $$ \int_{\substack{s_i>0,\ 1\leq i\leq k-1\\ \sum_{i=1}^{k-1}s_i<1}} \prod_{i=1}^{k}s_i^{\alpha_i-1}\,ds_1\cdots ds_{k-1} = \frac{\prod_{i=1}^{k}\Gamma(\alpha_i)} {\Gamma(\alpha_1+\cdots+\alpha_k)}. $$ To see why, integrate \(\prod_{i=1}^k y_i^{\alpha_i-1}e^{-y_i}\) over \(y_i>0\). Integrating each coordinate separately gives \(\prod_i\Gamma(\alpha_i)\). Alternatively, set \(t=\sum_i y_i\), \(s_i=y_i/t\) for \(i<k\), and \(s_k=1-\sum_{i<k}s_i\). The inverse is \(y_i=ts_i\), and its Jacobian has absolute value \(t^{k-1}\). The integral becomes the simplex integral above multiplied by \(\int_0^\infty t^{\sum_i\alpha_i-1}e^{-t}\,dt=\Gamma(\sum_i\alpha_i)\). All these integrals are finite because every \(\alpha_i\) is positive, so the change of variables and separation of the nonnegative integrals are valid.

Theorem: For \(n\) independent \(\operatorname{Uniform}(0,1)\) observations, their \(n+1\) spacings have distribution \(\operatorname{Dirichlet}(1,\ldots,1)\), with \(n+1\) parameters.

To verify the identification, substitute \(k=n+1\) and \(\alpha_i=1\) into the Dirichlet density. Since \(\Gamma(1)=1\) and \(\Gamma(n+1)=n!\), the product of powers is \(1\) and the density is \(n!\). Its support and coordinate convention are exactly those in the spacing density derived above.

Worked Examples

Worked Example: Two Spacings from One Observation

Let \(n=1\). Then \(S_1=U_{(1)}=U_1\) and \(S_2=1-U_1\). Using \(s_1\) as the single simplex coordinate, the support is \(0<s_1<1\), with \(s_2=1-s_1\).

The joint density in that coordinate is \(1!=1\). The Dirichlet formula with parameters \((1,1)\) gives \(\Gamma(2)/(\Gamma(1)\Gamma(1))=1\), with both powers equal to zero. Thus \((S_1,S_2)\sim\operatorname{Dirichlet}(1,1)\). As a check, its density integrates to \(\int_0^1 1\,ds_1=1\).

Worked Example: A Joint Spacing Probability for Two Observations

For \(n=2\), the first two spacings have density \(2\) on \(s_1>0,\ s_2>0,\ s_1+s_2<1\), and \(S_3=1-s_1-s_2\). Find \(P(S_1>1/4,\ S_2>1/4)\).

The constraints restrict \(s_1\) to \(1/4<s_1<3/4\). For each such \(s_1\), the allowed values of \(s_2\) are \(1/4<s_2<1-s_1\). Integrating the joint density gives $$ \begin{aligned} P(S_1>1/4,\ S_2>1/4) &=\int_{1/4}^{3/4}\int_{1/4}^{1-s_1}2\,ds_2\,ds_1\\ &=2\int_{1/4}^{3/4}(3/4-s_1)\,ds_1\\ &=2\left[\frac{3s_1}{4}-\frac{s_1^2}{2}\right]_{1/4}^{3/4}\\ &=2\left(\frac{9}{32}-\frac{5}{32}\right)=\frac14. \end{aligned} $$ The result is a probability between zero and one. Geometrically, requiring the first two gaps to exceed \(1/4\) leaves a simplex of the same shape scaled by \(1/2\) in two dimensions, whose area is \(1/4\) of the original.

Worked Example: Four Gaps Each Exceed a Threshold

Take \(n=3\), so the four spacings have density \(3!=6\) in the first three coordinates. Find the probability that all four spacings exceed \(1/8\).

Set \(T_i=S_i-1/8\) for \(i=1,\ldots,4\). The event is \(T_i>0\) for every \(i\), and the sum constraint becomes \(\sum_{i=1}^4T_i=1-4/8=1/2\). In the first three coordinates, the allowed region therefore has volume \((1/2)^3/3!\). This volume formula follows by scaling the unit three-simplex, whose volume is \(1/3!\), by \(1/2\) in each coordinate. Hence $$ P(S_i>1/8\ \text{for all }i) =6\frac{(1/2)^3}{3!} =6\frac{1}{48} =\frac18. $$ The factor \(6\) is the density; the volume alone is not the probability.

Normalization, Geometry, and a Common Pitfall

The density \(n!\) is constant because all ordered configurations have the same density and the spacing transformation preserves volume. It is also correctly normalized: the region \(s_i>0,\ \sum_{i=1}^n s_i<1\) has volume \(1/n!\). One way to establish this is induction on \(n\). For \(n=1\), the region has length \(1\). If the \((n-1)\)-dimensional simplex with total at most \(a\) has volume \(a^{n-1}/(n-1)!\), then slicing the \(n\)-dimensional simplex by \(s_n=t\) gives volume $$ \int_0^1\frac{(1-t)^{n-1}}{(n-1)!}\,dt =\frac{1}{n!}. $$ Multiplying this volume by \(n!\) gives total probability one.

Common mistake: It is tempting to say that the \(n+1\) spacings are independent because the sample observations are independent. That conclusion is false: the spacings obey \(\sum_i S_i=1\), so fixing any \(n\) of them determines the last one. The independence of the original observations supports the order-statistic density, but it does not make the transformed spacings independent.

A related mistake is to claim that the full vector has an ordinary \((n+1)\)-dimensional density equal to \(n!\). It lies on the hyperplane \(\sum_i s_i=1\), which has zero \((n+1)\)-dimensional Lebesgue measure. The stated density is instead with respect to the first \(n\) coordinates on the simplex. This coordinate convention is essential both for the Jacobian calculation and for matching the Dirichlet density.

Key takeaway: The spacings from \(n\) independent uniform observations are uniform over the \(n\)-dimensional simplex in the first \(n\) coordinates. Their joint density is \(n!\), and the full vector has the \(\operatorname{Dirichlet}(1,\ldots,1)\) law.

Check Your Understanding

Use the simplex-coordinate convention from this tutorial.

  1. Write the first \(n\) spacings in terms of \(U_{(1)},\ldots,U_{(n)}\), and state how the final spacing is determined.
  2. Why does the transformation from the order statistics to the first \(n\) spacings have Jacobian determinant \(1\)?
  3. For \(n=2\), state the support and density of \((S_1,S_2)\), and identify \(S_3\).
  4. Explain why the Dirichlet parameters are all equal to one and why the density constant is \(n!\).
  5. Why is the full \(n+1\)-component spacing vector not described by an ordinary \((n+1)\)-dimensional Lebesgue density?