Broken sticks puzzle, and a seemingly paradoxical ratio


image via flickr, CC by 2.0

This is a neat little problem that is an extension of a puzzle from the Richard Wiseman’s blog.

The puzzle

A warehouse contains thousands of sticks, each 1 meter long. One day a bored worker breaks each of the sticks in two, with each of the breaks happening at a random position along each stick. (random here means “uniform distribution”)

There are three questions:

(1) What is the average length of the shorter pieces?

(2) What is the average length of the longer pieces?

(3) What is the average ratio of the length of the shorter piece to the longer piece?

I will give a hint that questions (1) and (2) are easier to solve. It is much harder to solve (3) but it is quite an interesting answer.

Can you figure it out? Answer below
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

How to solve them
The first two questions can either be solved by considering symmetry, or they can be solved using calculus.

One might think the third question follows as a simple division from questions 1 and 2. This is not true! The average ratio is NOT the ratio of the averages! I’ll explain why below.

Answer to (1)
By definition, the smaller piece will be less than half the length (0.5 meters).

The smaller sticks, therefore, will range in length from almost 0 m up to a maximum of 0.5 meters, with each length equally possible.

Thus, the average length will be about 0.25 meters, or about a quarter of the stick.

A more rigorous way of solving this, though less intuitive, is to set up an expectation and solve.

Suppose the stick is broken at point x, meaning the two pieces will be of length x and 1 – x.

We can denote the shorter piece by the formula min(x, 1 – x).

Now we can solve for the average value by setting up an integral that ranges from 0 to 1.

I love doing integrals myself, but from time to time I get bored and would rather not make a math error. So this time I’ll just input the equation into Wolfram Alpha which magically churns out a solution:

Fun stuff: the output of 1/4 exactly matches what we got before!

Answer to (2)
If the average of the smaller piece is 0.25, then it would only make sense the average of the larger piece is 0.75. But let’s go through the reasoning to be sure.

By definition, the larger piece will be more than half the length (0.5 meters).

The larger sticks, therefore, will range in length from 0.5 meters to almost the entire stick of 1 meter, with each length equally possible.

Thus, the average length will be about 0.75 meters, or about three-quarters of the stick.

Again, a more rigorous approach can be taken.

Suppose the stick is broken at x, yielding pieces of length x and 1 – x.

The larger piece can be denoted by the formula max(x, 1 – x).

An integral ranging from 0 to 1 will get the average, and Wolfram Alpha is again helpful:

This verifies that 0.75 meters is the correct length.

Answer to (3)
This is the most interesting piece of the puzzle.

If the smaller pieces average 0.25 meters, and the larger pieces average 0.75 meters, then wouldn’t the ratio of the lengths be the division? That is, shouldn’t the answer be 1/3 = 0.25 / 0.75 ?

The surprising result is no! The average ratio is not equal to the ratio of the averages.

This can be demonstrated by direct calculation.

If the stick is broken at point x, then the ratio of the shorter to the longer piece will depend on the value of x. When x is between 0 and 0.5, then the ratio is x / (1 – x). When x is between 0.5 and 1, the ratio will be the reciprocal (1 -x / x.

Again, Wolfram Alpha can compute the integral quickly:

The average ratio is not 1/3, but it is rather a bit higher at 0.386.

You can compute the integral by hand to find the exact answer is 2 ln(2) – 1, where “ln” denote the natural logarithm.

This itself is a rather surprising result: Euler’s constant e comes out of nowhere!

It is seemingly paradoxical that the average ratio (shorter / longer) is not the ratio of the average of shorter to longer pieces.

The answer lies in the distribution of the ratio. Notice the chart for the ratio bows toward the center, or in other words, the peak at 0.5 seems a little “fat.”

The ratio of the shorter to longer piece is slightly skewed toward the value of 0.5, and that is why the average is slightly higher at 0.386 instead of 0.333.

I admit that I missed this puzzle the first time I tried to solve it. Did you figure it out on your first try?

Bonus question: what is the average ratio of the longer piece to the shorter piece?



Share this post:

| More

Previous post:

Next post:



  • Pingback: Tweets that mention Broken sticks puzzle, and a seemingly paradoxical ratio - Mind Your Decisions -- Topsy.com

  • http://randomwalker.info/ Arvind Narayanan

    I found the bonus question _infinitely_ more interesting.

  • http://bitpunk.org syntaxfree

    This comes from Jensen’s inequality. If you graph out f(x,y)=x/y in a 3D cartesian space, you’ll see immediately it’s a convex function. Therefore, the first answer to (3), which is E(x)/E(y) is smaller than E(x/y).

  • Liam Carton

    Sorry, but I don’t think this is correct. It is pure sleight of hand.

    For a start you are using these terms in a rather loose way. By average one has to assume that you mean “mean” as opposed to the mode or median. But even given this, for some reason you have decided to “flip” the ratios at the 50:50 mark.

    When you don’t flip the ratios around the middle the mean of the ratios actually approaches 10.

    So your log factor (e) doesn’t just “appear” you chose to add it when you inserted this flipping of the ratios at the half way mark, thus biasing the result towards the centre on the graph.

    Furthermore, I would strongly suggest that the answer to question b should be 1:1, as the question implies not the mean, but the median, which would of course be 1:1 (or 1) and not 1/3.

  • Matt

    oh man this is blowing my mind. I didn’t even know that you could integrate things like these min() and piecewise() operations.

    WHERE DID e COME FROM??

  • EdorFaus

    Liam Carton: I suspect you’re trolling, but just to avoid any potential confusion: the flipping of the ratios follows directly from the question.

    The key to understanding this lies in the definition of x, which here is the position along the stick that the break took place, and in the fact that we always want the shorter piece on top of the ratio.

    Thus, when x 0.5, the shorter piece is the piece from x to 1, which has length 1-x. The same holds, except the other way around, for the longer piece.

    One way to imagine this would be that, after breaking the stick, you always want to have the longer piece to the right of the shorter piece – for half of the sticks you would need to switch the pieces around before putting them down.

    If you did that before taking x, you could then get the same result by calculating 2*integral(x/(1-x),x,0,0.5) instead.

  • Sauron

    Liam:
    The choice to “flip” the ratio around the halfway mark wasn’t as arbitrary as you imply. If you don’t flip you’re merely asking about the left and right pieces. The flip is required because we want to know about the longer piece v. the shorter piece. Furthermore, I have no idea what makes you think that the question implies median, also. “Average” is a _highly_ overloaded term, but I think it’s fair to say that it means “mean” more often than it means anything else.

    Interestingly, the first two parts matched my (admittedly mathematically-trained) intuition, but my intuition had no guess at the third part without working out the math.

  • Liam Carton

    In answer to EdorFaus I certainly am not “trolling”.
    I do however accept that I had miss-read the 3rd question.
    None-the-less, my point about “e” is still valid. The reason that it appears is due to the fact that you are flipping an exponential curve. So “e” does not “magicaly” appear.

  • http://vedgar.googlepages.com Veky

    It isn’t an exponential curve (at least before the integration). It’s a graph of a piecewise rational function. The ln appears just because it is a primitive function of the reciprocal.
    int{1~2}dx/x=ln2.

  • Pingback: Information Overload 2011-02-06 « citizen428.blog()

  • Pingback: Matrix67: My Blog » Blog Archive » 趣题:随机折断的木棒

  • Blahah

    An interesting exercise.

    The situation isn’t accurately modeled though; snapping the stick would require a purchase on either side of the snapping point, meaning there would be no pieces smaller than the minimum size required to achieve the necessary purchase to snap the stick (certainly this isn’t so close to 0 that you can discard it). So your mean size for the smaller piece would be right-skewed, i.e. longer than 0.25 meters, and the mean size for the longer piece would be left-skewed, i.e. shorter than 0.75 meters.

  • dentaku

    if the point of breaking is plotted on the X axis and the ratio of longer to shorter on the Y axis, then we get a U-shaped curve with a minimum of 1 at 0.5 on the X axis and that approaches infinity at the extremes?
    since the break is uniformly distributed, the average ratio will be quite large (infinity?).

  • http://www.mindyourdecisions.com/blog/ Presh Talwalkar

    That’s right, the ratio of longer to shorter is infinity.

  • dentaku

    so, perhaps even more unintuitively (at least to me!):

    S/L = 1/(L/S) but ave(S/L) ≠ 1/ave(L/S)

  • knaj

    Why is the ratio infinity? The probability that the stick is cut at point 0 or 1 (which would not really be a cut) is infinitely small; wouldn’t this balance out the infinity?

  • Pingback: 16 ways WolframAlpha can help you manage money - Mind Your Decisions





Previous post:

Next post:

Other posts you may enjoy reading:

Random Posts