Assume I have $n$ points sampled independently from the uniform distribution on the unit interval. After ordering the sample I get the points $X_1, X_2, \dots X_n$ such that $X_1 \leq X_2 \leq \dots \leq X_n$. According to the order statistics the distances are beta-distributed:
$$Y_{jk} = X_k - X_j \sim \text{Beta}(k-j,n-(k-j)+1), \quad k >j.$$
Now, I have some constant threshold value $d$ and need to calculate the following probability:
$$p = \mathbb{P}[(Y_{12} \leq d)\,\,\text{and}\,\, (Y_{13} > d)]$$
Using the rules of probability calculus I get
$$p = 1 - \mathbb{P}[Y_{12} > d] - \mathbb{P}[Y_{13} \leq d] + \mathbb{P}[(Y_{12} > d)\,\,\text{and}\,\, (Y_{13} \leq d)] = 1 - \mathbb{P}[Y_{12} > d] - \mathbb{P}[Y_{13} \leq d]$$
Here I have used the fact that $(Y_{12} > d)$ and $(Y_{13} \leq d)$ are mutually exclusive events in order statistics. The final probability $p$ can be calculated using the CDF of the beta distribution.
Now, I'm stuck in calculating a more complex probability:
$$\mathbb{P}[(Y_{12} > d)\,\,\text{and}\,\, (Y_{23} \leq d)\,\,\text{and}\,\, (Y_{24} > d)].$$
Could someone help me in solving the problem.