98
$\begingroup$

Hi all!

Google published recently questions that are asked to candidates on interviews. One of them caused very very hot debates in our company and we're unsure where the truth is. The question is:

In a country in which people only want boys every family continues to have children until they have a boy. If they have a girl, they have another child. If they have a boy, they stop. What is the proportion of boys to girls in the country?

Despite that the official answer is 50/50 I feel that something wrong with it. Starting to solve the problem for myself I got that part of girls can be calculated with following series:

$$\sum_{n=1}^{\infty}\frac{1}{2^n}\left (1-\frac{1}{n+1}\right )$$

This leads to an answer: there will be ~61% of girls.

The official solution is:

This one caused quite the debate, but we figured it out following these steps:

  • Imagine you have 10 couples who have 10 babies. 5 will be girls. 5 will be boys. (Total babies made: 10, with 5 boys and 5 girls)
  • The 5 couples who had girls will have 5 babies. Half (2.5) will be girls. Half (2.5) will be boys. Add 2.5 boys to the 5 already born and 2.5 girls to the 5 already born. (Total babies made: 15, with 7.5 boys and 7.5 girls.)
  • The 2.5 couples that had girls will have 2.5 babies. Half (1.25) will be boys and half (1.25) will be girls. Add 1.25 boys to the 7.5 boys already born and 1.25 girls to the 7.5 already born. (Total babies: 17.5 with 8.75 boys and 8.75 girls).
  • And so on, maintianing a 50/50 population.

Where the truth is?

$\endgroup$
13
  • 7
    $\begingroup$ As is almost always the case with these sorts of things it's not that "the usual explanation is wrong" or anything, it's simply that the question is ambiguously stated. $\endgroup$ Commented Mar 12, 2010 at 11:10
  • 42
    $\begingroup$ The answer to the question "what is the proportion...?" is "it's whatever the proportion is". The question should perhaps say something like "what is the average proportion" and this is ambiguous already. Imagine for example there were just 1 boy-girl family, and they produced offspring until they got a boy and then stopped. Then the proportion #boys/#girls is 2/1 with probability 1/2, 2/2 with probability 1/4, 2/3 with probability 1/8,... , meaning the "average proportion" is something like 1.386... . Now people will say "well that's not what the question meant" and that's exactly my point. $\endgroup$ Commented Mar 12, 2010 at 11:40
  • 9
    $\begingroup$ @tom: if you look at the question here, clearly the sum I've done is what the questioner does more formally above. The issue is how one works out an "average proportion"---is it "average # boys" / "average # girls" or is it "average of #boys/#girls". These are visibly going to be different. There may be other ambiguities too. It's always the same with these sorts of questions. I'm tempted to vote to close as not a real question. $\endgroup$ Commented Mar 12, 2010 at 11:47
  • 6
    $\begingroup$ @Kevin: Based on the answers and questions people have had about this question, it seems that it is still interesting. I am not voting to close and I don't think others should either. I think that sometimes an acceptable answer to a mathematical question is that the question is actually ill posed. When that happens and it is not obvious, it is interesting. Clearly this question is confusing, and it is a subtle point that the question is ambiguous. If I had asked the question and you had posted your replies to Tom as an answer, I would have accepted it. $\endgroup$ Commented Mar 12, 2010 at 14:02
  • 5
    $\begingroup$ @Chris: The question is "interesting" in the same way that the Monty Hall problem is "interesting", and the question is generating a lot of noise, just as Monty Hall always does. @Douglas: I will happily accept that you are highlighting a different issue with the question. $\endgroup$ Commented Mar 12, 2010 at 14:23

17 Answers 17

167
$\begingroup$

The proportion of girls in one family is a biased estimator of the proportion of girls in a population consisting of many families because you are underweighting the families with a large number of children.

If there were just 1 family, then your formula would be wrong, but the average of the percentage of girls you would observe would be

$$\sum_{n=0}^\infty \frac{1}{2^{n+1}} \bigg(\frac{n}{n+1}\bigg) = 1-\log2 = 30.69\%.$$

Half of the time, you would observe $0\%$ girls.

If you have multiple families, the average of the observed percentage of girls in the population will increase.

For 2 families, the average percentage of girls would be

$$\sum_{n=0}^\infty \frac{n+1}{2^{n+2}} \bigg(\frac{n}{n+2}\bigg) = \log 4 - 1 = 38.63\%.$$

More generally, the average percentage for $k$ families is

$$\sum_{n=0}^\infty \frac{n+k-1 \choose k-1}{2^{n+k}} \bigg(\frac{n}{n+k}\bigg) = \frac{k}{2}\bigg(\psi\left(\frac{k+2}2\right)-\psi\left(\frac{k+1}2\right)\bigg)$$

where $\psi$ is the digamma function which satisfies

$$ \psi(m) = -\gamma + \sum_{i=1}^{m-1} \frac1i = -\gamma + H_{m-1}$$ $$ \psi\left(m+\frac12\right) = -\gamma -2\log 2 + \sum_{i=1}^m \frac{2}{2i-1}.$$

