Log In  


Cart #monty_hall_problem-0 | 2024-12-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

Aim

This cartridge can be used for educational purposes to make simulations for the Monty Hall problem, a well-known probability conundrum that puzzles many people. The statement of the problem is the following:

-- Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? [cited from the Wikipedia page]

For students attending a Probability course, this is an exercise about conditional probability. You can read more on the dedicated Wikipedia page.

Name

The name Let's make a trade is reminiscent of the name of the TV show that inspires the setting of the problem.

Title screen. The host of the show presenting the game.

How to use this game

The first time you play, the game is presented in all details. You choose a door, the host opens another door, which has a goat, and you are free to choose the other closed door, if you wish.

An unlucky guest. A lucky guest.

After the first round, the game resets and you can observe many instances of the game. You can try the following experiment: pick a strategy (e.g., always switch/never switch) and apply it consistently in all instances to see which one is more favourable!

Observing the strategy "never switch". Observing the strategy "always switch".

Have fun experimenting!

8


1

Very nicely fleshed-out demonstration of the Monty Hall problem! Switching after the goat reveal should yield a car 2/3 of the time, while sticking will net you a car only 1/3 of the time.

Let's assume:
The car has 1 in 3 odds of being behind any given door
We always pick door 1 and always switch
If the car is behind door 1 let's assume half of those times door 2 gets revealed, and half of those times door 3 is revealed
(If the car is behind door 2 or 3, it's a foregone conclusion that the other of those gets revealed)

That gives us 4 possible outcomes, with the following odds:
1 in 6: Car in door 1, door 2 is revealed
1 in 6: Car in door 1, door 3 is revealed
1 in 3: Car in door 2, door 3 is revealed
1 in 3: Car in door 3, door 2 is revealed

1 in 3 is equal to 2 in 6 odds, so to give us 6 equally likely outcomes, and following our fixed strategy of always picking door 1 and always switching:
#1: Car in 1, reveal 2, pick 3: Goat
#2: Car in 1, reveal 3, pick 2: Goat
#3: Car in 2, reveal 3, pick 2: Car
#4: Car in 2, reveal 3, pick 2: Car
#5: Car in 3, reveal 2, pick 3: Car
#6: Car in 3, reveal 2, pick 3: Car

You can see how we manage to get the car 2/3 of the time.


2

It is unfortunate that the wikipedia page wrongly states the problem. It is vital that not only does the host know what is behind the doors, he must always have the intention of revealing a goat every time.

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, always opens another door with a goat, say No. 3. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? [cited from the Wikipedia page]

The details of the question are very important. For example, what if the host only reveals a door with a goat when the player picks the car?


@capnclassic You're absolutely right, but I don't think it's only the Wikipedia page to blame. It's a tradition to propose this problem in an ambiguous way, which I think is the reason why it puzzles many people and why the problem makes always people discuss. Other probability paradoxes (not logical paradoxes) are built on this ambiguity, see, e.g., the Bertrand paradox.

I am not saying that I condone this way of doing! When I teach this, I explicitly state the rules followed by the host when opening the door:

  • if the guest has chosen a goat, the host opens the other door hiding a goat;
  • if the guest has chosen a car, the host opens one of the other doors by choosing randomly uniformly.

I can tell you that, also with the precise rules, it puzzles people.



[Please log in to post a comment]