Here’s a cute problem in probability I learned in Joe Blitzstein’s Stat 110 class. Suppose you have a stick of unit length. You choose two points on the stick at random and then break the stick at those two points, resulting in three pieces whose lengths add up to one. What is the probability that you can form a triangle with the three pieces?

We first need to clarify what it means to choose the points and randomly. Let be independent random variables on a probability space . So the lengths of the three pieces created after breaking the stick are

We know that a necessary condition for to form a triangle is that the length of any two sides is greater than the length of the remaining side–this is the well-known triangle inequality. Mathematically, for any permutation ,

Is this also a sufficient condition? The answer is yes, and it follows quickly from the law of cosines. Fix one vertex at the origin and another vertex at . Where do place the third vertex , so that

and

Well, by the law of cosines, we can choose so that

We define .

Since , we see that these lengths do form the sides of a triangle if and only if

We consider two cases. First, suppose that . Then are the lengths of the sides of a triangle if and only if . Since are independent, conditioning on , we obtain

If , then are the lengths of the sides of a triangle if and only if . By symmetry, we also have that

Since a continuous random variable takes values in a countable set with probability zero, we conclude that the probability a triangle can be formed is .

Now suppose that you don’t have a ruler. Moreover, your sight isn’t good enough to eyeball to be units distance from one endpoint and to be units distance from the other endpoint, so that you can’t form an equilateral triangle. You want to form a triangle, so you decide to keep breaking sticks, as described above, until you can form a triangle. On average, how many sticks must you go through before achieving success?

The answer to this question is an exercise in the geometric probability distribution. Recall that a random variable is said to be geometrically distributed with parameter if

and we write . The expectation of can be found by evaluating an infinite series. Since a uniformly convergent series can be differentiated term by term, we see that

If denotes the number of sticks you break until a triangle can be formed and , then we see that, on average, you have to break four sticks until a triangle can be formed with the three pieces.