With a little work, one can verify that this goes to $1/2$ as $k\to \infty$. So, for a large population such as a country, the official answer of $1/2$ is approximately correct, although the explanation is misleading. In particular, for $10$ couples, the expected percentage of girls is $10 \log 2 - 1627/252 = 47.51\%$ contrary to what the official answer suggests. With $k$ families, the expected proportion is about $1/2 - 1/(4k)$.

It is not enough to argue that the expected number of boys equals the expected number of girls, since we want $E[G/(G+B)] \ne E[G]/E[G+B].$ Expectation is linear, but not multiplicative for dependent variables, and $G$ and $G+B$ are not independent even though $G$ and $B$ are.

$\endgroup$
50
  • 34
    $\begingroup$ This is really nice! I voted to close because this is an old chestnut, but you have found new life in it. $\endgroup$ Commented Mar 12, 2010 at 14:10
  • 21
    $\begingroup$ You've changed the question by assuming that the population (i.e., the set of births whose G/(G+B) we are interested in) is a union of families that have stopped reproducing. All we know is that in $k$ families, some number $n$ of births have occurred through time $t$, each birth equivalent to a fair coin toss. This of course implies a symmetrical distribution of $(G,B)$ and consequently an expected value of exactly 1/2 for $G/(G+B)$ --- independent of $n, k$ and $t$. The difference in answers between the original problem and the completed-families problem is the "bias" you calculated. $\endgroup$
    – T..
    Commented Jul 9, 2010 at 0:28
  • 11
    $\begingroup$ @T, you are right that the bias depends on the formalization of the problem, but not that its existence depends on this particular one. If you assume that some families have not stopped reproducing, there is still a bias. If the size of the population is not constant, and larger populations tend to have more girls, then girls tend to be underweighted when you compute G/(G+B), and the expected value of G/(G+B) is under 1/2. I do not see a reasonable way to interpret the problem so that the population size is fixed or does not depend on the sexes of the children, but feel free to point one out. $\endgroup$ Commented Jul 10, 2010 at 3:53
  • 15
    $\begingroup$ @Steve Landsburg: There were some very interesting and thoughtful comments on your post. However, since each argument continues until the participants finally agree, I expected that the fraction of thoughtful comments would be just over half. Sadly this seemed not to be the case... $\endgroup$
    – Tom Church
    Commented Jan 5, 2011 at 4:26
  • 10
    $\begingroup$ I want to make clear that the upvote for Rhett Butler's comment "You have found a roulette winning strategy..." is mine and was cast in error when I was trying to flag this comment as spam. $\endgroup$ Commented May 17, 2013 at 21:51
37
$\begingroup$

There is a closely related puzzle about cards. I was told it by Vin de Silva, who said he was told it by Imre Leader, but I have no idea what the original source is.

An ordinary deck of cards, face down, is placed in front of you in a stack. A dealer turns the top card of the stack face up and puts it on a separate pile, and does this repeatedly until you say "now". At that point he turns over the next card and stops. You can say "now" at any time from the very beginning (before the first card is turned over) until almost the very end (just before the last card is turned over). You win if the last card turned over --- the one turned over just after you say "now" --- is red. What is the winning strategy?

You can get yourself into all sorts of convolutions trying to solve this. For example, you might think that it's good to wait until lots of the cards revealed so far are black, because then the probability that the next card will be red is relatively high.

But the solution is that it makes no difference at all what you do. Your probability of winning is always 0.5. To see this easily, imagine that after you say "now", the dealer turns over not the top card of the stack, but the bottom one. Clearly this game is equivalent to the original one, and clearly your probability of winning is 0.5 no matter what you do.

I'd like to take this easy solution and translate it into an equally compelling solution to the boy/girl puzzle, but right now I can't see how.

$\endgroup$
8
  • $\begingroup$ It's funny that you mention that. I just discussed that puzzle in the StoxPoker.com forums (private), and was thinking of posting here to ask for the source. I learned of it on the TwoPlusTwo.com poker forums. $\endgroup$ Commented Mar 12, 2010 at 13:57
  • 3
    $\begingroup$ For the history of this problem, you could try asking Peter Winkler (at Dartmouth), who calls the bottom card of the deck the "Predestination Card." $\endgroup$ Commented Apr 5, 2010 at 17:58
  • 3
    $\begingroup$ It is not so clear to me why the answer is 0.5. So I understand that the dealer could have pulled out any card form the remaining deck and the game is equivalent. However, if a lot of black cards had been pulled already from the deck, then the number of black cards remaining in the deck would be low so it would be sensible to say any card pulled from the deck would have a high probability of being red. $\endgroup$ Commented Dec 13, 2015 at 4:22
  • 3
    $\begingroup$ @Sandeep: I think you are biased toward the favourable scenario where you've just seen X (say 5) black cards in a row and are thinking you should yell 'now'. You are dicounting the equallly probable scenario where you start by seeing X red cards in a row which is equally likely. For every favourable scenario there is an equally unfavourable one to counter-balance the average. So when you start playing, you might as well take your 50-50 chances and yell 'now'. $\endgroup$
    – Alexandros
    Commented Dec 2, 2016 at 1:10
  • 1
    $\begingroup$ @SandeepSilwal My first thought was the same as yours. I even considered the extreme scenario where the first 26 cards all happened to be black, so there are no more black cards in the deck. Surely now the probability of winning is 100%? Actually, the key is to realize that you could have stopped at any point before this. At the point where there was still 1 black card left in the deck, you chose to play on instead of saying "now". So that's the point where you took a decision which had a 50/50 success chance. When you see the last black card, you simply know that you have won. $\endgroup$
    – hb20007
    Commented Sep 1, 2020 at 13:23
