Intersting probability situation - NOW with script

Page 6 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

dafatha00

Diamond Member
Oct 19, 2000
3,871
0
76
I was unsure for a minute but then I understood.

Try it out if you don't believe me.

I went to the bathroom and saw 3 white towels and 1 red towel. I imagined that each towel was hidden behind a door. The first three doors each had a white towel and the last door had a red towel. First I imagined picking the first door (white towel) and not opening it. The host opens the other two white towel doors. I will benefit from switching. Next I pick the 2nd white towel door. The host opens the other two white towel doors. I will benefit from switching. Then, I pick the 3rd white towel door. The host opens the other two white towel doors. I will benefit from switching. In the unlikely event I pick the 4th door, (red towel), I will not benefit from switching. Thus, I have a 3/4 probability of getting the red towel door by switching.

Stupid example I know, but it works. :D
 

CChaos

Golden Member
Mar 4, 2003
1,586
0
0
I can't believe this thread is still going. I think there is one thing that might help convince people and I tried making it bold, but it didn't seem to help. I'll try it again anyway. Ignore the door that's opened as it doesn't mean anything. There will always be an empty door to open whether you are right or wrong. It has no meaning.

There's a 66% chance that the door you picked first is wrong. Now there's only one other door besides the one you picked first. Switch!
 

Yossarian

Lifer
Dec 26, 2000
18,010
1
81
Originally posted by: CChaos
There's a 66% chance that the door you picked first is wrong. Now there's only one other door besides the one you picked first. Switch!

I think that is the best way to explain it.
 

Haircut

Platinum Member
Apr 23, 2000
2,248
0
0
Another way to explain it.

Assume we have the situation with three doors.
The contestant is equally likely to pick any of the doors at first, so without loss of generality we can assume that the prize is behind door number 1.

The host, knowing that the prize is behind door 1 can then make the choice of which doors to expose in any given situation.
He chooses as follows:
(a) If the contestant picks door 1 he will show door 3 leaving doors 1 and 2 (he doesn't switch to win)
(b) If the contestant picks door 2 he will show door 3 leaving doors 1 and 2 (he has to switch to win)
(c) If the contestant picks door 3 he will show door 2 leaving doors 1 and 3 (he has to switch to win)

Now, as some of the people earlier were saying, there is a 50% chance he will pick the correct door given any one of these situations. The point is we don't know which situation we will end up with. We can say, however, that the contestant is twice as likely to end up in either situation (b) or (c) rather than (a), thus the probability of him having to switch doors to win is 2/3.

it is similar to rolling a die. You could say that you have a 50% chance of getting a 6 because you either get a 6 or you don't. In reality there are 5 different ways not to get a 6 and only 1 way to be 6, so the probability is 1/6.

 

Kev

Lifer
Dec 17, 2001
16,367
4
81
Originally posted by: Moralpanic
Originally posted by: Toasthead
But by eliminating one door you now have a 50% chance of being right by doing nothing. This is flawed statistics.

No you don't... your chance of being right is still the same as your original action since it was based on 3 choices.

Take an extreme example. There are 100 doors, and you pick one... then 98 of them are opened, leaving you with 2 doors left. Do you stay, or do you switch? If you stay, your chances are 1/100.. but if you switch, your chances switches to 98/100.

this is a really good explanation... i was having trouble understanding why it wasn't 50/50 but this post showed me the light
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
These kinds of questions are wasted on those that don't know/understand statistics.

You can show them models, real life practices, etc and they still doubt what real outcomes are.

There are alot of things under the Queueing Theory topic that seem unbelievable but work out quite nicely.

One of the easiest set up questions is "How many people would you need to ask before you find two with the same birthday?" (month and day)....most common answer is 180, and 90 is the second most I believe....in reality it's around 22 or 23 people

Anyone can go to a mall and test this with a pad of paper and asking passers by. The only thing you must make sure is you don't ask the same person twice or what you are trying to do.
 

Netopia

Diamond Member
Oct 9, 1999
4,793
4
81
Ok... I didn't read the whole thread, but I'm going to try my hand at explaining why statistically you should pick the OTHER door. BTW... I've never had college statistics or probability, so I'm just doing my best.

First, let's assume that there are 1,000,000 doors. You have to pick just one. The odds of your picking the CORRECT door are litterally a million to one. The VAST probability is that you have choosen the WRONG door. There is no way around that. 999,999 of the doors are wrong and you have to try to pick JUST the SINGLE right one..... so you pick one and the odds are overwhelmingly high (999,999 to 1) that it is the wrong door.

So... you've got this door that is STATISTICALLY probably the wrong door. The game host now eliminates all of the other doors except the one which you choose (which was a million to one shot) and one other one and he guarentees that one of them is the correct door. You know two things...

1) The chances of your door being the right one were about a million to one.
2) There is now a 100% possibility that one of the doors has a prize behind it.

