Probability question that is driving me nuts!

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

gustavo

Senior member
Jul 25, 2001
247
0
0
Ok, lets translate it...

the population size N = 20
Lets choose right side as the success character, so the number of successes in the population M = 1
You take 19 elements as your sample, so n = 19

Use the formula in the book now and get h(0; 19,1,20)

h(0; 19,1,20) is the probability of the last man in the bus being that sitting on the right.
1 - h(0; 19,1,20) is the probability of the last man be one of those on the left.

Now post the formula to us (I don?t remember it by hearth) and then your results....

REMEMBER, we assume the man to go down each time is selected at random and each man has the
same probability of being selected, not minor detail !!!!!

Gustavo.-
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
gustavo - I hate you!;) It seems like these type of things come natural to you. That's quite a talent to be able to cleary see the problem while the rest of us twist it into something it isn't :)

I will use c to sympolize (CHOOSE)

h(x; n,M,N) = ((M c x)*( (N-M) c (n-x) )) / (N c n)

h(0; 19,1,20) = ((1 c 0) * ( (20-1) c (19-0) )) / (20 c 19)
= (1 * (19 c 19)) / (20 c 19)
= ( 1 * 1) / 20
= 1/20 QED

 

gustavo

Senior member
Jul 25, 2001
247
0
0
Congratulations Mucman: you learned the hypergeometrical distribution, you got the right answer by yourself and now know a little more statistics.

Now if have enough time, take 20 identical balls and put a mark on 1 of them, put all balls in a bag and take out at random 19 out of the 20, repeat the experiment 100 times and see how many of the 100 times the last ball is the one with the mark, you should get approx 5 times the marked ball left, tell us how far from the expected result you are ...

Agent004: if this is what you were trying to explain, I dont think you are good explaining...... However you were correct at the connclusion I quote

<< So A & B is different from C & D >>



Regards Gustavo.-
 

camara120

Senior member
Oct 9, 1999
406
0
0
I would have to bet that the last person to leave the bus is sitting on the left side.

Mucman's profile says he's from Canada

I'm making some assumptions here:

1) He really is from Canada (where they drive on the right hand side of the road)
2) He is talking about a bus in North America with the steering wheel on the left side of the vehicle
3) The bus is being controlled by a driver physically in the vehicle (not remote controlled)
4) There is only one bus driver on the bus
5) The bus driver is the only one that drives the bus
6) The bus driver doesnt live in the bus =)
7) The bus driver doesnt leave the bus unattended

Ok, thats a lot of assumptions... but there wasn't a lot of data to begin with. I think the last person to leave the bus is the bus driver. It's not impossible for something else to happen, but my bet remains the same.
 

Mingon

Diamond Member
Apr 2, 2000
3,012
0
0
Excellent thread, reminds me of the russian roulette question in that lateral thinking helps
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
gustavo - LOL, I trust that the math is correct :) Hopefully someone here will be a good sport and test it out for us :).

camara120 - Smart, very smart :). Of course with these problems you are rule out any common sense.
 

Agent004

Senior member
Mar 22, 2001
492
0
0


<< Congratulations Mucman: you learned the hypergeometrical distribution, you got the right answer by yourself and now know a little more statistics.

Now if have enough time, take 20 identical balls and put a mark on 1 of them, put all balls in a bag and take out at random 19 out of the 20, repeat the experiment 100 times and see how many of the 100 times the last ball is the one with the mark, you should get approx 5 times the marked ball left, tell us how far from the expected result you are ...

Agent004: if this is what you were trying to explain, I dont think you are good explaining...... However you were correct at the connclusion I quote

<< So A & B is different from C & D >>



Regards Gustavo.-
>>



You will understand what I am trying to explain if you do understand the 3 doors example, which is the whole point of me introducing it. I also got the correct answer too :p

Why make it more harder than it really is ;)
 

gustavo

Senior member
Jul 25, 2001
247
0
0
Agent004:

You are conceptually wrong, the fact that the result of your explanation is the same as that arrived by Mucman is just a coincidence.

That coincidence arises by the fact that Mucman brought in easy numbers, but if the numbers were a bit more complicated, your explanation would not come to the correct probability.

This is a conceptual error to believe that the probability of a given event is influenced in any way by the probabilities that existed in previous states, and you base your calculations on this assumption.

I could add that regarding the 3 doors example, CTho9305 is wrong:
1) The probability of winning the car if you stick = 0.5
2) The probability of winning the car if you change = 0.5
3) So there is no preferred action if you wished to win the car.

And the theoretical reason is assuming a completely random decision, with the 2 doors still closed having the same probability of having the car behind we should use the binomial distribution, and what happened before with the first door is irrelevant

Gustavo.-

 

bizmark

Banned
Feb 4, 2002
2,311
0
0


<< I could add that regarding the 3 doors example, CTho9305 is wrong:
1) The probability of winning the car if you stick = 0.5
2) The probability of winning the car if you change = 0.5
3) So there is no preferred action if you wished to win the car.

And the theoretical reason is assuming a completely random decision, with the 2 doors still closed having the same probability of having the car behind we should use the binomial distribution, and what happened before with the first door is irrelevant
>>



If you want to ignore information that's given to you for free, you can. But if you want to win the car, you won't.

There was a big to-do about this question in the "Ask Marilyn" newspaper column here in the U.S in early 1991. Professional mathematicians wrote to her, telling her that her answer was wrong. She proved them all wrong (and printed their names and universities in her column, along with their nasty comments!). I present here part of Marilyn's arguments which are quoted in Chapter 6, "Getting the Goat", from the book "The Man Who Loved Only Numbers" by Paul Hoffman.

There's a nice chart in the book that summarizes everything nicely, that I unfortunately cannot replicate here because the font makes everything too hard to make everything line up straight :(.

So I'll just quote from the book.

<<"When reality clashes so violently with intuition," vos Savant responded in her column, "people are shaken." This time she tried another tack. Imagine, she said, that just after the host opens the door, revealing a goat, a UFO lands on the game-show stage, and a little green woman emerges. Without knowing what door you originally chose, she is asked to choose one of the two unopened doors. The odds that she'll randomly choose the car are fifty-fifty. "But that's because she lacks the advantage the original contestant had -- the help of the host.... [comment: earlier they stated that the contestant initially chose Door #1.] If the prize is behind door No. 2, the host shows you No. 3; and if the prize is behind door No. 3, the host shows you No. 2. So when you switch, you win if the prize is behind No. 2 or No. 3. YOU WIN EITHER WAY! But if you don't switch, you win only if the prize is behind door No. 1.">>

So basically the idea is this: the position of the car is SET from the beginning. It won't move after you've guessed. Say you guess Door #1. Then Monty shows opens either Door #2 or Door #3 -- one which does NOT have the car. Say he opens #3. This is ADDED INFORMATION that you should use to help you make your decision. It is now NOT random between #1 and #2 which door the car is behind. The host COULD have opened #2, but he didn't.

This is what Agent004 meant by applying this door thing to the bus situation. There's a nonuniformity of information: just as the contestant knows the what door he originally picked and the little green woman does not, A and B know about the original distribution of men on the bus and C and D do not.



<< gustavo - I hate you! It seems like these type of things come natural to you. That's quite a talent to be able to cleary see the problem while the rest of us twist it into something it isn't >>



The hypergeometric function happens to be the function used for very specific applications, namely of the type we have here and of the type that I generalized to: having two different types of balls in a pot: m white, N-m black, N balls total. Drawing them out randomly without replacement, until n are drawn. Then we have a big equation with three choose functions.

But look at what you had: 1 choose 0, 19 choose 19, 20 choose 19. These are, respectively, 1, 1, and 20. If we were dealing with complicated numbers here, then using the formula would be okay.

But the simplicity of the situation told us that we don't need such big functions to figure this out. Simpler arguments worked well (such as counting and symmetry). Sure, when you have the tools -- a function which fits exactly the type of distribution that you're looking at -- there's no reason to not go ahead and use them; but when there is no tool (or you don't know of one), the simpler, straightforward way of thinking will get you where you need to go.
 

gustavo

Senior member
Jul 25, 2001
247
0
0
wbwither:

I don?t know the "Ask Marilyn" newspaper column, but she is wrong, you admitted "Professional mathematicians wrote to her, telling her that her answer was wrong." Your quote in not a prove in any way, sounds like a cheap columnist trying to get readers, ask a professor of your confidence...

Look at the problem this way: the participant always had 1/2 chance because the host choice was not at random, he selected one of the doors with a goat behind, so the only choice is between the originally chosen by the participant and the third door still unselected, the participant only has 2 doors to choose from.

All this would be different if the host choice were at random, but it is explicitly stated that it is not. Probability only works with random events, take ever this into account

Regarding that simpler arguments worked well tell me please what would be the probability if 15 of the men on the bus were sitting on the left an 5 on the right at the beginning, that after the 15th stop you get 2 men on the left and 3 men on the right without using the formula Mucman used.....

Now I want to ask you all something: I read several times but still don?t know what you mean when you say "LOL" ?

Thanks Gustavo.-
 

bizmark

Banned
Feb 4, 2002
2,311
0
0


<< I don?t know the "Ask Marilyn" newspaper column, but she is wrong, you admitted "Professional mathematicians wrote to her, telling her that her answer was wrong." Your quote in not a prove in any way, sounds like a cheap columnist trying to get readers, ask a professor of your confidence... >>



The point was that she was right and the professional mathematicians were wrong, as they were forced to admit after she finally made her point clear. The chapter that I quoted was given to me in a class taught by a very highly respected professor of Statistics. This prof spent part of a lecture discussing this problem to emphasize the non-intuitiveness of some statistical problems. Although, I agree with you that this is maybe not so much Statistics as it is Logic or something. BTW (By the Way) Marilyn vos Savant is listed in the Guinness Book of World Records as the person with the highest recorded IQ in the world. Which doesn't mean that she's always right, of course, but still.... ;)



<< Look at the problem this way: the participant always had 1/2 chance because the host choice was not at random, he selected one of the doors with a goat behind, so the only choice is between the originally chosen by the participant and the third door still unselected, the participant only has 2 doors to choose from.

All this would be different if the host choice were at random, but it is explicitly stated that it is not.
>>



Yes but the key thing is that the host selects one of the doors with a goat behind, that the contestant did not originally choose. So the contestant had three choices and picked one. The host then tells the contestant which of the non-picked doors was wrong. I will try to draw out the possible scenarios that were in the chart that I talked about before.

In all of these scenarios we assume without loss of generality that the Contestant always picks Door #1 initially.

Scenarios 1, 2, and 3: The Contestant always initially picks Door #1, and he sticks with his original choice of Door #1 after the host opens the door.

Scenario 1) The car is behind Door #1. C picks #1, H opens either #2 or #3, C stays with #1, C wins.
Scenario 2) The car is behind Door #2. C picks #1, H opens #3, C stays with #1, C loses.
Scenario 3) The car is behind Door #3. C picks #1, H opens #2, C stays with #1, C loses.

Scenarios 4, 5, and 6: The Contestant always initially picks Door #1, but he switches his guess after the host opens the door.

Scenario 4) The car is behind Door #1. C picks #1, H opens either #2 or #3, C switches answer to either #3 or #2, C loses.
Scenario 5) The car is behind Door #2. C picks #1, H opens #3, C switches to #2, C wins.
Scenario 6) The car is behind Door #3. C picks #1, H opens #2, C switches to #3, C wins.

So we see that in Scenarios 1, 2, and 3 (the "non-switching" scenarios) the contestant wins in 1 out of 3 possible outcomes. But in Scenarios 4, 5, and 6, (the "switching" scenarios) the contestant wins in 2 out of 3 possible outcomes.



<< Regarding that simpler arguments worked well tell me please what would be the probability if 15 of the men on the bus were sitting on the left an 5 on the right at the beginning, that after the 15th stop you get 2 men on the left and 3 men on the right without using the formula Mucman used..... >>



Agreed, and I believe that I stated as much: "If we were dealing with complicated numbers here, then using the formula would be okay." I guess not just "okay" but even "necessary". But with just one man on the right, and choosing his probability that he'd be the LAST man off, things were simple enough. Again, that formula is highly specialized for situations just such as this one.

"LOL"="Laughing Out Loud"

edit: oops, misspelled "laughing" :eek: How the hell do we get an "f" sound out of a "gh"?!
edit2: added a new section to fully explain the reasoning.
edit3: here's a link to an interesting article on the Monty Hall Dilemma that was in the New York Times. It shows that she was right, under the assumptions that she made and that we've had here. However, one assumption that we made that was possibly WRONG in relation to the actual show is whether the Host would ALWAYS open another door or not. In other words, is the host malevolent? Only Monty Hall himself can tell us. He does in the article.
 

Agent004

Senior member
Mar 22, 2001
492
0
0
Thanks for wbwither's detailed explaination of my reasoning:) . Thank you ;)

I thought LOL = Lots Of Laughter :p

Like that made a different.
 

gustavo

Senior member
Jul 25, 2001
247
0
0
wbwither:

Thanks for your explanation about LOL, very helpfull.