23
$\begingroup$

For those who still don't get it, it might help to consider this ultrasimplified example:

A certain family has a 3/4 chance of having 1 girl and a 1/4 chance of having 3 boys.

What is the expected number of girls in this family? 3/4. What is the expected number of boys? 3/4. What is the expected difference between the number of girls and the number of boys? Zero.

But what is the expected fraction of girl-births? There's a 3/4 chance that it's 100%, and a 1/4 chance that it's 0%. Therefore the expected fraction is 75%. Which, notably, is not 50%.

Moral: Just because the expected difference is zero, you can't conclude that the expected ratio is one.

(There is of course nothing new here beyond what Douglas Zare has already made crystal clear, but I'm thinking the starkness of the example might help.)

$\endgroup$
4
  • 6
    $\begingroup$ Ratios versus differences doesn't address the main point, which is whether the family reproduction rule can break boy/girl symmetry in the underlying distribution of $(B,G)$. [It does gender-asymmetrize the allocation of boys and girls into sets called "families", but this extra structure does not play a role in the calculation requested by Google.] If the distribution is symmetrical then the proportion of girls will have expected value 1/2, because the random variables "proportion of girls" and "proportion of boys" will have the same probability distribution, and their sum is equal to 1. $\endgroup$
    – T..
    Commented Jan 4, 2011 at 5:40
  • 2
    $\begingroup$ You ask: "But what is the expected fraction of girl-births?" Why should this number interest anyone who cares whether familiy planning can influence the population equilibrium? or "what fraction of the population is female?". Even if it is made crystal clear that average of fractions is not equal to the fraction of average, this does not entitle anybody to chose the wrong number. $\endgroup$
    – user112109
    Commented May 13, 2013 at 20:02
  • 4
    $\begingroup$ Rhett Butler: The question asks about the ratio of boys to girls, not about the ratio of expected boys to expected girls. You ask why the ratio should interest anyone. I suggest you address that query to the person who posed the question, not the people who answered it. PS. Since it's been well established elsewhere that you're not the least bit interested in the question that was posed, or any of the interesting subsidiary questions that it raises, but only in blustering and hurling insults, I won't be responding to any followups. $\endgroup$ Commented May 13, 2013 at 20:19
  • 1
    $\begingroup$ The question asks about the ratio of boys and girls and not about the mean value of averages in families. My own treatment and my recognition of this fact should show anybody that I am very interested in this question. I attribute your insulting manner to the fact that you recognize to have lost against Lubos Motl (who, as a Harvard string theorist, is certainly not less than you able to understand the simple error made by Douglas and accepted by you). $\endgroup$
    – user112109
    Commented May 13, 2013 at 20:47
21
$\begingroup$

Let $X$ be the number of daughters of a certain couple. The probability that the first son of this couple is the $n$-th kid is $\frac{1}{2^{n}}$ and so $\mathbb E (X)=\sum_{n=0}^{\infty}\frac{n}{2^{n+1}}=1$. On the other hand the couple will have exactly one son so the expected proportion is 50-50.

$\endgroup$
8
  • 5
    $\begingroup$ E[A/(A+B)] is not E(A)/(E(A+B)). Showing that E(A)/E(A+B) = 1/2 is not enough. You need another assumption. $\endgroup$ Commented Mar 12, 2010 at 9:42
  • 3
    $\begingroup$ I was finding E(A/B), since B=1 this reduces to E(A). $\endgroup$ Commented Mar 12, 2010 at 9:49
  • 6
    $\begingroup$ aha! So there are really two questions here: expected proportion of girls to total population and expected proportion of boys to girls. Tricky! $\endgroup$
    – zeb
    Commented Mar 12, 2010 at 9:56
  • 4
    $\begingroup$ I guess there is some ambiguity about what number is meant by a proportion A:B. I read it as A/(A+B), which has the nice property that B:A is the complement so that computing E[A:B] is essentially the same as E[B:A]. If you interpret the proportion A:B as A/B, then this may be infinite, and E[A:B] can be 1 while E[B:A] is not 1, and may not exist. This calculation shows E[A/B]=1, but it does not compute E[B/A]. $\endgroup$ Commented Mar 12, 2010 at 11:07
  • 3
    $\begingroup$ Of course I agree, both in the ambiguity of the question and in your argument, which is why I gave you a +1. Your answer is more complete, and I took the lazy man's approach :-) $\endgroup$ Commented Mar 12, 2010 at 11:21
18
$\begingroup$

I think this is already implicit in the heavily up-voted answer, but it may be worth clarifying: there are two kinds of expectations that we can talk about.

The first is the distribution of G/B, G/(G + B), B/G, B/(B + G), values for the entire population (along with its expected value, standard deviation, etc.). Here, the distribution is over all possible "runs of history", so to speak, in the sense that we average over all possible ways history could turn out. If the population is large enough (thousands? millions?), then the expected values of all these quantities are what you would expect from a 50:50 split, and the standard deviations are near zero. Thus, as far as demographic estimations of the overall population are concerned, 50:50 is the way to go. In fact, at the population level, the ratio of girls to boys cannot be influenced by stopping strategies; any influence must either (i) affect the relative probability of conception of male versus female fetus (ii) adopt a post-conception filtering mechanism, such as induced abortion or infanticide).

The second is the expected G/B, G/(G + B), B/G, B/(B + G), etc., values over families. More generally, we may be interested in the distribution of different (G,B) values for different families. If we are interested in understanding family dynamics more thoroughly, we may also be interested in the birth orders, i.e., in what order girls and boys arise. Here, family stopping strategies could affect the distribution of (G,B) values and also of the birth orders. In particular, the strategy here ("stop as soon as you have a boy") gives 50% of the families with a single boy, 25% with one (older) girl and one (younger) boy, 12.5% with two older girls and one younger boy, and so on (assuming the complication of twins and triplets does not arise). This could have important demographic implications in the long term, when mating is done for the next generation (since birth order and the age gaps between children and their parents all play a role in mating and the creation of chlidren). However, that is getting beyond the current question.

For this second sense, it is not just the expected value per family that matters, but rather, the specific distribution of families. As already pointed out, since the variables are not independent, E[G/B] is not the same thing as E[G]/E[B], so what variable we choose to average over affects what answer we get. Looking at the whole distribution conveys more information.

When demographers are making short-term population estimates, it is the first sense (expected values for the population over runs of history) that is relevant, so stopping strategies can be discounted unless they are accompanied by post-conception selective strategies or strategies that affect conception probabilities. A deeper understanding of society would require knowing things in both the first and the second sense.

$\endgroup$
13
$\begingroup$

Another way to look at the "official" solution is to notice that for statistical purposes it does not matter which couple gets the next child. You "request" children from the couples in whatever manner you want, you always get a 1:1 expected ratio in boys and girls, regardless of the pattern in which you choose the next couple to produce another child.

$\endgroup$
2
  • 6
    $\begingroup$ Suppose you make a financial instrument which pays the proportion heads/(heads+tails) for a sequence of fair coin flips whose stopping point I control, with at most 20 flips. I'll pay 0.6 for this. Deal? The expected payoff for my stopping rule will not be 1/2. $\endgroup$ Commented Mar 12, 2010 at 14:27
  • 2
    $\begingroup$ @Douglas: You answered the false question. The ratio B/G of boys to girls in a population is (nearly) 1. And by a birth that has same probabilities b = 0.5, g = 0.5, b/g = 1, it is impossible to change this ratio. It has been asked whether the ratio B/G can be subject to manipulations. It can not. And as Thorny says and as I also few minutes ago found myself: It is completely irrelevant which couple decides to cease fire and which will continue. Therefore the independent variables will remain equal within the statistical margin. $\endgroup$
    – user112109
    Commented May 12, 2013 at 16:42
8
$\begingroup$

It doesn't make much sense to compute the expected proportion of girls per family. Take two families, one with just a single boy, and another with eight girls and a boy. The average number of girls (resp. boys) per family is four (resp. one); and indeed, four times as many girls as boys were born. But the average proportion, which is what you are calculating, is (0 + 8/9) / 2 = 4/9, which is less than 1/2! So although your calculation may be correct, the answer doesn't really mean very much.

$\endgroup$
8
$\begingroup$

When I posted this problem on my blog, one commenter (who prefers to remain anonymous but gave me permission to repost here) noted a cool way to estimate the expected value of $B/(B+G)$.

Write $f(G)=B/(B+G)$ and expand in a Taylor series around $B$:

$$f(G)=f(B)+f'(B)(G-B)+(1/2)f''(B)(G-B)^2+...$$

Now take expected values: We have $E(G-B)=0$ and $E(G-B)^2=2B$, so

$$E[f(G)]=f(B)+(1/2)f''(B)(2B)+...$$ $$=(1/2)+1/(4B)+...$$

Now the number of boys is equal to the number of families, so for $k$ families, the proportion of boys is well estimated by

$$(1/2)+(1/4k)$$

and of course it's easy to get better estimates by going to higher terms in the Taylor series.

My commenter also adds the following (in my opinion, quite insightful) remarks:

Independence (or, more precisely, correlation) isn’t the only issue. Even for independent variables, the expected value of a ratio is not equal to the ratio of the expected values. (The expected value of a product of uncorrelated variables is the product of the expected values, though.) This is one of the most important keys to understanding this problem, I believe. And this is why I suggested the Taylor series to expand the ratio about its mean. I also think it is a little easier to find the expected proportion of boys because the random part (G) only appears in the denominator. Also, B is equal to the number of mothers, so I don’t believe B and G are independent because I don’t believe the number of girls is independent of the number of mothers.
$\endgroup$
23
  • 3
    $\begingroup$ Steven, that is incorrect. The issue is whether the proportion of boys, denoted $f(B,G)$ above, is convex as a function of two variables so that $E[f(B,G)] > f(E[B],E[G]) = 1/2$. It isn't convex, as simple calculations demonstrate. (See the comments on convexity and Jensen's inequality under Douglas Zare's posting). It is convex if you condition on B (i.e., restrict f to lines B=constant), and concave if you condition on G. Such conditioning is foreign to the Google problem and imposed artificially in Doug's model. $\endgroup$
    – T..
    Commented Jan 4, 2011 at 6:05
  • 7
    $\begingroup$ I'm not assuming any specific model, but pointing out that differences between your answer and 1/2 arise from artificial (i.e., gender-asymmetric) conditioning of the problem. Assuming $k$ families as in Zare's model or your present suggestion, is equivalent to assuming "at most $k$ boys in population", or exactly $k$ boys if it is also assumed the families complete their reproduction. No such asymmetric conditioning was part of the Google problem. Your calculations show that a symmetrical distribution can be approximated by asymmetric ones, not that the Google problem is asymmetric. $\endgroup$
    – T..
    Commented Jan 4, 2011 at 7:20
  • 2
    $\begingroup$ T.: If you're not assuming any specific model, I don't see how you can be getting a specific answer. I think it would help me understand your point if you could give an explicit example (specifying number of families, mortality rates, fertility of the chidren, etc) in which the answer is 1/2. $\endgroup$ Commented Jan 4, 2011 at 14:58
  • 3
    $\begingroup$ ... but this is only apparent, because $k$ is not a quantity which is independent of the stopping rule, but is in fact being influenced by the stopping rule (it is related to the growth of the population, which as Vipal note's will potentially be affected by the stopping rule). Does this make any sense? $\endgroup$
    – Emerton
    Commented Jan 5, 2011 at 14:22
  • 5
    $\begingroup$ Although Matthew has bowed out, I just want to say what a pleasure it is to read his comments generally, not only for their erudition but for their wonderful civility. Too bad not all comments under this question in particular are so civil... $\endgroup$ Commented May 17, 2013 at 13:05
7
$\begingroup$

Of course, in the real world the sex ratio of a couple's offspring is a random variable with mean near 0.5. If a couple contains to product offspring until a boy is produced, the couples who tend to produce more girls will have larger families, and the proportion of girls will be higher than 50%.

$\endgroup$
5
$\begingroup$

Caveat: This is not an entirely serious answer.

There has been some (heated?) discussion as to the sensitivity of the various answer to the particular model. I thought, for my own amusement, that I would do some Monte-Carlo experiments with a "plausible" model involving Pilgrims traveling to the New World. However, in thinking about possible models, I came up with the following issue. Suppose we assume that:

  1. Once Pilgrims marry, they stay married, and do not re-marry if their spouse dies.
  2. No living Pilgrim has a direct living ancestor older than their grandparents.

Under these assumptions, it follows that if there were N male Pilgrims in the first settlement, then, at any given time, there are at most 3N male Pilgrims. Moreover, the probability of the settlement dying out over several generations (because all the children are girls) is non-zero. By Kolmogorov's zero-one law (overkill), it follows that almost surely the Settlement will die out, and not become the kick-ass country it may well have been.

$\endgroup$
1
  • 2
    $\begingroup$ Assuming current cosmological models are reasonably accurate, we can confidently claim that the USA will die out in finite time. It seems the end result is consistent with your model. $\endgroup$
    – S. Carnahan
    Commented Jan 6, 2011 at 6:24
4
$\begingroup$

A colleague, Eugene Salamin, came up with what I would consider the "Book" solution:

Phooey, this isn't at all a mathematical puzzle. A social convention cannot override biology, so the proportion of boys and girls is the biologically determined one, nominally 1/2, 1/2.

I didn't immediately understand his reasoning. But if all families are enumerated 1,2,3,... and you imagine each family's sequence of children placed in numerical order to make one infinite (or very long) sequence, then the resulting sequence of B's and G's is statistically identical to one you would get by repeatedly flipping a fair coin.

Viewed this way, the rule for stopping when the first B is reached is clearly a red herring! And clearly the proportion of boys and girls will be equal. (At least asymptotically, with probability 1, by the Strong Law of Large Numbers.)

(Likewise, if the original question is varied so that Prob(B) = p and Prob(G) = q, p+q=1, then by the same reasoning the ultimate proportions of boys and girls are p and q, respectively.)

P.S. On the other hand, this does not work for each possible stopping rule. Say we're back to the usual assumption of each birth having an equal chance of being a boy or girl. In an imaginary world, suppose each family stopped having children when the proportion of the girls in their family first exceeded 2/3. Then the ratio of girls to boys in the population will clearly be greater than 2.

$\endgroup$
7
  • $\begingroup$ The stopping rule matters because the ratio G/(G+B) for the population becomes a biased estimator of the probability that each child is a girl. Just as it is biased for 1 family, it is biased for 2, 10, or any finite number of families. Each boy or girl is weighted by 1/(population size), and girls tend to belong to larger populations. I'm not sure what you mean by "a social convention cannot override biology" or "clearly a red herring." If a family stops when there are at least twice as many girls as boys, then with positive probability (I believe 1/2 phi^-1) the family will not stop. $\endgroup$ Commented Jul 8, 2010 at 19:33
  • $\begingroup$ If you modify that example, then each family can stop with at least as many boys as girls with probability 1. That means with probability 1, the country's population will have at least as many boys as girls, and some populations will have more boys than girls. $\endgroup$ Commented Jul 8, 2010 at 19:37
  • 3
    $\begingroup$ Douglas, if every family uses a stopping rule that enforces B > G (with probability 1, such as "reproduce until B > G") this obviously does not and cannot enforce a surplus of boys in the population. It is especially clear if you replace families/children by the isomorphic setup of gamblers/cointosses. If every gambler follows a "play until ahead" strategy that in no way implies a loss for a casino offering fair games. It does alter the allocation of tosses (children) to gamblers (families) but for the casino (population) the allocation is irrelevant. $\endgroup$
    – T..
    Commented Jul 9, 2010 at 16:46
  • 1
    $\begingroup$ @T: What follows "obviously" in your response is false. With probability 1, the families can stop with a surplus of boys. The optional stopping theorem has a finiteness assumption which is necessary and which is violated in this case, so the conclusion does not hold. It is possible to choose a stopping rule on a stream of fair coin flips so that you stop with probability 1, and when you stop, there are more heads than tails. The expected number of tosses for this stopping rule must be infinite. Again, the proportion of girls is not a martingale, so you can't expect the OST to apply anyway. $\endgroup$ Commented Jul 10, 2010 at 4:12
  • 6
    $\begingroup$ @Douglas: what followed "obviously" was the observation that it is not possible for stopping to enforce a surplus of boys in the population, although it can certainly enforce this, eventually, within each family. If you define "population" (i.e., the set of coin flips over which G/(G+B) is calculated) in terms of the stopping rule, as you did with your model with completed families only, then of course what is true for the stopping rule can be true of the population, but it would be hard to argue that the problem corresponds to any such model. $\endgroup$
    – T..
    Commented Jul 11, 2010 at 17:42
3
$\begingroup$

Perhaps I am missing something here but it seems quite intuitive to me that it has to be 50-50.
Think of it as coin tosses: As the resulting distribution is completely independent of the stopping time the proportion will in the limit always converge to the original distribution which is supposed to be 50-50. That is because the resulting stochastic process is markovian and a martingale
Or put another way: It doesn't matter when you stop tossing, the outcome will always add up to 50-50 because the coin doesn't have a memory.

It is a little bit like trying to invest in the stock market and getting out every time you are in the plus (sitting out negative phases) and after that beginning all over again. This seems like a clever infallible strategy - alas it doesn't work and you will stay at zero in the long run (here minus transaction costs of course)

(BTW: This reminds me of some friends of ours who desperately wanted a boy - now they have three girls and stopped "trying"... ;-)

$\endgroup$
6
  • 4
    $\begingroup$ It seems wholly intuitive to me too. However a couple decides whether to make another baby --- prayer, quality of the moonlight, desire to have a boy --- the proportion of babies born will always be 50-50. $\endgroup$ Commented Mar 12, 2010 at 11:34
  • 1
    $\begingroup$ The difference between the count of girls and boys is a martingale, but the proportion of girls in the population is NOT a martingale. You can't apply the optional stopping theorem for martingales because the proportion is not a martingale. $\endgroup$ Commented Mar 12, 2010 at 14:01
  • $\begingroup$ Hmmm, could you give some reference for an explanation or a proof? Thank you! $\endgroup$
    – vonjd
    Commented Mar 12, 2010 at 15:01
  • 2
    $\begingroup$ The Strong Law of Large Numbers means the proportion returns (in fact, converges) to the mean almost surely. Martingales have no restoring force. Given that there have been 3 flips, and there have been 3 heads and no tails (proportion 3/(3+0) = 1), then the expected proportion after the 4th flip is 7/8, not 1. $\endgroup$ Commented Mar 12, 2010 at 16:02
  • $\begingroup$ Ah, ok... so I should change my answer by taking out the martingale and stopping time part, adding the Strong Law of large numbers and keeping the rest, right? $\endgroup$
    – vonjd
    Commented Mar 12, 2010 at 16:15
0
$\begingroup$

The correct answer has nothing to do with the number of families. This is a very tricky problem, and many people fall into the trap of trying to average each possible fraction of girls, weighted only by the probability of that outcome. But in fact they would need to be weighted also by the size of the population, if that strategy is used to find the answer.

Google's reasoning is perfectly correct, but here is another route to the same result. We just find the expected number of boys and the expected number of girls for one family.

The number of boys is obviously 1 for any outcome (of the form GnB), and so its expectation is 1.

The expected number of girls is given by the summation of n·p(n) for n = 0 to ∞, where p(n) = the probability of the outcome GnB, which is 1/2n+1. This sum is perhaps surprisingly also 1, which is easy to verify.

Thus each family's expected number of children is 1+1 = 2, and for N families, this just becomes N+N = 2N. And so on average, the population will have an equal number of children of each sex.

P.S. I will agree that Google's phrasing could have been more precise. But that is the case with virtually any math problem that is phrased as a problem in the real world, and I believe Google's intended problem is sufficiently clear that there is no real value in debating all its possible meanings.

$\endgroup$
5
  • 4
    $\begingroup$ Daniel, it looks like you haven't studied Douglas Zare's answer very carefully. He has made a very striking new observation about this old chestnut. $\endgroup$ Commented Jul 6, 2010 at 1:31
  • 2
    $\begingroup$ Zare falls into exactly the trap I mention in my first paragraph. $\endgroup$ Commented Jul 6, 2010 at 23:12
  • 1
    $\begingroup$ Daniel, I think you still don't understand Zare's insight. It matters exactly what quantity you're asking for. If G is the number of girls and B is the number of boys then "the proportion of girls in the population" is naturally interpreted as G/(B+G). The fact that E[G] = E[B] doesn't imply that E[G/(B+G)] = 1/2. $\endgroup$ Commented Jul 8, 2010 at 19:06
  • 6
    $\begingroup$ Timothy, it only matters what quantity you ask for if you change the problem from the original to the one solved in Zare's much-upvoted answer. See my reply to his posting. $\endgroup$
    – T..
    Commented Jul 9, 2010 at 0:31
  • 2
    $\begingroup$ @Timothy: E[G/(B+G)] is not interesting in order to find "the fraction of female population". For that sake we need E[G]/E(B] and that is 1 because the sex of a child does not depend on the history of the mother. $\endgroup$
    – user112109
    Commented May 13, 2013 at 17:22
0
$\begingroup$

My way to look it is a bit different. The possibile sequence and the respective probabilty of new born can be:

  • B - 1/2
  • GB - 1/2*1/2
  • GGB - 1/2*1/2*1/2
  • GGGB - 1/2*1/2*1/2*1/2
  • ...
  • ...

After Summing it up. Total Number of Boys is: 1/2 + 1/2*1/2 + 1/2*1/2*1/2 + ... = 1 On the same lines, Total number of Girls is: 0 + 1/2*1/2 + 2 * 1/2*1/2*1/2 + 3 * 1/2*1/2*1/2 + ... Which also, give 1 on summing up.

So the ratio remains equal.

$\endgroup$
3
  • 1
    $\begingroup$ I was with you right up "So the ratio remains equal". Your calculations are relevant to the difference, not to the ratio. $\endgroup$ Commented Dec 20, 2010 at 21:41
  • 1
    $\begingroup$ @Steven Landsburg: DZ calculated the difference for 10 couples: 47.5 grils and 52.5 boys. Here comes my receipe for your gambling: Put everytime 1 million bucks on black. If black comes don't stand up but start your next series. During 10 series there will be less reds than blacks. It is really ridiculous that nobody ever thought about this simple method of making money! But what happens, if another player will bet on red everytime also always stopping a series, when red comes (not standing up then but starting the nexts series)? 52.5% red and simultaneously 52.5 % black? Overflow??? $\endgroup$
    – user112109
    Commented May 15, 2013 at 10:17
  • 2
    $\begingroup$ It would be nice if this thought experiment with two players with symmetrically opposite strategies could be turned into a simple explanation why the EV of the ratio $G/(B+G)$ \emph{cannot} be $1/2$. I don't quite see how to do it, but it seems only one player can gain money, and the loser will sit longer at the table than the winner does. $\endgroup$ Commented May 15, 2013 at 19:49
-1
$\begingroup$

I think we may summarize as follow:

We have infinite (countable) number of families. Each family stops to have children when the first boy appears.

We have a number of questions...

What is the expected: a) Ratio girls/boys in a given family?

b) Ratio boys/girls in a given family?

c) Ration boys/children in a given family?

d) Ratio girls/boys in the country?

e) Ratio boys/girls in the country?

f) Ration boys/children the country?

Some more: g) Number of children in a given family?

h) Probability of exactly one child in a given family?

And answers: Each family has exactly one boy. So:

a) $E(G1/B1)=E(G1)=1$ (one may do the sum $\sum_{i}0.5^{i}(i-1)=1$, or remark that $x=0.5\cdot 0+0.5\cdot(x+1)$ and obtain $x=1$)

b) Is not defined as $P(G1=0)=1/2$

c) $E(B1/(B1+G1))=E(B1/(B1+1))=E(1-\frac{1}{B1+1})=1-\sum_{i}0.5^{i}\frac{1}{i+1}=1-log(2)$

d) Let $R_{n}$ be the ratio for the first $n$ families, $R_{n}=\frac{G1+G2+...+Gn}{n}$. By the SLLN $R_{n}$ converges to $E(G1)$ a.s. So that (as) $lim R_{n}=1$

e) Honestly speaking, $1/R_{n}$ is not defined with probability $0.2^{n}$, so it is not correct to speak about $\lim 1/R_{n}$. But $1/lim R_{n}$ is defined a.s. and is equal to 1.

