4

I was asked this in an interview and wasn't sure how to solve it:

Consider a stick of length $1$. Select two points independently and uniformly at random on the stick. Break the stick at these two points, resulting in $3$ smaller pieces. What is the probability that the smallest of these pieces is $\leq 1/5$?

For starters, I noted that the three sections must have lengths:

$$ \begin{aligned} \ell_1 &= \max(X,Y) \\ \ell_2 &= \max(X,Y) - \min(X,Y) \\ \ell_3 &= 1 - \max(X,Y) \end{aligned} $$

Let $\ell_{\texttt{min}}$, $\ell_{\texttt{mid}}$, and $\ell_{\texttt{max}}$ represent the smallest, middle, and largest stick lengths. So clearly we want to compute

$$ \mathbb{P}(\ell_{\texttt{min}} \leq 1/5) $$

However, I wasn't sure how to move forward from here. I assume I need to frame the problem such that I can perform integration by computing an area on a unit square.

jds
  • 2,274
  • 3
  • 24
  • 35

4 Answers4

4

Dividing the unit stick in 3 pieces at random, we have

enter image description here

It is eviedent that the three sticks can be identified as follows:

  1. $U=min(X,Y)$

  2. $V=1-Max(X,Y)$

  3. $Z=|X-Y|$

The probability that the minimum is Greater than $\frac{1}{5}$ is the probability that all 3 sticks are greater than $\frac{1}{5}$

Say

$$\mathbb{P}\Bigg[min(U,V,Z)>\frac{1}{5}\Bigg]=\mathbb{P}\Bigg[U>\frac{1}{5},V>\frac{1}{5},Z>\frac{1}{5}\Bigg]$$

Now given that $V>\frac{1}{5}$ is equivalent to $max(X,Y)<\frac{4}{5}$ the area results to me $$(0.8-0.4)^2=0.16$$

enter image description here

Which is the resulting intersection of the following 3 areas

enter image description here

Thus the requested probability is its complement to 1

$$ \bbox[5px,border:2px solid red] { \mathbb{P}\Bigg[min(U,V,Z)\leq\frac{1}{5}\Bigg]=1-0.16=0.84 \ } $$

tommik
  • 32,733
  • 4
  • 15
  • 34
3

Hint: Let $X$ and $Y$ be the coordinates of a point in the unit square. Draw a picture and shade the region where one piece is less than $\frac 15$. You should have the outer border of the square plus a region following the main diagonal. Evaluate the area of the shaded region. The region where the smallest piece is less than $\frac 15$ is the same as the region where at least one piece is less than $\frac 15$.

Ross Millikan
  • 374,822
1

We will solve this problem using geometric probability. Let $x$ be the length from the left end to the first break, and let $y$ be the length from the left end to the second break. Note that this means $x\leq y$. Then, the area in the coordinate plane satisfying $0\leq x\leq 1$, $x\leq y$, and $0\leq y\leq 1$ is the space of all possible breaks. To have a piece with length at most $\frac{1}{5}$, at least one of the following must be true:

$x\leq\frac{1}{5}$

$y\geq\frac{4}{5}$

$y-x\leq \frac{1}{5}$

When we graph all of these inequalities, we find that these (shaded) regions satisfy the problem:enter image description here

The area of the shaded regions is $0.42$. The total area of the region is $0.5$, so the probability of a piece having length at most $\frac{1}{5}$ is $\boxed{\frac{0.42}{0.5} = \frac{21}{25}.}$

Joshua Wang
  • 6,103
1

Let $x,~y$ and $1 - x - y$ denote the lengths of the broken pieces, where $x, y \sim U(0,1)$ and $x + y \le 1$. Let us define $z \dot{=} \min(x,y,1-x-y)$. We are interested in finding the probability: $P\left(z \le {1\over 5} \right) $.

We will compute $P\left(z \le z_0 \right)$ as $1 - P\left(z > z_0 \right)$.

\begin{equation} \tag{1} P\left(z > z_0 \right) = {\int_0^1 dx \int_0^{1-x} dy~\Theta(x - z_0).~\Theta(y - z_0).~\Theta(1 - x - y -z_0) \over \int_0^1 dx \int_0^{1-x} dy } \end{equation} where $\Theta(a) \equiv \mathbb{1}_{a>0} = 1$ if $(a > 0),~0$ otherwise. Note that $ x + y \le 1$ and the probability of this happening is given by the integral in the denominator which evaluates to ${1\over 2}$. The above expression for the probability easily generalizes to other distributions (defined on the unit interval) and can also be extended to have more variables. The probability in equation (1) simplifies to:

\begin{equation} P\left(z > z_0 \right) = 2 {\int_0^1 dx \int_0^{1-x} dy~\Theta(x - z_0).~\Theta(y - z_0).~\Theta(1 - x - y -z_0)} \end{equation}

The integral in the above equation is essentially the area of the triangle ABC shown in the figure (below).

Integration Domain (depicted by shaded triangle ABC)

Integration Domain

The integral can also be evaluated directly by finding the limits of $x$ and $y$ integrals to get rid of the step functions. The limits of the $x$ and $y$ integral can be obtained by solving for the coordinates of $A$, $B$ and $C$ (pairwise intersections of lines $P$, $Q$ and $R$). (Aside: There might be other variants of the problem where $P$, $Q$ and $R$ are more complicated curves and not simple lines. In such cases one needs to evaluate the integral within the area bounded by the curves $P,~Q$ and $R$. In the present case, the integral simplifies to:

$$ P\left(z > z_0 \right) = 2 \int_{z_0}^{1-2 z_0} dx \int_{z_0}^{1 - x - z_0} dy = (1 - 3 z_0)^2 = 2 \Delta ABC \qquad \text{for } ~z_0 < {1\over 3} $$ Note that when $z_0$ is greater than one-third, the probability is trivially zero. This can also be inferred from the fact that the lower limit of the $x$ integral exceeds the upper limit and hence one of the step functions must evaluate to zero in this case.

Returning to the original problem: $$ P\left(z \le z_0 \right) = 1 - (1 - 3 z_0)^2 \qquad \text{for } ~z_0 < {1\over 3} $$ With $z_0 = {1\over 5}$, we get: $$ P\left(\text{min length of the three pieces} \le {1\over 5} \right) = {21\over 25} $$

The problem can be generalized to $n$ pieces and to other distributions on the unit interval. The above procedure should work for such variants.