The Three-Goats-Problem: The Solution

There is an easy way to check the forecasts: write a simulation. In APL, it is very easy and should take only minutes to write the code – here it is:

Via the right argument you can choose one of the three strategies. But to get a useful result, we need to run this program at least 10.000 times. For this we will use a defined operator:

Now we can check the result of the first strategy:

If you did expect 50%: At the moment when you as the candidate choose a door, it was a 1:3 or 33% chance. This is because the car was moved behind one of three doors.

If you later open one door, or two doors or all doors, here, in the TV studio or in China, immediately after you made your choice, one day later or one year later, all this does not change anything: at the time given it was a 1:3 chance = 33%. It is important that you agree with this, because we come back to this result later on. So think twice before contradicting :)

Let’s check the second strategy now: throwing a dice.

Of course! At that moment, two doors remain, so it is a 1:2 or 50% chance.

Let’s check the last one:

That’s where most people run into trouble, and which is predicted (=without writing a simulation) by only a very small number of people.

However, the explanation is quite simple. Remember: persisting on you original choice was a 1:3 or 33% chance. This means that the other doors together had a 2:1 chance, and since one of these doors was opened without having a car behind it, the chance of the last door must be twice of 33%.

Note that the function “Make” is optimized for readability, not for speed. However, on a modern PC even 100.000 iterations should not cause a problem.

GrahamSteer found a different way to solve the problem.

Thanks to DanBaronet, KenChakawhata, GraemeRobertson and especially PhilLast, who found the easy-to-understand final explanation after having spent hours discussing this problem.

<< The Task