Probability Two Random Breaks of a Stick Form a Triangle

Last updated: November 29, 2026

Quick Overview

Break a unit stick at two points chosen independently and uniformly along its length. What is the probability the three pieces can form a triangle, and how does the answer change if you break once, then break the longer piece?

Google
Statistics & Math
Data Scientist
Google
November 29, 2026
Data Scientist
Technical Screen
Statistics & Math
Medium

0

0

0 solved


Break a unit stick at two points chosen independently and uniformly along its length. What is the probability the three pieces can form a triangle, and how does the answer change if you break once, then break the longer piece?

The broken stick problem is a staple of Google data science screens because it combines a clear condition with a geometric probability computation. Interviewers check the triangle inequality reduction, the area argument, and care with the variant where the procedure changes the answer.

What the Interviewer Expects
  • Reduce the triangle condition to every piece being shorter than 1/2
  • Map the two break points to the unit square
  • Compute the favorable area 1/4
  • Handle the sequential variant with an integral, giving 2 ln 2 - 1
  • Sanity check by simulation
Key Topics to Cover
geometric probability
triangle inequality
uniform distribution
conditioning
integration
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • What if you break once, then break a randomly chosen piece (not the longer one)?
  • What is the expected length of the longest piece?
  • With n - 1 random breaks, what is the probability that no piece exceeds 1/2?
  • Why do two seemingly similar procedures give different answers?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Unit stick, break points U,VU, V i.i.d. Uniform(0,1). Pieces are min⁡(U,V)\min(U,V), ∣U−V∣|U - V|, 1−max⁡(U,V)1 - \max(U,V). Three lengths summing to 1 form a triangle exactly when each is less than 1/21/2 (the triangle i...

Approach

Picture (U,V)(U, V) uniform on the unit square. By symmetry, compute on the half U<VU < V (area 1/2), where pieces are UU, V−UV - U, 1−V1 - V, then divide....


Submit Your Answer
Markdown supported