Distance Between Two Random Cutpoints

Probability · Medium · Free problem

Lewis is cutting a piece of wood of length $L$ into three pieces. He independently and uniformly at random chooses two cutpoints -- one on the left half of the wood and one on the right half. Let $X_1 \sim \text{Uniform}(0, L/2)$ be the left cutpoint and $X_2 \sim \text{Uniform}(L/2, L)$ be the right cutpoint.

What is the probability that the distance between the two cutpoints is less than $L/3$?

Compute the answer for $L = 2$ (though note the answer does not depend on $L$).

Hints

  1. The answer does not depend on $L$. Set $L = 1$ to simplify. You have two independent uniforms on $(0, 1/2)$ and $(1/2, 1)$.
  2. Condition on $X_1 = x$ and compute $P(X_2 < 1/3 + x)$ using the CDF of $\text{Uniform}(1/2, 1)$. Be careful -- this probability is zero when $x < 1/6$.
  3. The integral reduces to $4 \int_{1/6}^{1/2} (x - 1/6) \, dx$. Evaluate to get $2/9$.

Worked Solution

How to Think About It: The value of $L$ cancels out -- all distances scale with $L$, so we can set $L = 1$ without loss of generality. Then $X_1 \sim \text{Uniform}(0, 1/2)$ and $X_2 \sim \text{Uniform}(1/2, 1)$, independently. We need $P(X_2 - X_1 < 1/3)$. Since $X_2 > 1/2$ and $X_1 < 1/2$, we always have $X_2 - X_1 > 0$, so this is just $P(X_2 - X_1 < 1/3)$.

Quick Estimate: The distance $X_2 - X_1$ has mean $E[X_2] - E[X_1] = 3/4 - 1/4 = 1/2$. The threshold is $1/3$, which is below the mean, so the probability should be less than $1/2$. The distance ranges from just above $0$ (when both cutpoints are near the midpoint) to just below $1$ (when they are at opposite ends). A rough guess: maybe $1/5$ to $1/4$.

Approach: Condition on $X_1$ and integrate using the law of total probability.

Formal Solution:

With $L = 1$: $X_1$ has density $f_{X_1}(x) = 2$ on $(0, 1/2)$ and $X_2$ has density $f_{X_2}(y) = 2$ on $(1/2, 1)$.

$$P(X_2 - X_1 < 1/3) = \int_0^{1/2} P(X_2 < 1/3 + x) \cdot 2 \, dx$$

Since $X_2 \sim \text{Uniform}(1/2, 1)$:

$$P(X_2 < 1/3 + x) = \begin{cases} 0 & \text{if } 1/3 + x \leq 1/2, \text{ i.e., } x \leq 1/6 \\ 2(1/3 + x - 1/2) = 2(x - 1/6) & \text{if } 1/2 < 1/3 + x \leq 1, \text{ i.e., } 1/6 < x \leq 1/2 \end{cases}$$

Note: for $x \leq 1/2$, we have $1/3 + x \leq 5/6 < 1$, so the CDF does not cap at 1 in our range.

Substituting:

$$P(X_2 - X_1 < 1/3) = \int_{1/6}^{1/2} 2(x - 1/6) \cdot 2 \, dx = 4 \int_{1/6}^{1/2} \left(x - \frac{1}{6}\right) dx$$

$$= 4 \left[ \frac{(x - 1/6)^2}{2} \right]_{1/6}^{1/2} = 4 \cdot \frac{(1/2 - 1/6)^2}{2} = 4 \cdot \frac{(1/3)^2}{2} = 4 \cdot \frac{1}{18} = \frac{2}{9}$$

Answer: The probability is $\dfrac{2}{9}$.

Intuition

This problem is a geometric probability exercise: the joint distribution of $(X_1, X_2)$ is uniform on the rectangle $(0, 1/2) \times (1/2, 1)$, and we want the fraction of that rectangle satisfying $X_2 - X_1 < 1/3$. Geometrically, the constraint $X_2 - X_1 < 1/3$ is the region below the line $X_2 = X_1 + 1/3$ inside the rectangle. Drawing the picture makes it clear why the lower bound on $x$ is $1/6$ -- that is where the line $X_2 = X_1 + 1/3$ enters the rectangle from the bottom edge at $X_2 = 1/2$.

The general technique of conditioning on one variable and integrating out the other is the workhorse of continuous probability. The subtle part is getting the integration bounds right -- the constraint intersects the support in a non-trivial way. In interviews, drawing the rectangle and the constraint region is the fastest way to avoid sign errors.

Open the full interactive solver →