Saturday 11 November 2017

The (counter-intuitive) Monty Hall Problem

There are some things in life that are really counter-intuitive.

We accept many of these because the evidence is right there before our eyes and we are used to them (e.g. a box in my front room that displays a moving image received through thin air? You gotta be kidding me right?)

But some, less common, phenomena still have the capability to confuse us. A good example of this is the "Monty Hall Problem", which is often stated as :


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 [but the door is not opened], and the host, who knows what's behind the doors, opens another door [that does not have the car behind it], 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?


Intuitively, one feels that switching door should not make any difference - you have a 50:50 change either way.

But, weirdly, this is not the case - in reality, you have a much higher chance of getting the car if you change doors.

I know, I know, it seems to go against common sense, and indeed when this conundrum was published in Parade magazine, some 10,000 readers, including almost 1,000 with PhD's wrote in to complain that the article was wrong and that changing doors did not make any difference.

With the problem being so simple, NSB decided to simply knock up an excel spreadsheet and see what happens. The geeky stuff is at the bottom of the post, but the take-home-message is that running the problem 100 times gives the following results :

Never switch door : Win 35% of the games
Always Switch door : Win 65% of the games
Toss a coin as to whether to switch or not : Win 55% of the games



Crikey, switching really does improve your chances of winning! How spooky!

Just goes to show how the human mind can be tricked. The Wikipedia article on the Monty Hall Problem is surprisingly long and discusses many of the psychological issues related to how people perceive the problem.

Here comes the Geek bit (from a random line of the spreadsheet, line 3 in this case) :

Column B : Randomly choose which door the prize is behind
Excel Formula: =RANDBETWEEN(1,3)

Column C : Contestant randomly pick a door
Excel Formula: =RANDBETWEEN(1,3)

Column D : Outcome if contestant sticks (win=1)
Excel Formula: =IF(C3=B3,1,0)

Column E : Outcome if contestant switches sticks (win=1)
Excel Formula: =IF(D3=1,0,1)

Column F : Toss to switch (stay=1)
Excel Formula: =RANDBETWEEN(1,2)

Column G : Outcome based on Toss in Column F (win=1)
Excel Formula: =IF(F3=1,E3,D3)

Copy the above onto as many lines as you want and then total up the wins from the different strategies.

No comments:

Post a Comment