# Ratio of Boys and Girls Puzzle-Asked in Google and Goldman Sachs interviews.

# Question:

In a country where everyone wants a kid with a specific gender (assuming only 2 genders), each family continues having babies till they have a kid with the expected gender. After some time, what is the proportion of boys to girls in the country? (Assuming probability of having a boy or a girl is the same)

# Solution: 1.00

Assume there are C number of couples so there would be C boys. The number of girls can be calculated by the following method.Number of girls = 0*(Probability of 0 girls) + 1*(Probability of 1 girl) + 2*(Probability of 2 girls) + …

Number of girls = 0*(C*1/2) + 1*(C*1/2*1/2) + 2*(C*1/2*1/2*1/2) + …

Number of girls = 0 + C/4 + 2*C/8 + 3*C/16 + …

Number of girls = C

(using mathematical formulas; it becomes apparent if you just sum up the first 4-5 terms)The proportion of boys to girls is 1 : 1.

As such, the answer would be 1.00