December 28, 2010

To Bet or Not to Bet?

Steve Landsburg posted an ambiguous question at his blog, and people disagree on the answer. That has led to betting on the right answer to the question. Here is the question:

There’s a certain country where everybody wants to have a son. Therefore each couple keeps having children until they have a boy; then they stop. What fraction of the population is female?

This is supposed to be expressed as an expectation. Phil Birnbaum does a good job of explaining where the difference in interpretation lies, although Phil puts it in terms of countries, where it really should be in terms of families.

I wrote a simulation of the problem here, a Python script. Feel free to download and play with it (Python is free). Here are a few sample runs of the program:

Girls=998007. Boys=1000000.
Average Fraction: 0.306338134795
Girls=1000045. Boys=1000000.
Average Fraction: 0.306774090892
Girls=1001524. Boys=1000000.
Average Fraction: 0.307199395218
Girls=998957. Boys=1000000.
Average Fraction: 0.306736128952

The first line of each runs shows the actual number of boys and girls produced by one million families. As you can see, the families produce an even number of boys and girls, so the expected fraction of the population that is female is 1/2.

Landsburg, however, says what he wants is the second answer, which is the average fraction of girls in a family. According to this simulation, the expected fraction of girls in a family is 3/10.

So do you bet against Landsburg? He stated his problem poorly. His statement of the problem clearly asks for the fraction of the population of the country, not a family in the country.

Steve has done this before, presented a problem with incomplete information. (At the link, he does not say if you play the game once or as many times as you like.) He should have stated the question, “What is the expectation for the fraction of girls in a family in such a country.” He should lose the bet.

