Monthly Archive for August, 2026

Outsmarting Google — and More

The most controversial and most widely debated topic ever covered on this blog began with a post called Are you smarter than Google, which spawned a series of followup posts with over 1000 comments (not counting the tripe I deleted), of which many are thoughtful, many are insightful and some are brilliant.

I’d have thought that after sixteen years there was nothing new to be said on this topic. I’d have been wrong. I’ve just received a marvelous email from reader Rui Viana, reproduced in full (with permission) herewith:

This is a follow-up to a sixteen-year-old debate on your blog. The question that started it all was: there is a certain country where everybody wants to have a son. Each couple therefore keeps having children until they have a boy, and then stops. What fraction of the population is female?

You pointed out that the correct answer is not 1/2, because, if I may paraphrase, 1/2 is the ratio of E(G) to E(B + G), whereas the question asks for E(G/(B + G)), which yields a different answer when the country has a finite number of families.

In this article, I analyze this and related questions, and provide two derivations of the expectation above. Here’s a short summary of the bijective proof, which is particularly clean and which I thought your readers would like to see.

The genders are inverted in the article: each family has children until the first girl, and we are interested in Pk: the expected proportion of boys as a function of the number of families k.

Here is the bijection. Concatenate the birth histories of all the families into a single string, and mark one of the children randomly. For example, an outcome with three families might look like this:

BBG | BG | BBBG

where the underlined boy is the marked child. From the string, we can identify each family history by splitting it after each girl. The probability that the marked child is a boy is exactly Pk. If it is a boy, change it into a girl:

BBG | BG | BG | BG

There is now one extra girl and thus one extra family. This new string is a valid birth history for k + 1 families with a marked girl, subject to one additional condition: the marked girl must lie in one of the first k families. This operation is easily reversible: simply change such a marked girl back into a boy.

Because boys and girls are equally likely, changing one boy into one girl does not change the probability of the birth sequence. It also does not change the total number of children, so it does not change the probability with which that child is marked.

The probability that the marked child is a girl in the k + 1-family string is 1 − Pk+1, and each of the k + 1 girls is equally likely to have been marked. Hence the probability that she belongs to one of the first k families is k/(k + 1). This argument gives the following recurrence:


Pk
=

k
k + 1

(1 − Pk+1)

Applying the same identity to Pk+1, then to Pk+2, and so on, gives


Pk
=
kk + 1

kk + 2
+
kk + 3

kk + 4
+ ··· .

For one family, this converges to 1 − log 2 ≈ 0.307. As you observed all those years ago, for every finite k, Pk remains below 1/2 even though it approaches it from below as k goes to infinity (the limit calculation is left as an exercise to the reader).

Click here to comment or read others’ comments.

Share