3 ms·
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 m
by jackfoxy 15y ago
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.