Funny(?) Probability Problem [duplicate]

So I ran accross the following problem today on a forum:

"In an attempt to reduce male birth rates, feminists have passed a law which forces families to stop having children after their first male child. After this law is passed, what is the expected ratio of male children to female children?"

It's unclear whether families are supposed to continue having children until their first male child or if they may stop at any earlier point, but let's assume the former. Let's also assume that everybody obeys the law, and that either sex has an equal chance of being born.

I thought I had a simple solution, because the problem is logically equivalent to the following process:

  • Generate N infinite random sequences of boys and girls
  • Cut each sequence after the first occurrence of a boy
  • Concatenate the results and measure the ratio of boys to girls

This is equivalent to generating a random sequence of boys and girls by stopping at each boy but then continuing again (up to N times), so the only difference from a normal random sequence is that this sequence always ends with a boy. However, if N grows to infinity, it seems like this last element (which can never be reached) becomes irrelevant, so the ratio of boys and girls should be 1:1 like in a normal infinite random sequence. This seems perfectly logical to me, but a few people kept insisting that it is wrong, ranting about "biased estimators" and claiming that the real ratio will be biased in favor of females.

Is my reasoning flawed? If so, why?

[EDIT]

Contrary to some suggestions, I don't think this question is a duplicate. It asks about the validity of a particular approach to solving the problem, not just for a solution.


families are supposed to continue having children until their first male child


Possible families
b (p = 0.5)
gb (p = 0.25)
ggb (p = 0.125)
gggb (p = 0.0625)
ggggb (p = 0.03125)
gg.... (p = 0.5^length)

So every family will always have exactly óne boy for sure (total_p=1). But let's prove that.

Girls

The amount of girls you have is basically:

0.5 * 0
0.25 * 1
0.125 * 2
0.0625 * 3
0...... * 4

The extra amount of girl per n is 0.5^(n+1) * n. Summing this formula:

enter image description here

Boys

The amount of boys you have is similar:

0.5 * 1
0.25 * 1
0.125 * 1
0.0625 * 1
0...... * 1

So the extra amount of boy per n is 0.5^(n+1). Summing this formula:

enter image description here

So the ratio is 1:1!


A birth is either a new male or a new female, each with probability $1/2$. This is clearly the case regardless of laws or policies, so by linearity of expectation the expected ratio of males to females in the population will remain $1:1$.


Edit: If you disagree with the minor simplifying assumption that boys and girls are equally likely, just replace $1/2$ with some fixed $p$ and $1-p$, and $1:1$ with $p:(1-p)$.

Here is some JavaScript code to simulate this for $1$ million families:

var heads = 0;
var tails = 0;
for(var i=0; i<1E6; i++){
   var gotTails = false;
   while(!gotTails){
      if(Math.random() < 0.5){ 
         heads++ 
      }
      else{
         tails++;
         gotTails = true;
      }
   }
}
console.log(heads + "," + tails);

The law will change the sexual habits of people and the number of children born, but it will not change the laws of nature. In the assumed model these are as follows: The sex of a child is determined at the moment of conception, and if conception takes place the probability that the child is a boy is ${1\over2}$, independently of social circumstances.


I understand the instinct to argue against you but you are right, the ratio should remain 1:1. For an intuitive reason why: consider the before and after for families with three children.

Options before

  • bbb
  • bbg , bgb, gbb
  • bgg , gbg, ggb
  • ggg

Total is 12 boys, 12 girls

Options after the law

  • b
  • b , b, gb
  • b , gb, ggb
  • ggg

Total is 7 girls, 7 boys.

Two children gives:

  • bb
  • bg, gb
  • gg

vs

  • b
  • b, gb
  • gg

We could continue this to all possible sets and the results would be the same.

However, this is ignoring the possibility that there may be some genetic component (none that I've heard of but possibly the case) which says some couples are more likely to produce a particular sex. This may be the bias people are talking about.