Skip to content

Instantly share code, notes, and snippets.

@davidchambers
Created February 14, 2013 00:06
Show Gist options
  • Save davidchambers/4949591 to your computer and use it in GitHub Desktop.
Save davidchambers/4949591 to your computer and use it in GitHub Desktop.

A woman has two children, (at least) one of whom is a boy. What's the probability that she has two boys?

       B    B-B   1/4
      /
     /
    B
   / \
  /   \
 /     G    B-G   1/4
/
\
 \     B    G-B   1/4
  \   /
   \ /
    G
     \
      \
       G    G-G   1/4

There are three equally likely scenarios: B-B, B-G, and G-B. Of these, only B-B meets the condition, so the probability is 1/3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment