A Whole New Brain Teaser

brainToday I have a new brain teaser for you. It’s similar in flavor to last week’s brain teaser, but it’s genuinely different, and it’s different in an instructive way. And it stands on its own; you don’t need to have followed last week’s discussion to tackle this.

Here goes: There’s a certain country where everybody wants to have a son. Therefore each couple keeps having children until they have a boy; then they stop. In expectation, what is the ratio of boys to girls?

For those who were here last week, notice that this problem is genuinely different. Last week I asked about the fraction of the population that is female. If we exclude the parents, that’s the ratio G/G+B. Today’s problem asks about the ratio B/G.

Stop here if you don’t want spoilers.

Here’s the wrong argument: Each birth is equally likely to be a boy or a girl, so we should expect equal numbers of boys and girls. Therefore the expected ratio of boys to girls is 1. This argument is wrong for exactly the same reason that 1/2 was the wrong answer to last week’s problem — it’s true that the expected difference between girls and boys is zero, but that tells us nothing about the expected ratio.

The right answer is not 1. It’s infinity.

That’s because there’s always some (possibly tiny) chance that zero girls have been born, making the ratio infinite. The expected ratio is an average over all possible outcomes. When one of the things you’re averaging over is infinite, then the average is infinite.

What’s interesting about this answer is that it is nowhere close to the “natural” answer of 1. So the erroneous reasoning that gets you to that natural answer must not be even remotely trustworthy.

There’s a lesson here. To see what the lesson is, you have to know what happened last week:

  • I posed a problem.
  • Many readers gave incorrect arguments, concluding that the answer was 1/2.
  • The correct answer, however, was not 1/2, though it was close to 1/2 for a large country.
  • Many of those readers then said “Ha! So my answer was right after all — or at least so close to right that it ought to count! To call my answer wrong is to quibble over an insignificant difference!”
  • I said, “No, your reasoning is completely wrong. If it got you close to the right answer, that’s the kind of fluke that gets no credit.”
  • Many readers responded: “But since my answer is so close to right, my reasoning must be essentially valid”.
  • I said: “Huh?

The nice thing about today’s puzzle is that it illustrates why those readers have no case. Because exactly the same incorrect reasoning that gave you the answer 1/2 last week will give you the answer 1 this week. But this time, your answer is nowhere close to right.

Let me say that again: If you stick to the reasoning that so many readers defended so vehemently last week, then this week you will get an answer that is off by infinity. That’s a pretty good reason to reject that kind of reasoning.

Print Friendly, PDF & Email
Share