Since the odds were overwhelming that you DIDN'T choose the one door out of a million... and it doesn't magically change... the odds are still that it is the wrong door. If they eliminate all the other doors but one, yours was still probably the wrong door to begin with so you are better off choosing the other door.

Another way to look at it would be if the choice were to keep your door or pick ALL the other 999,999. We would all go for the other 999,999 because we would feel like our odds were better.... well, when he eliminates all but one of the 999,999 we are still making the same choice.

Did I come close?

Joe
 

Haircut

Platinum Member
Apr 23, 2000
2,248
0
0
Netopia, you may never have done any college probability but you still have a better understanding of the problem tham some people in this thread who claim to have probability training ;)
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
Net, nice understanding....you are thinking along the right lines.

some of the variables with the monty deal include he knows the doors, and he picks the wrong one always.

people have a hard time understanding alot of these topics because they don't follow 'common sense' type progressions and you get cases where 2+2=3 or 5 :)
 

Netopia

Diamond Member
Oct 9, 1999
4,793
4
81
Netopia has always been one of the smartest AT members.

I don't know that I deserve that level of praise... but I'd trade whatever "smarts" I have for wisdom any day!

Joe
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Ok, I'll admit to not reading the whole thread ... and I see the logic of nep's post, and don't know how to explain it away, but as I see it, the second choice is independent. All you know after the host opens a door is that you now have a 50% chance of being right, rather then a 1/3rd chance. But people seem pretty emphatic, so I wrote myself a little python script. It confirms my logic, switch doesn't help:

edit: nm, original script had a bug. New script shows 66% win with switching. I'm still not mentally comfortable with that result...

#!/usr/bin/python

import whrandom
import sys

#Pass a 1 (always switch) or 0 (never switch) on the command line
switch = int(sys.argv[1])

size = 100000

win = 0
lose = 0

if switch:
____print "Always Switch"
else:
____print "Never Switch"

print "Samples:\t", size

for i in range(size):
____prize = whrandom.choice((0, 1, 2)) #pick a random door for the prize
____pick = whrandom.choice((0, 1, 2)) #contestant picks a random door

____opened = whrandom.choice((0, 1, 2)) #Host picks a random door to open
____while opened == pick or opened == prize: #make sure the opened door is not the prize or the picked door
________opened = whrandom.choice((0, 1, 2))

____if switch: #Pick the other door
________pick = (pick + 1)%3
________if pick == opened:
____________pick = (pick + 1)%3

____if pick == prize:
________win += 1
____else:
________lose += 1

____#Make sure something didn't get screwed up
____if opened == prize or opened == pick or pick > 2 or pick < 0:
________print "ERROR"
________print prize, opened, pick
________sys.exit()

print "Win:\t", win, "\t", float(win)/size
print "Lose:\t", lose, "\t", float(lose)/size
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
There is a main caveat: Monty is guaranteed to show you a bad door every time.

I think in the real game show Monty could pick the right door, but I am not sure...I would assume he knew the arrangement...it would be a touchy legal issue

This is the key to understanding this problem.

To read more about this and the setup of it/equations:
http://math.rice.edu/~ddonovan/montyurl.html
 

Indolent

