Social Question

LostInParadise's avatar

Brain Teaser - Do you understand conditional probability?

Asked by LostInParadise (28206points) October 15th, 2009

Probability may be the area of math that people most often make mistakes in. I knew a programmer who was convinced that because he set a limit to his casino losses on a given day that he was guaranteed to eventually come out ahead.

Many difficulties arise from a misunderstanding of conditional probability. Here is a very basic problem. See if you can come up with the correct solution.

A casino has two slot machines that are identical except that one is set to make payoffs 20% of the time and the other pays off 30% of the time. You randomly choose a machine and on the first pull you win. What is the probability that you chose the 30% payoff machine?

Observing members: 0 Composing members: 0

33 Answers

hillo's avatar

50/50
Thinks harder and questions himself, are we right?

Allie's avatar

Isn’t it ½?

virtualist's avatar

….50%..... <duh!>

Darwin's avatar

50% or 1 out of 2.

grumpyfish's avatar

So the odds that I pulled the handle on any random machine is 50%, the fact that I won has nothing to do with it. =)

hillo's avatar

I like the Monty hall problem and it’s hard to except straight away.

Cupcake's avatar

The probability that you selected machine A (p=0.5) given that you won (p=0.3) is 30%, right?

ratboy's avatar

Probably, under most conditions, or 0.6.

Jayne's avatar

I think the chance is 60%. At the beginning there are 4 possibilities: that you chose A and won (10%), that you chose B and won (15%), that you chose A and lost (40%), and that you chose B and lost (35%). Given that you won, you know the last two did not occur, so the first two possibilities remain, with the same relative probabilities.

Samurai's avatar

@Jayne That sounds smart, so I agree with it.

hillo's avatar

@Samurai
If I say my answer again but will big words will you agree with me? :)

Samurai's avatar

@hillo Well its a brain teaser, you’d think it would be something different then what is seemingly obvious. Still, it’s a plus that you were the first to answer.

hillo's avatar

@Samurai
I was only joking. I put “Thinks harder and questions himself, are we right?” because I was thinking the same as Jayne and I am still thinking but not that hard.

Samurai's avatar

@hillo I generally don’t read big word posts, but a few lines is okay.

Is the correct answer going to be reviled soon?

virtualist's avatar

@Samurai ...... I would hope the correct answer is celebrated….. not reviled !<lol>

LostInParadise's avatar

@Jayne got it right. 60% is the correct answer as is his explanation, which I will expand upon for those who might not have followed.

The initial probabilities are 50% for each machine.
There are 4 things that can happen:
Win 30% machine – .5*.30=.15
Lose 30% machine – .5*70 = .35
Win 20% machine- .5*20 = .10
Lose 20% machine – .5*.80 = .40

Since you won the only relevant cases are Win 30% machine and Win 20% machine with probabilities of .15 and .10. The chances then of choosing the 30% machine are .15/(.15+.20) = .60 = 60%

Samurai's avatar

Yey, I was right.

virtualist's avatar

@LostInParadise When I walk up to the 2 machines and unconditionally choose 1 of the machines….. there is a 50% chance that I have chosen the 30% payout machine. I do not have to ‘pull the handle ’ to know that .

The answer is still .... 50% ... <duh!>

nisse's avatar

Damn, beat me to the punchline. Here’s my more formal derivation:

We regard the slot machines status as a hidden variable S with two states;
“machine you played = 30%” => s=1
“machine you played = 20%” => s=2

We regard the evidence as the outcome of a random variable X with definite outcomes x=“win” or x=“loss”. Given in the question is P(x=“win”|s=1) = 0.3, and P(x=“win”|s=2)= 0.2. The a priori probability (the probability that you choose the right machine without any previous info) is P(s=1)=P(s=2)=0.5.

What we want is

P(s=1|x=“win”) = /According to Bayes rule/
= P(x=“win”|s=1)*P(s=1)/P(x=“win”)
= P(x=“win”|s=1)*P(s=1)/(P(x=“win”|s=1)*P(s=1)+P(x=“win”|s=2)*P(s=2))
= 0.3*0.5/(0.3*0.5+0.2*0.5)= 0.6 = 60%

or (probability of the evidence (the win) given the machine was the 30% one)*(prior probability that the machine was the 30% one)/(all the ways the evidence could have come about)

In response to the previous poster, yes when you walk up there is a 50/50 chance you pick the right machine (or the “a priori probability”), but the win gives you some evidence that you picked the right machine, the only question is how sure are you now that you’ve picked the right machine, and the answer is that you are 10% more sure that it is the right one (or 60/40 that it’s the right one).

virtualist's avatar

@nisse ....... fine…... you have answered the question he may have wanted to ask…... <g>........ that just shows you how tricky conditional shit really is !

nisse's avatar

It’s very tricky.. it fools me all the time.. the wikipedia article on bayes law and conditional probability is very good..

