• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

The quizz and the price behind a door

 
Bartender
Posts: 5465
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chances are that this problem is known to everyone, but nevertheless I still find
it very much fun.

The problem was presented in a national newspaper about 15 years ago. And believe
it or not, it then led to an enormous discussion that went on for about two weeks,
after which the newspaper put an end to this. Professors, doctors, lawyers,
plumbers, the local idiots, all disagreeing, gee, that was some discussions going on!

The situation is: you've just won a television quizz, and it is time to decide
on the price. It goes like this: you see three doors. Behind only one of then
is a huge price, but behind the other two there's just thin air.
You must choose a door. The quizzmaster, knowing which door has this price,
then opens a door of which he knows that there is no prize.
You then are given the opportunity to switch to another door, or stick to
your initial choice of door.

The question is: should you switch or not?

Now, mathematiccaly this is not difficult to solve, although many people will still
find the correct answer hard to believe. But my question is:

write a program that simulates this situation, and check that the outcome of your
simulations are in line with the correct answer.

Have fun!

Greetings,
Piet
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piet Souris wrote:
The question is: should you switch or not?



Anyone who is a fan of "let's make a deal" knows that you should absolutely switch -- which is why the current version of the game show, doesn't give the option to switch anymore.

Henry
 
Piet Souris
Bartender
Posts: 5465
212
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Never heard of this "let's make a deal" program. But I gather now that that newspaper was talking about that show!
Well, if all of the USA knows about this thing, this kind of spoils it a little bit...

How does it go now then? Does it now start with an open door, then you make a choice and THEN you can switch if you like?

If so, I have another question (for you, Americans ;) ): this last situation gives a different outcome compared to the original situation.
So in these two situations the information implicitly supplied must be different. What is this difference in information?

Greetings,
Piet
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The additional information is just what you said:

The quizzmaster, knowing which door has this price,
then opens a door of which he knows that there is no prize.

 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piet Souris wrote:
How does it go now then? Does it now start with an open door, then you make a choice and THEN you can switch if you like?



The current version of the game no longer has the option to switch. You pick one of the three doors. The game opens one of the other two (not picked) doors that isn't the grand prize. Then it opens one of the two remaining doors followed by the last door. And there isn't any particular order with the second and third doors to be opened.

Obviously, by the time the second door is opened, you realized if you won the grand prize or not.

Henry
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:The additional information is just what you said:

The quizzmaster, knowing which door has this price,
then opens a door of which he knows that there is no prize.




And it is the knowledge of which door has the prize that doesn't change the odds. Meaning... You pick one of the doors, hence, you have 1/3 chance of being correct and 2/3 chance of being wrong. The quiz master can open a door that don't has the prize, regardless of whether you are right or wrong. This means that you still have a 1/3 chance of being correct and 2/3 chance of being wrong... so, if you switch, you now have a 2/3 chance of being correct and a 1/3 chance of being wrong.

Henry
 
Master Rancher
Posts: 4806
72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piet Souris wrote:The problem was presented in a national newspaper about 15 years ago. And believe
it or not, it then led to an enormous discussion that went on for about two weeks,
after which the newspaper put an end to this.


One reason discussion can go on for so long is that it's usually stated ambiguously, as it is above. It needs to be made clear that the game show host always opens a door and offers the contestant a choice. It's part of the rules, and the host doesn't get to choose whether or not to do it. If there were a choice, then the problem would be unsolvable (without knowing the host's motivation). As it is though, the host is compelled to give the contestant new information which the contestant didn't have when they first made their selection; this information makes it statistically advantageous to switch.
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, this problem is very famous is one of the problems where the mathematical proof seems antithetical to common sense for most people. For most people, common sense says "Ok, so I had 1 out of 3 chance of picking right and now I have 1 out of 2 chance no matter what door I pick. So, the answer is doesn't matter" Intuitively, "doesn't matter" feels right. Switching doors just seems so un-intuitive. However, if you run through the various combinations, and really think about the problem you realize that switching door is the one that gives you highest chance of success.

 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this the same as the Monty Hall problem?
 
Mike Simmons
Master Rancher
Posts: 4806
72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, the very same. Discussed here multiple times, as well.

Monty Hall's dilemma
Let's Make a Deal Quiz
 
Ranch Hand
Posts: 163
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:
And it is the knowledge of which door has the prize that doesn't change the odds. Meaning... You pick one of the doors, hence, you have 1/3 chance of being correct and 2/3 chance of being wrong. The quiz master can open a door that don't has the prize, regardless of whether you are right or wrong. This means that you still have a 1/3 chance of being correct and 2/3 chance of being wrong... so, if you switch, you now have a 2/3 chance of being correct and a 1/3 chance of being wrong.

Henry



I'm stumped.

Before the host's reveal, I have a 1/3 chance of guessing correctly.

After the door is revealed I'm now faced with two doors. Two choices. Shouldn't I have a 1/2 chance of guessing correctly?
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bill Clar wrote:Two choices. Shouldn't I have a 1/2 chance of guessing correctly?



Two choices*, but that doesn't mean they have the same probability. You've been given no reason to believe that your original choice was more or less likely to be right than it was originally.

I find that one way of "tricking" your intuition into seeing it correctly is to exaggerate the problem. There are 1000 doors, with a prize only behind one of them. You choose one. The host then opens 998 other doors that don't have a prize, leaving only two left. Do you still think it's 50/50 that you picked the right one in the first place?

(* well, one choice, two options, but that's a whole other area of pedantry )

 
reply
    Bookmark Topic Watch Topic
  • New Topic