Comment

Comment by x0054

Nope, sorry, it's wrong. Here are the possibilities for someone with 2 children were at least one of them is a boy borne on tuesday:

  01) 1BT 2BM
  02) 1BT 2BT
  03) 1BT 2BW
  04) 1BT 2BR
  05) 1BT 2BF
  06) 1BT 2BS
  07) 1BT 2BY
  
  08) 1BT 2GM
  09) 1BT 2GT
  10) 1BT 2GW
  11) 1BT 2GR
  12) 1BT 2GF
  13) 1BT 2GS
  14) 1BT 2GY
  
  15) 1BM 2BT
  16) 1BT 2BT
  17) 1BW 2BT
  18) 1BR 2BT
  19) 1BF 2BT
  20) 1BS 2BT
  21) 1BY 2BT 
  
  22) 1GM 2BT
  23) 1GT 2BT
  24) 1GW 2BT
  25) 1GR 2BT
  26) 1GF 2BT
  27) 1GS 2BT
  28) 1GY 2BT
Your program counts possibility # 2 and 16 only once, because at first glance they are identical. But they are not, because each child has independent probability. This is why models that graph this information on a grid also fail to get the right answer. The above probability table gives you the proper result of 14/28, or 1/2.
parent x0054 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton