Amazon Interview Question
Software Engineer / DevelopersThis question comes in the movie 21 where he gets bonus points for getting the answer right which is to switch and the problem is of conditional probability
you have to swicth for 2/3 posibilities
initially all doors have 1/3 posibility,
aft u select the unopen door have 2/3 posibility....
......... any Wrong?
I think the answer is 50/50.
After you have already selected a door, the host opens one door which does not have the prize. So now, Out of the 2 doors which are closed, one has the prize, one doesn't.
So your chance of winning if you switch is 1/2.
as if you are the creator of the problem ... what was your answer before reading the wiki genius ???
Huh? At least read the other solutions before posting something. If you don't want to 'look', you are free to do so, but avoid posting unless you have something new to add, or need to ask a clarfication/new question.
Especially do so, when the majority of the other posts disagree with what you are about to write.
If everyone just keeps adding crappy "me thinks..." posts, there will be too much noise and too little information. Capisce?
Idiot.
The answers is
If I choose to switch chances of winning is : 66.6%
If I go with not switching the cahnces of winning is : 33.3%
It is all depond upon variable change...
when initially they offer me to choose one of the door the chances are 33.3%
when he opens one door chances are 66.6% when make a switch.
There are three boxes with two empty and one with some gift.
So considering above,
Selection of one empty box is 2/3 out of 3 boxes.
1. So suppose person selected the gift packed box out of three (which is only one out of three, 1/3 probability) and then host opens the empty box. In this case, if person choose the other box, he/she will get empty box.
2. Now, probability of choosing empty box by person is 2/3 and if suppose person choose an empty box and host opens another empty box, then switching to last unopened box will be gift packed.
So to conclude switching of box will always give person the maximum probability to win i.e. 2/3. There will be two cases, in which person can choose empty box, and switching will help him to get gift packed box and on the other hand, there is only one possibility to choose gift packed box and only one case, which could upset the person
The issue here is that we do not necessarily know if the host's behavior is a one-off stunt or a consistent tradition.
If we assume that every night the show runs the host ALWAYS opens a door with a goat (choosing the goat uniformly at random if the player has guessed the correct door), then the answer is that switching does double one's chance of winning.
If we fail to make that assumption, we cannot answer the question. Suppose the host only opens another door when the player has chosen the correct door. For all we know, maybe that's what he does! But then the answer is obviously different.
Nasty problem, must clarify assumptions. The "Three Prisoners Problem" is more clearly formulated.
This has become a classic, referred to as the Monty Hall problem.
- LOLer July 16, 2009