A simple Swift Playground showcasing the Monty Hall problem

monty-hall-problem

A simple Swift Playground showcasing the Monty Hall problem. For more info on the problem check here.

Notes

At first the statement might not make sense, however the first time you choose a door your probabilities are 1/3 that you’ve got it correct, so the two other doors would represent a 2/3 chance of winning and since one door is not “choosable” (because it has been opened) you end up with a 2/3 chance of winning in a single door.

If you run the simulation on Swift Playground that is exactly what you will get.

GitHub

View Github