Sorry if i was mooching on the guy who posted, i was just studying this stuff for an exam on monday and i couldnt help myself ;P

Also see the article on the monty hall problem, that’ll really blow your mind:

http://en.wikipedia.org/wiki/Monty_Hall_problem

LostInParadise's avatar

For those who still think the answer is 50%, suppose we changed the probabilites so one machine pays 99% of the time and the other pays out once in a million times. You choose one machine and win 5 times in a row. Do you still think that there is a 50% chance of having chosen either one?

grumpyfish's avatar

@LostInParadise Ahhh, but that’s a very different case.

If I have your two machines, and I pull the handle once and win, what are the odds that I selected the machine that pays out 99% of the time? =)

(I think 60% is the correct choice, for the reasons stated above, but I think the initial choice is still 50/50—er, that is, I have a 50/50 chance of picking the machine, which makes the odds 50%, EXCEPT that I then won, which doesn’t change the odds of picking either machine, but does change the probability that the machine I chose (and then won on) is a particular machine)

nisse's avatar

@grumpyfish The a priori probability (or initial probability) that you chose either machine is still 50/50, but winning/losing gives you evidence wether you selected the correct one or not. This is called the “a posteriori” probability, or the probability that the machine is the correct one after you have seen the evidence.

If we played the the slot machine from the first question and won 1,2,3.. times in a row we would be this sure it was the right one:
60% – 69% – 77% – 83% – 88% – 91% – 94% – 96%.. as you can see we can never be 100% sure we have the right machine.

Just for the hell of it, and using the numbers from the post two steps above this one:
P(x=“win”|s=1)=.99 (99%)
P(x=“win”|s=2)=0.000001 (one in a million), and win just once, the bayesian probability that you chose right is 99.99989899% ..

virtualist's avatar

@grumpyfish Recapitulate the question before us: “A casino has two slot machines that are identical except that one is set to make payoffs 20% of the time and the other pays off 30% of the time. You randomly choose a machine and on the first pull you win. What is the probability that you chose the 30% payoff machine?”

If you had asked “What is the probability that you win on that first pull?” ...... THEN , I would agree with you…. 0.6…... You did not ask that question, however…..

nisse's avatar

@virturalist
“What is the probability that you chose the 30% payoff machine?” .. note the word “chose”.. this implies that we have played and have gained information. So he is looking for the a posteriori probability. We know that
A) We picked one machine.
B) We won.
The extra information allows us to alter our estimate of the probability that this is the right machine, the fact that we won makes it more likely (60/40) that this is the 30% machine.

You are confusing “a priori probability” and “a posteriori probability”.

Jayne's avatar

@virtualist; the probability of winning on the first pull isn’t even 60%, it is 10% + 15% = 25%. No, LostInParadise asked what he meant to (he tends to do that). The question can be restated as “given the fact that there are two machines, one of which (A) wins 20% of the time and the other (B) 30% of the time, and the fact that when one of the machines is played once it returns a win, what is the chance that this machine is machine B.”

If I were to ask, what is the probability that I was born on April 12, you would say 1/ 365 (unless you’re a jerk who remembers leap years). But if I also gave you the fact that I was born on the 12th of some month, you would say the chance is 1/12. And then, if I told you I was born on April 12, you would say the chance is 100%. Obviously, the chance was always 100%, but your previous answers were still correct, because when we talk about probability, we are just talking about how certain we can be that something is true, given what we know. Therefore, the fact that we gain the information that the machine returned a win, will obviously improve the probability that the machine we chose is the one with a greater tendency to win.

Technically, this is the exact same logic that allows us to say that what looks like a horse, acts like a horse, and smells like a horse, is probably a horse; the chance that a random organism is a horse is very small (and is analogous to the 50/50 chance of a random machine being machine B), but given a horse has a much higher chance of appearing to be a horse than a non-horse does (analogous to the higher chance of machine B winning than machine A), we can safely conclude that what appears to be a horse (a machine that wins) is probably a horse.

There, I think that should be enough examples for now.

Shuttle128's avatar

If that was the question it should have been asked in such a way that it was clear. The question originally asked was not so clear, of course that is what makes it a brain teaser.

Jayne's avatar

There really is no lack of clarity so long as you understand what probability means.

Shuttle128's avatar

Actually now that I really think about the question it makes more sense to me. My statistics class was years ago and I’ve since moved on to non-probabilistic math but dredging up some of it I can see exactly what you mean. Sorry to put up a fuss.

nisse's avatar

@Shuttle128

I think that’s what this website is about, asking questions.. :)

Allie's avatar

Oh, did I say 50%? That was a typo. I meant to hit the 6.. 60%.

grumpyfish's avatar

Although, I think I read the question as “choose” instead of “chose”—e.g., “What is the chance that I choose the machine with the 30% probability”

Love the discussion =)

Answer this question

Login

or

Join

to answer.
Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther