24 February 2010

Google and Family Planning!

The following question is reputedly one of many that Google may ask prospective job candidates:

Imagine a country in which every family continues to have children until they have a boy. If they have a girl, they have another child, and continue until they have a boy, then they stop. What is the proportion of boys to girls in the country? You should assume that there is an equal probability of having a boy or a girl.

The question has been discussed at length on the Internet and this site is one of many that provide an answer. The answer is correct (approximately the same number of boys and girls) but I doubt whether the way it is derived would help to get you a job with Google. There are numerous other similar posts, most of which give the correct answer, but all but a few miss what I believe is the point of the question. It is an example of misdirection; the question describes a strategy for ensuring that all families have exactly one boy and zero or more girls, but what it asks for is the overall distribution of boys and girls in the country as a whole. The way the question is stated leads you to believe that the strategy will affect the overall distribution - but does it? Anyone with some knowledge of probability should then realise that no strategy that involves stopping after a certain number of children can affect the overall proportion, because all births are independent events. In the population as a whole the probability that the next child, born anywhere in the country, will be a boy is 0.5, regardless of how many boys or girls have already been born, so the proportion will be 50:50. Of course the proportion will rarely be exactly equal because the gender of the children are random events, in fact they form a binomial distribution, but for large populations it will be very close to 50:50.

To many people this is counter intuitive - probably because the strategy clearly does affect the make up of every individual family. Consider another country where they adopt the strategy of stopping after having exactly two girls. The only family distribution you would find on both countries would be two girls and one boy (but in a different order); the overall distribution however would still be 50:50.

blog comments powered by Disqus