Platinum Member
Mar 7, 2003
2,128
2
0
Everyone that tries restating the same problem keeps restating it the same way. I understood why it works a while ago when I saw the problem at a different forum. Try this example for the still (I don't see how) confused.

You have the choice of the three doors. In your head, pick two of them that you want to see. Outloud, pick the door that you never want to see. One door opens revealing one of your original picks. SWITCH to reveal the second door that you picked. Result, you get to see two out of the three doors, how could this possibly be a 50/50 chance? It's NOT.
 

ElFenix

Elite Member
Super Moderator
Mar 20, 2000
102,402
8,574
126
Originally posted by: ergeorge
edit: nm, original script had a bug. New script shows 66% win with switching. I'm still not mentally comfortable with that result...

and thats why its a fun question and why they do things like that on the game show. the fact of the matter is the second part IS dependent on the first.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Man, I posted about this over a year ago and didn't get this much feedback! I wrote a perl script that emulate the experiment and it shows
that it is clearly 2/3. I don't know why any of you are arguing the logic.

Code:
#!/usr/bin/perl -w

srand($$|time);

$matches = '0';
@Set = qw(1 2 3); 
$count = '1000000';
populate();

for ($i=0;$i<$count;$i++) {
  $temp = int(rand($#Set+1));
  $guess = $Set[$temp];
  if ($Test[$i] == $guess) {
    $matches++;
  }
} 
print("Trial 1 successes = $matches\n");

# Populate Test array for 2nd test
populate();
$matches = '0';

for ($i=0;$i<$count;$i++) {
  $temp = int(rand(@Set));
  $guess = $Set[$temp];
  $matches += opendoor(); 
}  

print("Trial 2 successes = $matches\n");

sub populate {
  for ($i=0;$i<$count;$i++) {
    $temp = int(rand($#Set+1));
    $Test[$i] = $Set[$temp];
   # print("$Test[$i]");
  }
}

sub opendoor {
  # Cases where guesser chose right on the first try means he will lose
  # if switches doors. 
  if ($guess == $Test[$i]) {return 0;} else {return 1;}
}
 

TallBill

Lifer
Apr 29, 2001
46,017
62
91
lol, i just got in a HUGE argument with my uncle over this problem. he wasnt buying the 2/3rds probability. I offered a 1000 dollar bet, and he agreed. Finally after about an hour, he got it. Of course i never brought up the money, but now hes taking me to the us open practice round tomorrow, and i got a lil respect from him :p
 

DAPUNISHER

Super Moderator CPU Forum Mod and Elite Member
Super Moderator
Aug 22, 2001
32,039
32,528
146
Better Probability or not, I'd stick with the door I picked initially because if I flaked out and chose the wrong door when I had the right one to begin with just because of mathimatical probability I'd first kill every math professor in my area then myself :p
 

TallBill

Lifer
Apr 29, 2001
46,017
62
91
Originally posted by: DAPUNISHER
Better Probability or not, I'd stick with the door I picked initially because if I flaked out and chose the wrong door when I had the right one to begin with just because of mathimatical probability I'd first kill every math professor in my area then myself :p

you suck then. i'd rather have twice the odd's workin with me, but your mentality would keep the game alive. If everyone switched, it wouldnt be much of a game.
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
The problem isn't that people are idiots, is that these types of problems are difficult for people to understand, the same thing with taking parts of something and building a 3d model with it (like those paper folding questions on IQ tests).

Casinos work the same way, they add decks or pay out slightly different odds than what happens in a game in real life...however there is always one game that is a guaranteed winner.

This game may change day to day or even during the day as the odds change....it's not a get rich quick scheme as the 'win' is only about 1 cent per dollar at best, but that is to cover high rollers dropping 50k+ per hand or roll. My teacher in queueing theory (who wrote the book and also worked for original Bell Labs devising most of this theory) has been asked to leave certain casinos for winning, he said his better bet was the $50,000 per seat he gets giving classes in this for big business. :)

There are several problems such as the birthday problem above I mentioned, and this one that one can make some money betting on...however you will have to really explain the results and prove them to collect because just like here (which I believe is a group of slightly above average intelligence), people do not believe it and will think your model is flawed.
 

DAPUNISHER

Super Moderator CPU Forum Mod and Elite Member
Super Moderator
Aug 22, 2001
32,039
32,528
146
Originally posted by: TallBill
Originally posted by: DAPUNISHER
Better Probability or not, I'd stick with the door I picked initially because if I flaked out and chose the wrong door when I had the right one to begin with just because of mathimatical probability I'd first kill every math professor in my area then myself :p

you suck then. i'd rather have twice the odd's workin with me, but your mentality would keep the game alive. If everyone switched, it wouldnt be much of a game.
You seem to think I give a flyin' f*ck what you'd rather do Bill ;)