51 Responses to “A Whole New Brain Teaser”


  1. 1 1 Jeff Semel

    I’m not claiming to have good mathematical intuition for this sort of problem, but it feels like the ratio of boys to girls in the no-girls case could be regarded as “undefined” rather than “infinite,” and therefore excluded from the average of expectations.

    On a more practical note, is any of Landsburg’s money available for a wager on this? Not a wager on whether your answer is correct – I wouldn’t bet against you – but a wager such that I win if the observed ratio of boys to girls for any (actual) country of your choice is less that N. If the expected ratio is infinity, you could offer me a modest N=100. For any decent-sized country, I’d be eager to take the bet. Why isn’t it a good bet for you?

    I suppose there’s some reason why the expected return on the bet I’m proposing is quite unrelated to the expected ratio of boys to girls, but I don’t know why. Why doesn’t “expected” mean what I expect?

  2. 2 2 Jeff Semel

    P.S. On reflection, perhaps it’s because my bet depends on the median expected ratio rather than the mean expected ratio.

  3. 3 3 Marcel

    Steven, that’s a great example. My only quibble is that at least in this post you haven’t acknowledged that in the original problem it’s no coincidence that as the number of families grow the answer gets closer to the wrong Google answer of 1/2. Standard asymptotic theory (continuous mapping theorem, Slutsky’s theorem, etc) would indicate that indeed the ratio converges in probability to the ratio of the expectations.

    Here’s an interesting question related to the new problem: as the number of families increase, does B/G converge in probability to 1 even though the expectation of this ratio does not exist?

  4. 4 4 Bennett Haselton

    I second Jeff that I think the correct average should be “undefined” and not “infinite”.

    The ratio of a positive number to zero, is not necessarily positive infinity. The ratio of five to zero is also the ratio of five to negative zero, which by the same logic would be negative infinity. Since you can’t arbitrate whether it’s positive or negative, I would call it undefined.

  5. 5 5 Ben

    *NOW* I understand…

  6. 6 6 Dave B

    Bennett: Mathematically there is no such thing as negative zero. There is just zero. Computer programming languages may have the concept when dealing with floating point numbers but that is primarily for handling underflow.

  7. 7 7 Dave B

    Also, even if you accept that the answer is undefined the point stil stands. Any reasoning that gets an answer of 1 where the correct answer is that there is no well-defined answer has to be faulty reasoning.

  8. 8 8 Harold

    This perhaps makes clearer a distinction between “in expectation” in a mathematical context, and “what would you expect” in a colloquial context.

    If the ratio of boys to girls is infinity, what is the ratio of girls to boys?

  9. 9 9 Steve Landsburg

    Jeff Semel:

    P.S. On reflection, perhaps it’s because my bet depends on the median expected ratio rather than the mean expected ratio.

    Yes, exactly, except that “median expected” is not exactly the right phrase, since “expected” means the mean.

  10. 10 10 Steve Landsburg

    Harold:

    If the ratio of boys to girls is infinity, what is the ratio of girls to boys?

    The expected ratio of girls to boys depends very much on whether you take your census before or after all the families have finished reproducing. If you take it before they’re all finished, there might be no boys, so G/B might be infinite and the expectation is infinite. If you take it after they’ve all finished reproducing, my quick calculation says that E(G/B) is in fact 1, though it takes a bit of work to prove that (i.e. this is a case where the “standard” reasoning happens to get it right, but that does not justify the standard reasoning).

  11. 11 11 Kevin

    I am afraid that there is no infinite term in the summation for expected value in this case. The definition of expected value is the summation of X*probability(x).

    Let us define as as (B,G) ie. (boys, girls)
    probability(x) is(1/2)^n where n = boys + girls
    Thus our summation ends up looking like

    (1,0)*1/2=(.5,0)
    (1,1)*1/4=(.25,.25)
    (1,2)*1/8=(.125,.25)
    etc.
    down to your suggested infinite case…

    (1,limit as g approaches inf)*1/((1+limit as g approaches inf)) = 0 since (1/2)^n approaches zero faster than the number of offspring approaches infinity.

  12. 12 12 Steve Landsburg

    Kevin: Think about what you’re saying. Suppose there are 10 families. You are claiming that there is zero chance they will all have boys on their first try. Do you really believe that?

  13. 13 13 polyglot

    …the answer is infinity.’
    Yes, but that remains the case if you drop the have son and stop rule.

  14. 14 14 Thomas Bayes

    If someone asked me what I ‘expected’ the ratio of boys to girls to be, and I didn’t think they meant ‘expected value’ in the mathematical sense, then I would say “close to one, but more likely to be larger than one than smaller than one.” If they followed up by asking if I thought it was more likely to see more boys than girls, rather than more girls than boys, I would say “yes”.

  15. 15 15 Harold

    Ratio of girls to boys: “If you take it after they’ve all finished reproducing, my quick calculation says that E(G/B) is in fact 1” I will have to think about this to see why the “extra 1/2 boy” does not make it approach 1.

  16. 16 16 Sonic Charmer

    I assume the parents/’the adult generation’ are being excluded somehow..? (Otherwise, it would be implicit in the problem statement that there are at least some females)

    But note that this brain teaser doesn’t even need a stopping rule. Just say ‘There is a country.’ Surely it’s possible with nonzero probability that all children of whatever-generation are boys, so E(B/G) is infinite/undefined. By the same token, so is E(G/B).

  17. 17 17 Steve Landsburg

    Polyglot and Sonic Charmer: Absolutely; the stopping rule is a complete red herring in this problem.

    —with the one caveal that if we wait till all families are completed, then the stopping rule does imply that E(G/B)=1 exactly, which surprises me a little.

  18. 18 18 Steve Landsburg

    Ben:

    *NOW* I understand…

    Thanks for this. It makes it all worthwhile.

  19. 19 19 Andy Wood

    The ratio of a positive number to zero, is not necessarily positive infinity. The ratio of five to zero is also the ratio of five to negative zero, which by the same logic would be negative infinity. Since you can’t arbitrate whether it’s positive or negative, I would call it undefined.

    No. Read this, for example.

    +Infinity = -Infinity, just like +0 = -0.
    In fact Infinity*(any non-zero complex number) = Infinity, just like 0*(any finite complex number) = 0.

    Oddly, Infinity + Infinity != 2*Infinity, but is instead undefined.

  20. 20 20 Thomas Bayes

    Harold and Steve:

    Here is how I think about E(G/B) . . .

    First, I use the method of iterated expectations:

    E(G/B) = E(E(G/B|B)) = E(E(G|B)/B),

    so the first step is figuring out the value for E(G|B).

    The number of girls born at the time that the Bth boy is born is a negative-binomial random variable with mean equal to B. So if B is equal to the number of families, then E(G|B) = B, and E(G/B) = 1.

    But if B is not equal to the number of families, then one of two things can happen: (i) that last child born at the time we count can be a boy; or (ii) the last child born at the time we count can be a girl. The probability that either of these happens 1/2. If (i) is true, then E(G|B) = B. If (ii) is true, then, I believe the expected number of additional girls is 1 so that E(G|B) = B + 1. Summing these together weighted by their respective probabilities gives E(G|B) = B + 1/2.

    In summary,

    E(G|B) = B + 1/2, if B is not the number of families

    E(G|B) = B, if B is the number of families

    (The ‘extra half boy’ once again shows up at the end.)

    So,

    E(G/B) = 1 + E(1/2B)*(1-Pr[B=number of families])

    Of course we are going to have a problem when we compute E(1/2B) unless we add a condition that B>1. That is, we could ask for E(G/B) given that at least one boy has been born.

  21. 21 21 Steve Landsburg

    Thomas Bayes:

    I had a more complicated way of seeing that E(G/B)=1 when all families are completed. (I haven’t posted this yet.) Your way is probably more enlightening. Thanks.

  22. 22 22 Harold

    What happens if we include the parents? The ratio of this generation is 1, and this prevents the pesky divide by zero. Do we get 1 again?

  23. 23 23 MAK

    “That’s because there’s always some (possibly tiny) chance that zero girls have been born, making the ratio infinite. The expected ratio is an average over all possible outcomes. When one of the things you’re averaging over is infinite, then the average is infinite.”

    There’s also some (possibly tiny) chance that infinite (or approaching infinite) number of girls have been born. That is, zero boys have been born. So you’re dividing infinite with infinite. That’s not infinite.

  24. 24 24 Steve Landsburg

    MAK: There is in fact no chance at all that in a finite country, an infinite number of girls have been born.

  25. 25 25 Ron

    Harold: Including the parents only mostly eliminates the
    divide by zero problem. There’s an amazingly tiny, but non-zero,
    chance that some disease has wiped out all of the mothers.

    This is aside from the statement of the problem that calls for the
    ratio of boys to girls. Mothers are generally classed as female,
    but not normally as girls.

  26. 26 26 Roger Schlafly

    Steve, do any of these countries ever ask your expert opinion on what to expect from their economic policies? If so, are they disturbed when you tell them that you can mathematically prove that there is an expectation of infinite chaos and destruction?

  27. 27 27 Mike H

    Is the stopping rule really a red herring? Consider the following :

    “N newly-wed couples settle in a certain country. Each couple starts having children, and stops when
    * they have at least one girl, AND
    * they have more boys than girls.
    Amongst their children, what is the expected ratio of boys to girls?”

    Clearly*, the actual ratio exists with probability 1, and is greater than 1. How, then, can the expected value equal 1?

    Footnotes :
    * ok, maybe not that clear, but still true.

  28. 28 28 Gil N

    I will put up $$$ betting that a computer simulation running for as many cycles as steve wants for this problem will give an averaged answer closer to 1 than infinity.

    that’s kinda the parameters of the bet steve was proposing wasn’t it?(this is if anything, more generous)

    i think this better illustrates why problems that require the use infinity should not be taken so seriously.

  29. 29 29 Ron

    This problem makes me think some more about the Google problem. The
    one where each couple keeps having children until they have a boy;
    then they stop.

    Wouldn’t the answer to the Google problem also be infinity? Each
    couple may intend to have children until the first boy is
    born. They could all be foiled in this intention by producing only
    girls until they reach the end of their fertile ages. In that case
    the ratio of females to males would be some number over 0, i.e.:
    infinity.

    As in the current problem, the odds of this are really low, but
    they’re non-zero.

  30. 30 30 Harold

    I find it strange that for completed countries the expected ratio of G/G+B is not 1/2, yet the expected ratio G/B is 1. We are talking about the same country here, aren’t we? If G/B = 1, how can G/G+B not= 1/2?

    I thought I had it figure for completed countries, the final “coin toss” was not random, but was selected as B. This gave an extra 1/2 boy, so I thought ratio G/B would be just under 1

  31. 31 31 Thomas Bayes

    Harold,

    For completed countries the number of boys is equal to the number of families, so the number of girls is the only thing that is random (conditioned on the number of families). For the ratio G/B, then, only the numerator is random. For the ratio G/(G+B), both the numerator and denominator are random.

  32. 32 32 Steve Landsburg

    Gil N:

    I will put up $$$ betting that a computer simulation running for as many cycles as steve wants for this problem will give an averaged answer closer to 1 than infinity.

    How much money you got?

    If you are serious, I will absolutely take this bet.

  33. 33 33 Steve Landsburg

    Ron: In the Google problem, you’re computing G/G+B, not G/B. So if everyone has only girls, the ratio is 1, not infinity.

  34. 34 34 Harold

    Thomas Bayes: yes, thanks. I can see the distinction. Still don’t fully understand. I am thinking of each distribution as the mean, which is not correct. I don’t see why two symetrical distributions with the same mean divided one over the other is not 1, elementary statistics, I suppose.

    Gil N: For Steve to win, he needs to run as many cycles as will give him a good chance of getting a single “no girls” result. For example, in a 1 country family, the chances of “no girls” is 50% with 1 cycle. For a 2 family country it is 25% for 1 cycle, but quickly rises with more cycles. For a many family country, the average will be close to 1, then suddenly jump to infinity when the all boys result comes in, and it will stay at infinity with further cycles.

  35. 35 35 Jonathan Campbell

    Why isn’t the calculation of E(G/B) trivial if the reproduction is complete?

    For k families, B=k (not random), so E(G/B)=E(G/k)=E(G)/k=k/k=1

  36. 36 36 Steve Landsburg

    Jonathan Campbell:

    if the reproduction is complete?

    For k families, B=k (not random), so E(G/B)=E(G/k)=E(G)/k=k/k=1

    This looks right to me. I had a much more complicated way of proving this, but this is clearly better.

  37. 37 37 Neil

    What about E(G/G)? Since 0/0 is indeterminate and the probability of 0 girls is 1/2, it seems like you can’t even say that the expected ratio of girls to girls is one.

  38. 38 38 Bob Ayers

    I have three cars in my garage. I think I will choose one randomly and take it out for a spin on my test-track. Car A goes 100 km/hr. Car B goes 50 km/h. Car C goes 0 km/hr (alas I haven’t repaired it yet). What is my expected km/hr? I think it is 50 km/hr. What is my expected hr/km? I think it is “infinity” (Or possibly undefined, depending on how you think about infinity.) Note that E(km/hr) is not equal to 1 / E(hr/km)

  39. 39 39 Thomas Bayes

    Bob,

    Your post reminds me of a related riddle . . .

    Which is likely to save more gas: improving an SUV’s average fuel efficiency from 12mpg to 15mpg; or improving a car’s average fuel efficiency from 30mpg to 40mpg?

    When asked in this context, I suspect the people who read this blog will get this right. But for day-to-day decision making, I don’t think the general public appreciates the fact that the fixed variable for most trips is the number of miles, not the number of gallons.

  40. 40 40 Daniel Hewitt

    Steven,
    IMO the incomplete problem statement itself is the source of ambiquity. The solution you’ve provided is based upon your statement The expected ratio is an average over all possible outcomes. Would one be wrong to say the ratio approaches 1/2 for a large country?

  41. 41 41 Jeff Semel

    Thomas,

    If we reported car mileage as gallons per mile rather than miles per gallon, comparisons of fuel efficiency would become that tiny bit easier.

  42. 42 42 Daniel Hewitt

    the ratio approaches 1 is what I meant to say above….

  43. 43 43 polyglot

    The question was ‘There’s a certain country where everybody wants to have a son. Therefore each couple keeps having children until they have a boy; then they stop. In expectation, what is the ratio of boys to girls?’
    If we introduce an arbitrary rule to exclude the case of zero girl births, what is the expected ratio?
    Let m= age of puberty and q= fertile period. The question states that every girl between the ages of m and m+q will try for a son this year unless she already has one.
    Since boys and girls are equally likely to be born we know that the expected increment in Girls = the expected increment in boys at any time t. We don’t know what the original G/B ratio was. We don’t know if the country has an expanding or diminishing population. We don’t know if the system has a steady state.
    If m=l=1, then the steady state is G/B= 1 and the population halves every period. However, in this context the son rule is as irrelevant as ‘give birth to a hippopotamus and then stop’. Clearly q must be greater than one, to make the problem interesting, but letting it go to infinity turns E(G/B) to infinity which isn’t interesting either.
    The one son rule tells us that the expected addition to the population from any cohort of fertile females will always have more girls than boys for q >1. So the only thing we can say about the E (G/B) ratio is it would be greater than half and tend to rise with higher q though this would be slowed for lower m.

  44. 44 44 polyglot

    Sorry, the above is nonsense. Clearly this puzzle assumes a homogenous population.

  45. 45 45 Steve Landsburg

    Daniel Hewitt:

    Would one be wrong to say the ratio approaches 1/2 for a large country?

    One might be wrong or right depending on what one meant by this, I suppose. What do you mean by it?

  46. 46 46 Vic

    There is a remotely related “trick” question:

    What’s the current thru 10 Ohm resistor if voltage is 10 Volts and both the resistance and voltage have 10% uncertainty (Gaussian variables with sigma/value = 0.1).

    Or “what’s the power of a lightbulb with 10% uncertainty in filament resistance”.

  47. 47 47 Daniel Hewitt

    Steven,
    I meant that if I assumed a 50/50 boy/girl birth ratio and a population that approaches infinity (neither are specified in the problem statement), would a ratio approaching 1 be a valid answer? Yours was kind of a cool solution…do you believe that it is the only valid solution?

  48. 48 48 Thomas Bayes

    For those who are interested in a generalization of one of the underlying issues, here is an important and relevant inequality:

    http://en.wikipedia.org/wiki/Jensen's_inequality

    We can use this to understand that

    E(1/x) >= 1/E(x)

    E(x^2) >= [E(x)]^2

    and on and on and on . . .

  49. 49 49 Tom

    Thomas,

    Thanks for posting that one, that’s nice.

  50. 50 50 Ted

    What does it mean “exclude the parents”? When you compute an expectation you make an infinite sum. In this case that sum reflects large numbers of children – 18 children takes at least 18 years to produce – by the time you get to summing the tail of the expectation the children relating to the first terms have entered the population as potentially reproducing parents – but you are simply ignoring them – which seems completely unreasonable in a large population. Why is it justifiable?

    It seems to me that your math is fine but your model of the population is a. not clearly defined and b. highly problematic. In other words, nowhere have you convincingly explained by computing E(G/(G+B)) answers the original Google question.

    Going back to the original question: suppose a large population following this prefer boys rule – look at the population for six months – during this time period any given family can have at most one child – and the expectation is that half of those children born during that six month time period will be girls. This is true in any six month time period, whatever the initial gender distribution. How can such dynamics result in anything other than 50-50 girls to boys?

  51. 51 51 Steve Landsburg

    Ted: If you don’t exclude the parents, you’ll get a different answer. You still won’t get the naive answer that your “How can such dynamics…” question suggests.

Leave a Reply