Fog Creek Software
Discussion Board




boys and girls

I feel the posted solution is wrong. The probaility of success, ie. probability of getting a boy, is p = 1/2. The probability of egtting a girl is q = 1/2.
Lets say X is the random variable tht represents the number of births before we get a baby boy.

The expected value of this variable is E[X} = sum_{k=1 to infinity} K * q^(k-1) * p which is equivalent to  (p/q) * sum_{k=0 to infinity} k * q^k. On evaluation this turns out to be 1/p which means 2.
That means, it takes on average, 2 births before we get a baby boy. That is 2 girls born on average for every boy.
The ratio and the answer, thus, is the ratio of girls to boys is 2:1

Mitesh Vasa
Friday, July 09, 2004

Your math is right, your interpretations is not.

"2 births before we get a baby boy" means that on average you get a boy on the SECOND attempt.

Which means that you have a single girl before you get a boy. So the ratio is 1:1.

Brad Corbin
Saturday, July 10, 2004



i think the solution is wrong ... here's mine ...

the no. of boys for a couple is 1.
the expected no. of girls can be calculated as ...

N(g) = 0*0.5 + 1*0.25 + 2*0.125 + 3*0.0625 + .....
      = 2/3.

so the ratio of boys to girls is 3/2

Ram
Saturday, July 31, 2004


The expected proportion of boys, even for a finite number of babies, is exactly 1/2.


The proof is easy if you step back a bit from the infinite sum and conditional math [which do work but requires effort!] 

Each baby is a boy or girl with 50% probability by definition. No baby's sex influences any other baby's sex, so every born child had that same 50% chance.

So for any group of babies, no matter what crazy rules you make to decide who has them and why and how many, the proportion is still 1/2.

Steve W
Friday, September 17, 2004

*  Recent Topics

*  Fog Creek Home