The following brain-teaser has been going around, identified as a question from a Google interview (though there’s some controversy about whether Google actually uses questions like this.)

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. What fraction of the population is female?

Steve Landsburg posted a version of this question on his blog. “The answer they expect,” he writes, “is simple, definitive, and wrong… Are you smarter than the folks at Google? What’s the answer?”

Things quickly went blooey. Google’s purported answer — fiercely argued for by lots of Landsburg’s readers — is 1/2. Landsburg said the right answer was less. A huge comment thread and many follow-up posts ensued. Lubos Motl took time out from his busy schedule of yelling at mathematicians about string theory to yell at Landsburg about probability theory. Landsburg offered to bet Motl, or anybody else, $15,000 that a computer simulation would demonstrate the correctness of his answer.

What’s going on here? How could a simple probability question have stirred up such a ruckus?

Here’s Landsburg’s explanation of the question:

What fraction of the population should we

expectto be female? That is, in a large number of similar countries, what would be the average proportion of females?

If G is the number of girls, and B the number of boys, Landsburg is asking for the expected value E(G/(G+B)). And let’s get one thing straight: Landsburg is absolutely right about this expected value. For any finite number of families, it is strictly less than 1/2. (See the related Math Overflow thread for a good explanation.) Landsburg has very patiently knocked down the many wrong arguments to the contrary in his comments section. Anybody who bets against him, on his terms, is going to lose.

Nonetheless, I’m about to explain why Landsburg is wrong.

You see, Google’s version of the question doesn’t specify anything about expectation. They might just as well have meant: “What is the proportion of the expected number of females in the expected population?” Which is to say, “What is E(G)/E(G) + E(B)”? And the answer to *that* question is 1/2. Just to emphasize the subtlety involved here:

On average, the number of boys and the number of girls are the same. Furthermore, the proportion of girls is, on average, less than 1/2.

Weird, right? E(G)/E(G) + E(B) isn’t what Landsburg was asking for — but, if Google’s answer was 1/2, it’s presumably the question they had in mind. To accuse them of getting their own question “wrong” is a bit rich.

But let me go all in — I actually think Landsburg’s interpretation of the question is not only different from Google’s, but in some ways inferior! Because averaging ratios with widely ranging denominators is kind of a weird thing to do. You can certainly compute the average population density of all the U.S. states — but *should you?* What meaning or use would the result have?

I had a really pungent example ready to deploy, which illustrates the perils of averaging ratios and explains why Landsburg’s version of the question was a little weird. Then I went to the Joint Meetings before getting around to writing this post. And when I got back, I discovered that Landsburg had posted the same example on his own blog — *in support* of his point of view! Awesome. Here it is:

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?

The answer to this question is, of course, infinity; in a finite population there *might* be no girls, so B/G is infinite with some positive probability, so E(B/G) is infinite as well.

But the correctness of that answer surely tells us this is a terrible question! Averaging is a terribly cruel thing to do to a bunch of ratios. One zero denominator and you’ve wiped out your entire dataset.

What if Landsburg had phrased his new question along the lines of Google’s original puzzle?

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. What is the ratio of boys to girls in this country?

Honest question: does Landsburg truly think that infinity is the only “right answer” to this question? Does he think infinity is a *good* answer? Would he hire a person who gave that answer? Would you?

Very well done. Thanks!

Dear Jordan,

I think I came to a similar conclusion to you (you can see my answer on MO).

I think one issue is that it’s not a very “stable” situation. If each male has at least one male son, the number of males is effectively bounded. Thus, as the society continues, there is a very real chance that the number of males will go to zero, and (in another generation) the entire population will die out. So, in talking about such a society and in asking such a question, one also needs to stipulate _for_how_long_ the “one son and out” rule has been in place. If the number of years is long enough, the average will not even be defined.

This reminds me of when we were hanging out (with Spencer Bloch, Renee Schoof, Bas Edixhoven and others) in a bar on Texel island. We were discussing the Monty Hall problem and we couldn’t convince Bloch of the correct answer. (Of course I have no idea anymore what the correct answer is.) To resolve the issue we just started playing the game, and after about 6/7 rounds Bloch caved! So my suggestion is to turn this question into a drinking game… maybe something like a coin toss where you keep putting shots of whiskey into your beer as long as you hit tails?

As a physicist, I would be worried to take the ratio of two expectation values, as you effectively divide a number pertaining from one realization by numbers from other realizations. I would only do that if the fluctuations would be *small*.

Dear Jordan,

An anonymous poster, known (at least to me) only as T, made various remarks on the MO thread which I agree with. For one thing, thinking in terms of families is strange — they may not be complete, and they will certainly not complete in uniform time. (This is somewhat analogous to your remark that averaging over states is a strange thing to do, but in the case of families, they are not even temporally stable units, so it is even worse.)

I haven’t thought through carefully whether a population with such a tradition could actually remain stable over time, but if it can, then I am convinced by the following argument (pointed out by T, and also by Vipul Naik): imagine that you are taking a real-time cencus of all births in this country. As you hear of various births, clearly 1/2 will be boys and 1/2 will be girls. And that tells you how the population will be distributed in the country: 1/2 boys and 1/2 girls.

I don’t really understand the point of view that rejects this analysis. Of course if you look at a model “country” with four families (all statically reproducing, with no interaction, no new famlies being created, and so on) and consider what happens over some number of possible births, the ratio of boys to girls, thought of a quantity which varies over the families, will be skewed, but these models don’t (to me) seem to emulate anything resembling a country (e.g. if all the families happen to have boys as their first children, then there are no girls born, the population dies out, and there is no steady state distribution of boys and girls that one can consider at all) and (again as you point out too) looking at this ratio as varying over families

(rather looking at the ratio in the entire population) also doesn’t seem that meaningful to me either

Regards,

Matt.

The point of view that rejects this analysis is the one that demands, before all else, a clean mathematical formulation of the problem. I read the Math Overflow debate, and it seems that Landsburg et al. are describing a precise and correct resolution of a model which is not directly relevant to the one of the problem. The problem as I see it is that the variables B and G used in that discussion have a clear definition, which is not in any way clearly related to the problem. The difference between computing the expected proportion of girls in a static, small number of families, and in computing the expected proportion of girls given a large population of dynamically interacting families, seems essential. The latter seems difficult to model. One reaction to this difficulty is to replace the model with one amenable to analysis; unfortunately here this leads to a result which contradicts common sense (which is different than being non-inuitive). What one needs to do is something like what one does in statistical physics – in a realistic dynamical model, pass to a large N limit discarding lower order information. I’m fairly sure that if one does this, there results exactly what you propose.

The whole thing can be looked at as follows. Suppose a large population subject to the given rule. Look in some small time increment, like 6 months, in which any given family can have at most one child (ignore twins). Some families will have a child during that time interval. One expects that half the children born in this time interval will be girls, whatever the population looked like, and whatever the profile of the families that have a child in the given interval. That’s true for any six month time period. At least in the short run that seems to imply that the proportion of girls will be 50-50. Maybe in the long run that won’t be true, if there is some non-trivial probability of the population dying out, but then it would be relevant to discuss what “long run” means.

Jordan, I think your comments about Lubos Motl were mean and uncalled for. Someone should get Terry Tao interested in this problem, he’s the only person whose answer I’d really trust.

[…] often disagreed with Steve Landsburg, sometimes on this blog and sometimes in Slate. So it seems worth mentioning that I’m totally on board with his […]