Fog Creek Software
Discussion Board

boys and girls

Heaven's approach could be used here as well:

a - the average number of children in a family

a = 0.5 * 1 + 0.5 * (1 + a)
a = 1 + 0.5 * a
0.5 * a = 1
a = 2

If average number of children is 2, each family have on average 1 boy and 1 girl.  The ration is 1:1

Sunday, October 13, 2002

Not to nit-pick, but you might include more elaboration in your answers. I couldn't follow any of them.

Monday, October 14, 2002

I'm sorry if this solution was not clear.

Please look at problem #37 called 'heaven'.  It asks how long it will take the person to reach heaven  (assumed 'on average').

'boys and girls' problem is almost identical.  If we find how many children on average a family has, we can find the average ratio of boys to girls.

We have a stochastic process. If a boy is born (with probability 0.5), the process terminates.  If a girl is born (with the same probability), the process continues, repeating itself.

'a', the average number of children in a family, can be calculated using the equation below:

a = 0.5 * 1 + 0.5 * (1 + a)

Term 0.5 * 1 means a boy is born and the process terminates.

Term 0.5 * (1 + a) means a girl is born and the process repeats itself. 

The solution of the equation is a = 2, which means on average a family has 2 children.  This is possible only if first child is a girl and second child is a boy.

Please correct me if I'm wrong.

Wednesday, October 16, 2002

*  Recent Topics

*  Fog Creek Home