I intentionally didn't do a write-up of Bayes' Theorem or this particular problem because there is so much literature about it on the web, but you did inspire me to add this comment:
The following source statement illustrates the essence of this problem as an example of Bayes' Theorem. There are two posterior situations, in one case there are two possible succeeding events, each with one-half probability. In the other case only one succeeding event is possible with 100% probability. before the source statement
let revealedDoor =
if (doorWithPrize = fstChoice) then rndReveal doorWithPrize
else forcedReveal doorWithPrize fstChoice
I think F# does a rather nice job of letting you write source code that reveals the intention of what the code is doing.
5 comments
[ 3.6 ms ] story [ 27.2 ms ] threadOptimal is to always switch.
what’s behind the door you originally picked what’s behind BOTH of the other doors, minus the goat"
Mind blown. I've been trying for a long time to understand this intuitively, thank you!
The following source statement illustrates the essence of this problem as an example of Bayes' Theorem. There are two posterior situations, in one case there are two possible succeeding events, each with one-half probability. In the other case only one succeeding event is possible with 100% probability. before the source statement
let revealedDoor =
I think F# does a rather nice job of letting you write source code that reveals the intention of what the code is doing.