f) Let $Q_{n}$ be the ratio for the first $n$ families, $Q_{n}=\frac{n}{n+G_{1}+...+G_{n}}=\frac{1}{1+R_{n}}$. It is well defined and converges as. to 0.5

g) $E(G1+B1)=2$ (one may do the sum $\sum_{i}0.5^{i}(i+1)=1$, or remark that $x=0.5\cdot 1+0.5\cdot(x+1)$ and obtain $x=2$)

h) $0.5$

$\endgroup$
-1
$\begingroup$

Maybe this is off topic (since it is applied statistics). But why not look at the problem as "What is the expected number of failure X till there is as success?" This corresponds to a negative binomial distribution which has an expected value of E[X] = r*(1-theta)/theta. r is the number of success, in this case it is r = 1. So, the expected number of failure (girls, sorry!) are 1*(1-0.5)/0.5= 1. The proportion girls/boys is 1:1.

$\endgroup$
-3
$\begingroup$

The answer is simply the same as in the coin tossing experiment, and there is a one word proof of it, Martingale, which gives 50-50. The first time one stops giving birth is based on an event that is known at the time, hence the associated stopping rule is adapted to the natural filtration and by optional stopping theorem, E(X_tau) = E(X_0) for a stopping time tau and martingale X_t, which in this is the number of male children minus female children after each birth. This also shows why killing babies is wrong.

