a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
Devac  ·  2767 days ago  ·  link  ·    ·  parent  ·  post: Probably Overthinking It: Bayes' Theorem is not optional

Perhaps it's shoddy coding on my part, but I got different result as well.

  Sample size for simulation:	1000000

It was actually raining for 111801 days out of a 1000000

  In following the third person was saying the opposite:

  Albert and Betty said yes	82200

Albert and Charlie said yes 81833

Betty and Charlie said yes 82640

  Albert and Betty said yes and it was true	49596

Albert and Charlie said yes and it was true 49250

Betty and Charlie said yes and it was true 49631

  Albert and Betty said yes and it was a lie	16646

Albert and Charlie said yes and it was a lie 16300

Betty and Charlie said yes and it was a lie 16681

  It was raining and everyone said true	32950

It wasn't raining but everyone lied 32658

  Albert

Times said 'yes' truthfully: 74377

Times said 'no' truthfully: 592897

Times said 'yes' and lied: 295302

Times said 'no' and lied: 37424

Betty

Times said 'yes' truthfully: 74422

Times said 'no' truthfully: 592248

Times said 'yes' and lied: 295951

Times said 'no' and lied: 37379

Charlie

Times said 'yes' truthfully: 74326

Times said 'no' truthfully: 592276

Times said 'yes' and lied: 295923

Times said 'no' and lied: 37475

I have used probabilities from the article. One out of three chance for a lie, one out of nine chance of rain being in Seattle. I can share my code if you would like to go for "maybe by spotting a problem with someone else's code I'll get some extra insight" type of exercise. Beware of sleepy Python though ;).