Distribution of $D_i=X_{(i)}-X_{(i-1)}$ where $X_{(i)}$ is the $i$th order statistic

I am given a set of iid random variables $$\{X_i\}\sim f(x)$$ with cdf $$F(X)$$ I am asked to find the distribution of the following $$D_i=X_{(i)}-X_{(i-1)}$$ where $$X_{(i)}$$ is the $$i$$th order statistic and $$i\ge2$$. My approach is

$$P(D_i=z)=P(X_{(i)}-X_{(i-1)}=z)=P(X_{(i)}=X_{(i-1)}+z)=\int P(X_{(i)}=y+z|X_{(i-1)}=y)P(X_{(i-1)}=y)dy$$

I know $$P(X_{(i-1)}=y)=\frac{n!}{(i-2)!(n-i+1)!}f(y)F(y)^{i-2}(1-F(y))^{n-i+1}$$

I was trying to find this probability of $$P(X_{(i)}=y+z|X_{(i-1)}=y)$$ through counting. Let $$X_{(i-1)}=y$$ then my probability is (where I am using $$X$$ as a the distribution representative)

$$P(X_i=y+z, X_j=y \hspace{3mm}\text{for some} \hspace{3mm}i,j\in\{1...n\},Xy+z \hspace{2mm}\text{for} \hspace{2mm} (n-i) \text{obs})$$

Since there are $$\frac{n!}{(i-2)!(n-i)!}$$ combinations that will result in the above scenario and each has a probability of $$f(y)f(y+z)F(y+z)^{i-2}(1-F(y+z))^{n-i}$$ then $$P(D_i=z)=\int\frac{n!}{(i-2)!(n-i)!}f(y)f(y+z)F(y+z)^{i-2}(1-F(y+z)^{n-i}\frac{n!}{(i-2)!(n-i+1)!}f(y)F(y)^{i-2}(1-F(y))^{n-i+1}dy$$

I am having trouble reducing this large integral. So I am guessing if my approach is even correct or if there is a simpler approach?

I am trying to find the joint distribution of $$P(D_i=d_i,...,D_n=d_n)$$ which basically reduces to $$P(X_{(n)}-X_{(1)}=\sum_{i=2}^{n}d_i)$$ that is why I need the above distribution.

Yes, indeed, you are close.

The basis for evaluating the probability density function of the event $$\{X_{(i)}=y\}$$ is that it's outcomes consist of some arrangement of $$(i-1)$$ samples that are below $$y$$, one sample that is equal to $$y$$, and $$(n-1)$$ samples that are above $$y$$.  Since we may safely ignore ties as being so to near impossible, there are $$n!/(i-1)!(n-i)!$$ ways to arrange outcomes that satisfy this.$$f_{\small X_{(i)}}(y)=\dfrac{n! F_{\small X}(y)^{i-1} f_{\small X}(y)(1-F_{\small X}(y))^{n-1}}{(i-1)!1!(n-i)!}$$

Likewise, for $$i\in\{2..n\}$$, the event of $$\{X_{(i-1)}=x,X_{(i)}=x+z\}$$ is the event that $$i-2$$ samples are below $$x$$, one sample exactly $$x$$, one sample exactly $$x+z$$, and the remaining $$n-i$$ samples are above $$x+z$$.   Ignoring the zero density posibilities of ties, there are $$n!/(i-2)!(n-i)!$$ ways to arrange samples that satisfy this criteria.

So then considering that the event of $$\{D_i=z\}$$ is $$\bigcup_x\{X_{(i-1)}=x,X_{(i)}=x+z\}$$, we integrate the density over all real values for $$x$$.

\begin{align}f_{\small D_i}(z)&=\int_\Bbb R f_{\small X_{(i-1)},X_{(i)}}(x,x+z)~\mathrm d x\\&=\dfrac{n!}{(i-2)!1!1!(n-i)!}\int_{\Bbb R} F_{\small X}(x)^{i-2}\, f_{\small X}(x)\, f_{\small X}(x+z)\, (1-F_{\small X}(x+z))^{n-i}\,\mathrm d x\end{align}

• It appears that I am calculating $P(X_{(i)}=y+z|X_{(i-1)}=y)$ the same way you are calculating $P((X_{(i)}=y+z, X_{(i-1)}=y)$ On this ocassion are they the same? Jul 31 '20 at 14:43
• I believe I made the mistake by calculating $P(X_{(i)}=y+z|X_{(i-1)=y})=P(X_{(i)}=y+z, X_{(i-1)}=y)$. Where the former is not the event of interest since it restricts the sample space to chains that have $X_{(i-1)}=y$ where I want the event that both are true amongst all the possible chain arrangements. Thank you Graham Jul 31 '20 at 14:56