More males or females [duplicate]

In a society (presumably Asian) where sons are preferred over daughters, couples adopt the following heuristic when reproducing:

• If the new-born is a daughter, try for a new child
• When the couple finally gets a son (even if it's the first), stop.

Under the following assumption:

1. Fertility doesn't decrease regardless of number of children
2. Equal probability of getting a son or a daughter

Would we expect the society to have more daughters, more sons or equal (in one generation)?

• side note: I find this problem interesting because the intuitive answers that people come up with can be vastly different. Also, can you come up with a convincing/correct proof without involving difficult math/probability?
• Welcome to Puzzling Kzzai, it's nice to see your first post is of good quality. I hope that you maintain this level in the future. – Mark N May 15 '15 at 18:24
• While at a tea party with your two stuffed animals you decide to feed strawberry pastries to Mr Bun. However, the dastardly Duke Froggington II has a nefarious plan to sneakily replace the yummy strawberry pastries with sour blueberry ones. Yuck! Each time you feed a pastry to Mr. Bun, there's a 50% chance Duke Froggington II has replaced it with a blueberry pastry. If you petulantly throw away the whole bag of pastries and get a new one from Cook each time this happens, then over the course of the tea party would you expect Mr Bun to eat more strawberry, more blueberry, or an equal number? – Trevor Powell May 16 '15 at 11:47

Equal, because there's an

Equal probability of getting a son or a daughter

and the sex of the parents' previous children doesn't change that.

Because, for each child which is conceived, the probability of that child being male or female is equal, it therefore follows that at a population level there should be equal numbers of boys and girls.

As others have said already, society would have

roughly the same number of males and females

Here is an example that attempts to make this more clear:

Remember that ONLY those who have girls can continue to try for more children. That is why the number of couples is roughly halved with each round of children. This example is meant to help you understand the overall concept. Please don't take it too literally. In reality, they obviously would not all have children at the same time.

• Note: The couple in the last step that had the girl would continue on until they had a boy, but that possible number of added females is not significant when considering an entire population. – JLee May 15 '15 at 19:31
• How do you read this diagram? I mean, there can be 512 pairs with only sons and no daughters (1S+0D), 512 pairs with 1S+1D, 256 pairs with 1S+2D, 128 pairs with 1S+3D, 64 pairs with 1S+4D... and so on, which makes number of daughters greater than sons, if we include families with multiple children? – Kusavil May 20 '15 at 21:36
• @Kusavil How it works: There are 1024 couples. All of them get pregnant. The chance of having a boy or girl is the same, so assume 512 of those 1024 couples have a boys. Those 512 couples stop having children completely, and the other 512 have a girl. At this point, there are roughly an equal number of boy and girls. The 512 remaining couples all get pregnant. Half of them (256) have boys, and stop. And the other half (256) have girls. At this point, the # of boys is roughly equal to the # of girls. This pattern continues on until there are no more. – JLee May 21 '15 at 0:02

They will be equal in number. The nth child, for all n, of all families will be a boy or girl, with equal probability. This is sufficient.

Sorry I can't elaborate further, on mobile right now.

I wrote a Python program to simulate this situation.

from random import choice

males = 0
females = 0

def have_child():
global males, females
sex = choice(('male', 'female'))

if sex == 'male':
males += 1
else:
females += 1
have_child() # Have another one!

for i in range(1000): # Assuming 1000 couples.
have_child()

print('Males born: %s. Females born: %s.' % (males, females))


Running the simulation several times, this is the result.

Males born: 1000. Females born: 929.
Males born: 1000. Females born: 996.
Males born: 1000. Females born: 989.
Males born: 1000. Females born: 969.
Males born: 1000. Females born: 1050.
Males born: 1000. Females born: 1020.
Males born: 1000. Females born: 1044.
Males born: 1000. Females born: 962.

So, on average, the number of male and female children born is the same.