10 thoughts on “To Bet or Not to Bet?

  1. Phil Birnbaum

    Hi, David,

    I disagree. The answer is NOT the same as averaging over families.

    You (and Landsburg) want the average percentage of girls in the COUNTRY, not the average percentage of girls in the FAMILY. Landsburg’s question is unambiguous about this.

    I believe that understanding why the *family* number isn’t 50% does help you understand why the *country* number isn’t 50%.

    ReplyReply
  2. Pingback: To Bet or Not to Bet? : baseballmusings.com | Best Art Blog

  3. Steven E. Landsburg

    His statement of the problem clearly asks for the fraction of the population of the country,

    Yup. That’s the question, and that’s exactly what I’m offering to bet on. Are you in?

    ReplyReply
  4. James

    The country number is 50%. This is obvious. David’s simulation confirms it, but it wasn’t necessary.
    Each birth is independent of each other birth, and the expected number of girls of each and every birth is 1/2. Expectations are additive, so the expected percentage of girls in the country is 50%.
    Phil must be interpreting the question differently (although it does seem unambiguous to me, too!).

    ReplyReply
  5. Eric

    You don’t need a simulation to run this. The population of the entire country will always approach a 50/50 split in this scenario, unless individual families manipulate births (killing unwanted children).

    The sex of the “next child born” will always have an exactly 50/50 chance at being male or female. Starting at a random spot and counting forward, the future population from that will always maintain a 50/50 split.

    As an example…

    50% of all families having a child will have a boy, and then be done having children.

    50% of all families having a child will have a girl. Some of that 50% will want another child, 50% of those “next children” will be a boy and 50% will be a girl. Rinse, repeat.

    Within just 2 rounds of having children, 75% of the population already has 1 boy or 1 girl and 1 boy. After another chance at having children, the demographics will look like this:

    50% families have 1 boy
    25% of families have 1 girl and 1 boy
    12.5% of families have 2 girls and 1 boy
    12.5% of families have 3 girls

    If there were 1000 total families to start, that is 875 boys and 875 girls born. If you keep adding bigger possible families on, the percentage of families with large numbers of girls becomes exceedingly small and is offset each time by a 50/50 chance of another boy added on to that large family.

    ReplyReply
  6. David Pinto Post author

    @Steven E. Landsburg: No, and this is the reason.

    One of these days in your travels, a guy is going to show you a brand-new deck of cards on which the seal is not yet broken. Then this guy is going to offer to bet you that he can make the jack of spades jump out of this brand-new deck of cards and squirt cider in your ear. But, son, do not accept this bet, because as sure as you stand there, you’re going to wind up with an ear full of cider.

    ReplyReply
  7. Mike

    First, we’ll setup the problem:

    1/2 of couples: 1 boy

    1/4 of couples: 1 girl + 1 boy

    1/8 of couples: 2 girls + 1 boy

    1/16 of couples: 3 girls + 1 boy

    1/32 of couples: 4 girls + 1 boy
    .
    .
    .
    and so on
    .
    .
    .

    ———————–

    Now the math for fraction of females in the population:

    fraction of girls in population = [population of girls born]/[population of babies born]

    fraction of girls in population = [population of girls born]/{[population of girls born] + [population of boys born]}

    population of boys born = couples (since every couple stops at one boy)

    population of girls born = [(1/2)*couples*(0 girls) + (1/4)*couples*(1 girl) + (1/8)*couples*(2 girls) + (1/16)*couples*(3 girls) + …]

    population of girls born = couples*[(1/2)*0 + (1/4)*1 + (1/8)*2 + (1/16)*3 + (1/32)*4 + …]

    population of girls born = couples*sum[(n-1)/2^n] (sum from n=1 to infinity)

    population of girls born = couples since sum[(n-1)/2^n] (n=1 to infinity) converges to unity

    fraction of girls in population = [population of girls born]/{[population of girls born] + [population of boys born]}

    fraction of girls in population = couples/{couples + couples} = 1/2

    If we assume the population started with 1/2 females, then we don’t have to correct the population for this birth pattern since it also yields a population of 1/2 female children.

    The fraction of females in the population is 1/2, confirming David’s simulation.

    ————–

    Now the math for expected value of females in a family. Note that females suggests that the female parent should be included:

    fraction = (1/2)*(1 female/3 people) + (1/4)*(2 females/4 people) + (1/8)*(3 females/5 people) + (1/16)*(4 females/6 people) + (1/32)*(5 females/7 people) + (1/64)*(6 females/8 people) + …

    fraction = (1/2)*(1/3) + (1/4)*(2/4) + (1/8)*(3/5) + (1/16)*(4/6) + (1/32)*(5/7) + (1/64)*(6/8) + (1/128)*(7/9) + (1/256)*(8/10) + (1/256)*(9/11) + (1/512)*(10/12) + (1/1024)*(11/13) + (1/2048)*(12/14)

    fraction = sum[n/{(n+2)*2^n}]

    fraction ~ 0.458

    The fraction of females, including the adult mother and any girls born, is 0.458. This result is different than both of David’s simulations because the result is the answer to a third possible interpretation of the problem.

    ————–

    Now the math for expected value of girls born into a family. Note that girls born does not include the female parent:

    fraction = (1/2)*(0 girls/1 child) + (1/4)*(1 girls/2 children) + (1/8)*(2 girls/3 children) + (1/16)*(3 girls/4 children) + (1/32)*(4 girls/5 children) + (1/64)*(5 girls/6 children) + …

    fraction = (1/2)*(0/1) + (1/4)*(1/2) + (1/8)*(2/3) + (1/16)*(3/4) + (1/32)*(4/5) + (1/64)*(6/8) + (1/128)*(5/6) + (1/256)*(6/7) + (1/256)*(7/8) + (1/512)*(8/9) + (1/1024)*(9/10) + (1/2048)*(10/11)

    fraction = sum[(n-1)/(n*2^n)] (sum from n=1 to infinity)

    fraction ~ 0.309

    The fraction of girls in a family, excluding the parents and only including the children, is 0.309, confirming the result of David’s simulation.

    ReplyReply
  8. Phil Birnbaum

    David/3:

    Well, maybe I’d try one family in the population, and simulate a couple hundred thousand populations and show the proportion of girls is less than 1/2. I’d compute the sample SD and show that it’s statistically significantly less than 1/2. (We both agree that this will happen, for one family).

    Then I’d two families, and three, and four. The proportion will get closer to 1/2, but still statistically significantly different from 1/2.

    Then, 5, 6, 7. Eventually, the simulation would take too long … which is a problem. If someone claims, once you get to 10,000 families, the proportion goes to *exactly* 1/2 … well, that isn’t right, but a simulation would have trouble proving it, I’d bet.

    ReplyReply
  9. James

    Phil, for one family, the *expected percentage of girls is 50%*. If the question is about the expected value, then David’s simulation bears this out.
    I think there is a question that is still not being asked clearly enough. That is, I am fairly sure that there is some question that you and others have in mind to which the correct answer is “less than 1/2”, but I can’t tell what it is.

    ReplyReply

Leave a Reply

Your email address will not be published. Required fields are marked *