Test file: http://pastebin.com/thW8FbDH
Result: 0,3333285894552 average of 5 runs. The odds really are 1 in 3.
Result: 0,3333285894552 average of 5 runs. The odds really are 1 in 3.
Take a room full of people. Ask them all to stand up.
Then:
Sit down if you don't have exactly two children.
Sit down if neither child is a boy.
What proportion of the remainder have two boys.
The problem is: what made the speaker say that in the first place? Under different assumptions you get different answers. This is akin to the problem: Take a stick and break it at random into three pieces.
What is the probability the pieces can be used to make
a triangle?
Different people have different interpretations of what it means to say "at random."Foshee's Tuesday-Boy question helps us see why this is an issue.
I have a child. One is a boy, born on a Tuesday.
What is the probability the other is also a boy?
Using the "obvious" reasoning the answer is 13/27. I have a child. One is a boy, born on a Tuesday, plays the
piano, juggles, has red hair, and is left-handed. What is the
probability the other is also a boy?
Now the same reasoning as gave the answer 1/3 for the first version here gives the answer 1/2 - epsilon. To many this seems wrong, and highlights the importance of being explicit about the assumptions being made.That's the point of the post, not the naive calculation.
See also Tanya Khovanova's post: http://blog.tanyakhovanova.com/?p=221
There's also a follow-up using Shannon entropy to help: http://blog.tanyakhovanova.com/?p=254