What is the probability that the distance between any 2 consecutive points on the line is less than the given minimum distance, d?

75 Views Asked by At

Question: Given a line segment $L$ and $n$ random points on it. Assuming the points are uniformly distributed over $[0, L]$. What is the probability that the distance between any 2 consecutive points on the line is less than the given minimum distance, d?

Attempt:

This question came from my curiosity, but my attempt is as follows:

To calculate the probability that the distance between any two consecutive points on the line is less than the given minimum distance $d$, we need to consider the total number of possible arrangements of the $n$ points on the line, as well as the number of arrangements that satisfy the condition.

The total number of possible arrangements of the n points on the line is given by the number of ways to choose $n-1$ points out of $L$, which is given by the binomial coefficient: $$C = {L-dn+1 \choose n-1}$$

Now, let's consider the number of arrangements that satisfy the condition. To do this, we can imagine dividing the line segment into small intervals of length $d$. For the distance between any two consecutive points to be less than $d$, each interval must contain at most one point. Therefore, the number of arrangements that satisfy the condition is given by the number of ways to choose $n$ or fewer intervals out of $(L/d)$ intervals, which is again given by the binomial coefficient: $$S = {L/d + 1 \choose n}$$

Finally, the probability that the distance between any two consecutive points on the line is less than d is given by the ratio of the number of arrangements that satisfy the condition to the total number of possible arrangements: $$P = \dfrac{S}{C}$$

I've tested the theoretical calculation with a Monte Carlo simulation. The results do not match. Hopefully, someone can provide an answer to the query. Thanks.

EDIT: For reference, using Monte Carlo simulation with the parameters $n = 10, L = 20, d = 2$, and $10^6$ trials the estimated probability is 0.002.

1

There are 1 best solutions below

0
On

What is described is the probability that the maximum, $x_{max}$, of the $n-1$ distances is less than $d$. This question was almost answered in a CV post. The difference here is that the distance from 0 to the first point and the distance from the last point to $L$ are not considered. To exclude those two intervals, change the $k+1$ term in the summation and binomial coefficient to $k-1$ (or change $n+1$ to $n-1$ using our notation):

$$P(x_{max}\leq d)=\sum_{j=0}^{n-1}{n-1\choose j}(-1)^j(1-jd/L)_+^n$$

As a function in R:

f <- function(n, d) {
  j <- 0:(n - 1L)
  jd1 <- 1 - j*d
  jd1[jd1 < 0] <- 0
  sum(choose(n - 1L, j)*(-1)^j*jd1^n)
}

L <- 20
d <- 2
n <- 10L

f(n, d/L)
#> [1] 0.00199584

Check against a simulation with $10^8$ replications:

s <- 1e8L
m <- matrix(rexp((n + 1L)*s), s, n + 1L)
mean(rowSums((m/rowSums(m))[,2:n] > d/L) == 0)
#> [1] 0.00200159