$\endgroup$
15
  • 5
    $\begingroup$ It's amazing how many people post wrong solutions after the correct one has been up-voted so many times that it's hard to miss. $\endgroup$
    – rgrig
    Commented Mar 23, 2010 at 21:36
  • 3
    $\begingroup$ The expected value of G/(G+B) is 1/2, not 3/8, under that stopping rule for a population in the ordinary sense of that term, i.e., one where the set of families is changing over time and without an artificial exclusion of incomplete families. By symmetry, E[G/(G+B)]=1/2 for any set of births that is defined without reference to concepts that (given the stopping rule) break gender symmetry, such as boys, girls, completed families, or siblinghood. This includes "all people born since 1920" but not "eldest children" or your definition of population "all children from completed families". $\endgroup$
    – T..
    Commented Jul 10, 2010 at 5:22
  • 6
    $\begingroup$ @DZ: $k=1$ is no counterexample unless one defines population (the set of births for which G/(G+B) is calculated) to be a set of families that have reached the STOP state. It's quite clear that the one-completed-family (B,G) distributions can be asymmetrical under a stopping rule, that this asymmetry can be reflected in the proportion of girls, and that it is dampened (the girl proportion tends to 1/2) when convolving many such distributions. What is not clear is whether any bias exists in models not of that form. $\endgroup$
    – T..
    Commented Jul 11, 2010 at 18:06
  • 4
    $\begingroup$ @Rhett Butler: That is clearly false and insulting. I hope that when you realize your mistake, you post apologies with the enthusiasm you are using to spam your errors and lies. $\endgroup$ Commented May 13, 2013 at 22:11
  • 6
    $\begingroup$ @Rhett Butler: Here is a difference. When you bet on roulette, you don't get paid $B/(B+G)$. If you make bet $1$ at each step, you get paid $B-G$, say. Your payoff is a martingale. You do not get paid $B/(B+G)$. $B/(B+G)$ is not a martingale. Stop pretending that recognizing the fact that $B/(B+G)$ does not have expected value $1/2$ under some stopping rules means that we have a roulette strategy which wins on average. Your statement that "my" strategy (which is not mine) must win at roulette is mathematically wrong. It does not become right by spamming it or being increasingly rude. $\endgroup$ Commented May 14, 2013 at 17:04

Not the answer you're looking for? Browse other questions tagged .