Regarding the contest, I sincerely disagree for the reasons stated above by myself, but as you said there were experts matematicians arguing about the issue even a recognized statistics professor backs your point.

I disagree but not beeing an expert and your having that recognized statistics professor backing you up, I have to give you the point. Anyway, I post what my scenarios would be:


The Contestant picks Door #1:

1) The car is behind Door #1, C switches, C loses.
2) The car is behind Door #1, C sticks, C wins.
3) The car is not behind Door #1. C switches, C wins.
4) The car is not behind Door #1. C sticks, C wins.

But you win...LOL

Gustavo.-

 

bizmark

Banned
Feb 4, 2002
2,311
0
0


<< I disagree but not beeing an expert and your having that recognized statistics professor backing you up, I have to give you the point. Anyway, I post what my scenarios would be: >>



Look at the probabilties associated with each of these scenarios (assuming that the car was randomly assigned to 1, 2, or 3):




<< The Contestant picks Door #1:

1) The car is behind Door #1, C switches, C loses.
2) The car is behind Door #1, C sticks, C wins.
3) The car is not behind Door #1. C switches, C wins.
4) The car is not behind Door #1. C sticks, C wins.
>>



Probability for Scenario 1: 1/3.
P{2}=1/3.
P{3)=2/3.
P{4}=2/3.

So by switching, the contestant is essentially betting that it was behind door #2 OR door #3. Thus increasing his probability of winning from 1/3 to 2/3.



<< I disagree but not beeing an expert and your having that recognized statistics professor backing you up, I have to give you the point. [...]But you win...LOL >>



two things: 1) Just because someone in authority says something does not mean that it's right (look at all the professional mathematicians who got this wrong! She said that she got around 10,000 letters from people, many of whom were Ph.D.'s.). It's only right if you think about it and accept it as being right. 2) If anybody wins here, it's you: you have learned something new. I guess that in the same sense, I have won too, because I really didn't understand the problem very well before I had to write it all up for this. It makes a lot more sense to me now than it did when I was in the class. Understanding difficult problems = good. :)
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
My prof explained the problem saying that is was 2/3 probability of winning if you switched...

I am going to try to write a simple application that will perform this test and see what the results are.
 

JingP

Member
Mar 13, 2002
186
0
0
the bus question is much easily explained.

There are 20 ways for the person on the right to get off. Only one of they yielding a "success"

so 1/20 or 5%.



If someone can help me out with my resistor problem on the "Where does the power go" thread go, that would be greatly appreciated.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Here is the PERL script for the 3 doors problem. It looks to me like you do have a 66% chance of winning if you switch!

#!/usr/bin/perl -w

srand($$|time);

$matches = '0';
@Set = qw(1 2 3);
$count = '100000';
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 == '1' && $Test[$i] == '1') {return 0;}
elsif ($guess == '1' && $Test[$i] == '2') { return 1;}
elsif ($guess == '1' && $Test[$i] == '3') { return 1;}
elsif ($guess == '2' && $Test[$i] == '1') { return 1;}
elsif ($guess == '2' && $Test[$i] == '2') { return 0;}
elsif ($guess == '2' && $Test[$i] == '3') { return 1;}
elsif ($guess == '3' && $Test[$i] == '1') { return 1;}
elsif ($guess == '3' && $Test[$i] == '2') { return 1;}
elsif ($guess == '3' && $Test[$i] == '3') { return 0;}
}

Here are my results after a couple runs (Trial 1 is not switching,
and Trial 2 is switching) :

bash-2.05a$ perl 3doors.pl
Trial 1 successes = 33622
Trial 2 successes = 66663
bash-2.05a$ perl 3doors.pl
Trial 1 successes = 33065
Trial 2 successes = 66393
bash-2.05a$ perl 3doors.pl
Trial 1 successes = 33229
Trial 2 successes = 66729
bash-2.05a$ perl 3doors.pl
Trial 1 successes = 33680
Trial 2 successes = 66708
bash-2.05a$ perl 3doors.pl
Trial 1 successes = 33229
Trial 2 successes = 66729





 

bizmark

Banned
Feb 4, 2002
2,311
0
0


<< Here is the PERL script for the 3 doors problem. It looks to me like you do have a 66% chance of winning if you switch! >>



Wow, very nice. The NYT article I linked earlier mentioned computer simulations that got the same results.

Quite fun to get results matching those that you expect :):):)
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Glad someone appreciates my PERL prowess ;). I could have made the opendoor() sub routine smaller but I figure it would make the answer easier to see if I just showed all combinations.