This is not a simulation or even a program, but a way to reason about
the Monty Hall problem that I find easy to understand.
Suppose that you have chosen a door and somehow discover that there is a
goat behind your chosen door. If you wait until Monty shows you the
other goat, you will know certainly that the car is behind the other
unopened door, so you switch and win the car.
Even if you do not know that there is a goat behind your chosen door,
you know that two times out of three there will be a goat behind your
chosen door, and if you switch doors, you will win the car two times out
of three.
My son informs me that the British mathematician Hardy is behind the
"yes, it is obvious" anecdote. According to him, Hardy was giving a
lecture and said, "It is simple to show that . . . . ," whereupon he
stopped, left the room for ~20 minutes, returned, and said, "Yes, it is
simple to show that . . . ."
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm