Question

Suppose you break a stick of unit length at a point chosen uniformly at random. Then the expected length of the shorter stick is ________ .

Official answer and solution
Accepted answers
0.24 to 0.27
From
Official GATE 2014 answer key

Solution

Model the break point as a continuous uniform random variable on (0,1)(0, 1) and compute the expected value of the minimum of the two pieces.

Let the stick have length 1, and let the break point XX be chosen uniformly at random from (0,1)(0, 1), so the probability density function is fX(x)=1f_X(x) = 1 for x∈(0,1)x \in (0, 1).

The stick is broken into two pieces of lengths XX and 1−X1 - X.
The length of the shorter piece is:

L=min⁡(X,1−X)L = \min(X, 1 - X)

Notice that:

  • If X≤0.5X \le 0.5, then L=XL = X.
  • If X>0.5X > 0.5, then L=1−XL = 1 - X.

By symmetry about x=0.5x = 0.5:

E[L]=∫01min⁡(x,1−x)dx=2∫00.5xdxE[L] = \int_0^1 \min(x, 1 - x) dx = 2 \int_0^{0.5} x dx
E[L]=2[x22]00.5=(0.5)2=0.25E[L] = 2 \left[ \frac{x^2}{2} \right]_0^{0.5} = (0.5)^2 = 0.25

Thus, the expected length of the shorter stick is 0.250.25.

Final answer

0.25

Common trap

Integrating over the full interval (0,1)(0, 1) without accounting for the piecewise definition of the minimum.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 1
Question
12 of 65, printed as CS Q.2
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.