#Monty Hall Problem
1 messages · Page 1 of 1 (latest)
- Do not ping the Moderators, unless someone is breaking the rules.
- Do not ping the Helper Moderators, unless there is a conflict between helpers.
- Do not ping other members randomly for help.
- Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
- Wait patiently for a helper to come along.
- If the Helper has answered your question, remember to thank them with the Mathematics Ranks bot and close the thread with:
+close
Feel free to nominate the person for helper of the week in #helper-nominations
If you're happy with the help you got here, and the server overall, you can contribute financially as well:
$$P(A_1|A_2)=\frac{P(A_2|A_1)\cdot P(A_1)}{\sum P(A_2|A_j)\cdot P(A_j)}$$.
Tony
The probability of P(A_2|A_1) should be 1 since the car is already revealed to be in door 1
What do you mean "if you calculate it"?
If I use bayes theorem it gives me 2/5
What do you mean "if you use bayes theorem"?
Okay so I set A_1="..." and so on
Now P(A_2|A_1) should be equal to 1 cuz if I already know where the car is then there must be goats left in both of the doors
P(A_j)=1/3 no matter what j is
So P(A_j) cancels out with P(A_1)
Left is 1/sum(P(A_2|A_j))
P(A_2|A_1) is 1, P(A_2|A_2) is also 1 and P(A_2|A_3) is 1/2 since we have two doors left: either car or goat
1+1+1/2 is 5/2
1/(5/2) is 2/5
The right answer should be 1/3 tho
Okay, it feels like you confused yourself primarily by using this weird notation.
May I know what do you mean?
This one?
I mean that A_1 means "the money is behind door 1", but A_2 means "a goat is behind door 2".
Also, you're conditioning on the wrong event.
Okay, do you understand the word "conditioning" here?
Isn't it like if something kind of depends on something else
That works.
Bayesian probability is talking about conditional probability.
P(A|B) is the probability of A, given B, or conditioned on B.
Yep
So what I'm saying is, "there is a goat behind Door 2" isn't the event you need to take into account.
Hmmm
But can't you say "whats the probability that in door 1 is the money given that in door 2 is a goat"
You can, but that's not the problem.
Btw I think I did P(A_2) wrong
P(A_j) = 1/3 only when j = 1.
Yeee
Else it equals 2/3.
That's why you use consistent notation.
And ideally specific notation, too.
Anyway, what you're actually conditioning on is that Monty opens Door 2.
So it would be $P(M_1|O_2) = P(M_1) \frac{P(O_2|M_1)}{P(O_2)}$
Techie Literate
Right, because M_1 = "the money is behind Door 1" (and more generally, M_i = "the money is behind Door i").
That you would have to calculate more precisely.
Oh yee cuz he wouldn't open the door with the money in it
$P(O_2) = P(O_2|M_1)P(M_1) + P(O_2|M_2)P(M_2) + P(O_2|M_3)P(M_3)$ I think should cover all our bases.
Techie Literate
That middle term is, of course, 0.
Then the outer terms are each 1/2 * 1/3.
So yes, $P(O_2) = 1/3$.
Techie Literate
Wait.
1/2×1/3×3?
Techie Literate
Monty never opens the door you picked.
Oh yee
Techie Literate
Because Monty can't open Door 1 because we picked it, and he can't open Door 3 because it has the money.
So $P(O_2) = 1/2$
Techie Literate
Which we should've expected, because again, he doesn't open our door, which leaves two.
An easier way to think about this is to forget about specific doors at all.
Let P = "we pick a goat" and R = "Monty reveals a goat".
Thus, we wish to calculate P(P|R).
$P(P|R) = P(P) \frac{P(R|P)}{P(R)}$.
Techie Literate
$P(R|P) = P(R) = 1$, obviously, because Monty always reveals a goat.
Techie Literate
So in a sense, the reason the Monty Hall Problem works the way it does is because Monty revealing the goat doesn't give you any information about the door you picked.
Do you mean if I pick a door, monty will reveal a goat anyway so I still don't know if my door is the right one or not?
Well, let's imagine an alternate version of the problem where Monty opens an unpicked door at random.
Okay
This would actually make $P(R|P) = 1/2$, since if we picked a goat, there's only one goat left for Monty to reveal.
Techie Literate
What this means is that Monty revealing a goat is more likely if we picked the money than if we picked a goat.
And so if Monty reveals a goat, that gives us evidence that our door really does contain the money.
This evidence happens to be exactly an amount that raises the probability from 1/3 to 1/2.
In the actual problem, Monty always reveals a goat whether we picked a goat or not.
It gives us no information at all about whether our door contains a goat.
Thus it doesn't change the probability we assign to that event.
I think I got it
Is this correct techie?
Prob. of I pick money given monty reveals goat is 1/3
Uhhhh
But wait
If he reveals a goat
Then the chance that I pick the money is 1/2
...why?
Well if he reveals a goat then there are two doors left
I didn't choose anything before he reveals it
Which is not the actual problem
What comes first? I pick the money or he reveals the goat
You pick a door.
What we want to know is whether the door you picked has the money.
But isn't it connected to the probability itself
So if we choose A_1= I pick money
What do you mean "I pick money"?
Do you mean the door you pick has the money behind it?
Okay, so let M = "the door you pick has the money behind it" and G = "Monty opens a door with a goat behind it".
So we want P(M|G).
Yep
And uh
Theres another event
Which is
W="I pick a door with a goat"
So that covers all the possibilities
Oh so why is it a problem?
Ah okayy
Because in the structure of the problem, if the door you pick doens't have the money, it must have a goat.
Cuz of confusion?
Oh okay
So your advice is that I should express every event in terms of an other event as long as its possible?
If you can formulate it like that
Okay lets just move on
My advice is to talk about as few events as possible, and to name them as descriptively as possible.
The more events you're juggling the more likely you are to confuse yourself, especially if you've failed to give them distinguishing names.
So anyway. We want P(M|G).
The probability that the door we picked has the money behind it, given that Monty opens a door with a goat behind it.
Ye
So its just 1/3/1
Which is 1/3
We dont need the formula with the total probability right?
"Total probability"?
Law of total probability
Not here, because we've described our events in a way where the place where we didn't need it in the place where we might because the event we defined was guaranteed.
In other words its easy to find out what P(G) is?
If it werent easy the law of total probability might help
Am I right?
And uhm
M is defined as "I pick the door with the money before monty reveals a goat"
?
Thats what I was abit confused about
It's kind of trivial but when I'm tired its abit hard to understand it
You should take a break.
You're probably right
When you come back, we can take a fully in-depth treatment of the problem you seem to want.
Yep sure thats sounds great
Just ping me when you're ready. In the meantime, maybe get something to drink or a snack, go to the bathroom if you need it, stretch.
Okayy, number 1 teacher ^^
I'm ready now @burnt rose
Alright, give me a minute.
Should I just tell you what I've fully understood so far?
Go ahead.
Okay so the problem states that we have 3 doors. We pick one door. Monty reveals one door with a goat. Question: should we switch to the other door or stay? For this problem we set M="I pick the door with the money" and G="Monty reveals a goat". We want P(M|G) since it asks what is the probability that I pick the door with the money GIVEN that Monty reveals a a door with a goat. We now use bayes theorem: P(M|G)=P(G|M)×P(M)/P(G). Since Monty always reveal a goat the probilities P(G|M) and P(G) are 1. Therefore P(M|G)=P(M). But P(M) is 1/3 since out of three doors, only one has the money. The probability that I pick the door with the money given that Monty reveals a goat is 1/3. But after he reveals it, there is only the other we didn't pick door left which will have the probability of 2/3 to have the money (remaining probability). Thus we should switch
Right.
I don't know.
But I can trust you that you already studied the subject and you can varify that this solution is right?
I can do you one better and prove it to you.
Ye why not
Okay, so.
The complete treatment of the problem contains nine statements, three each of three types; P_i = "I pick Door #i" O_i = "Monty opens Door #i" M_i = "The money is behind Door #i"
From the statement of the problem, we are given P(O_i|M_i) = P(O_i|P_i) = 0.
That is, Monty never opens the door with the money or the door we pick.
Uh wait
But the i cannot be the same for every event
Right?
Cuz if the money is in door 1 then he cannot reveal door 1
...what I'm saying is that we have statements P_1, P_2, P_3, O_1, O_2, O_3, M_1, M_2, M_3.
Not all of these statements can be true at once, but we do have all of them.
I understand
So now, arbitrarily suppose we pick Door 1 and Monty opens Door 2.
Thus, we wish to calculate P(M_1 | O_2 P_1).
Now, there are two rules of probability theory it'd probably help to learn before we go any further.
Okayy
We can call these the product law and sum law of probability theory.
The product law is thus; P(AB) = P(A|B) P(B)
Yep
And because AB = BA, this also means P(AB) = P(B|A)P(A).
Which of course means, by the transitive property of equality, P(A|B)P(B) = P(B|A)P(A), which means P(A|B) = P(A)P(B|A)/P(B), thus Bayes's theorem.
The sum law of probability theory states P(A + B) = P(A) + P(B) - P(AB).
So we want P(M_1 | O_2 P_1), which equals P(M_1 | P_1) * P(O_2 | M_1 P_1) / P(O_2 | P_1).
Now, obviously, P(M_1 | P_1) = P(M_1) = 1/3. The door the money is behind is independent of the door we pick. The alternative would suggest either we have some suspicion of where the money is or the money is moved after we pick a door.
Equally obviously, P(O_2 | M_1 P_1) = 1/2, because if the money is behind the door we picked, then there's only one door Monty can't open, so he can just flip a coin to decide between the other two.
Now it might be prudent at this time to detour through a crash course on Boolean algebra.
Unless you already understand it.
Can you maybe help me varify the long expression
What do you mean?
What do you mean "varify" (besides "verify")?
Oops ye I mean like derive it
So we know P(A|B)=P(B|A)P(A)/P(B)
Applying it with A=M_1 and B= O_2 P_1 doesn't directly give the expression you wrote
It gives this
You wrote
Your second line is incorrect.
Uh, third line?
Okay, so it's important to recognize these as statements in Boolean relation to each other.
This is because logical connectives are commutative, associative, and distributive.
For example M_1 ="Money is in door 1" is either true or false?
So we know P(O_2 P_1 | M_1)P(M_1) = P(O_2 M_1 P_1), right?
Yep
Okay, so; P(O_2 M_1 P_1) = P(O_2 (M_1 P_1)) = P(O_2 | M_1 P_1) P(M_1 P_1) = P(O_2 | M_1 P_1) P(M_1 | P_1) P(P_1)
Yes
So P(M_1 | O_2 P_1) = P(M_1) * P(O_2 P_1 | M_1) / P(O_2 P_1)
Yes
P(M_1 | O_2 P_1) = P(M_1) * P(O_2 P_1 | M_1) / P(O_2 P_1)
= P(O_2 P_1 M_1) / P(O_2 P_1)
= P(O_2 | P_1 M_1) * P(P_1 M_1) / P(O_2 P_1)
= P(O_2 | M_1 P_1) * P(M_1 | P_1) * P(P_1) / (P(O_2 | P_1) * P(P_1))
= P(O_2 | M_1 P_1) * P(M_1 | P_1) / P(O_2 | P_1)```
Follow?
Okay, so.\
Like I said, P(0_2 | M_1 P_1) = 1/2, and P(M_1 | P_1) = 1/3.
Now we need to calculate P(O_2 | P_1).
Well, we need to calculate it.
This is where we derive the law of total probability.
Oh yeee mb
And where Boolean logic is important.
Because A = AT = A + F in Boolean logic.
Or A = A * 1 = A + 0.
If we're using Boolean algebra specifically.
Now, we know that M_1 + M_2 + M_3 = 1, that is, the money is behind at least one of the three doors.
Thus, P(O_2 | P_1) = P(O_2 (M_1 + M_2 + M_3) | P_1).
Which, of course, thanks to the distributive property, equals P(O_2 M_1 + O_2 M_2 + O_2 M_3 | P_1).
Which therefore by the sum law of probability equals: P(O_2 M_1 | P_1) + P(O_2 M_2 | P_1) + P(O_2 M_3 | P_1) - P(O_2 M_1 M_2 | P_1) - P(O_2 M_1 M_3 | P_1) - P(O_2 M_2 M_3 | P_1) + P(O_2 M_1 M_2 M_3 | P_1)
And we know that i =/= j ==> M_i M_j = 0.
That is, the money is behind at most one door.
Therefore this all simplifies to P(O_2 M_1 | P_1) + P(O_2 M_2 | P_1) + P(O_2 M_3 | P_1).
We know that O_i M_i = 0 for all i, that is, it is always false that Monty opens the door with the money, so the middle term disappears.
We therefore have P(O_2 | P_1) = P(O_2 M_1 | P_1) + P(O_2 M_3 | P_1).
Which of course, by Bayes's theorem, equals P(O_2 | M_1 P_1) * P(M_1) + P(O_2 | M_3 P_1) * P(M_3).
And this is why we had to do all of that, because the door Monty opens depends on both which door we pick and which door has the money.
I have one question: what are you really trying to prove
...we're doing the Monty Hall problem, right?
I'm trying to prove that the probability that the money is behind the door we picked is 1/3.
Behind Door 1.
By considering all possible cases right?
Now, we know that P(O_2 | M_1 P_1) = 1/2, and we know P(O_2 | M_3 P_1) = 1.
...I guess?
We also know P(M_1) = P(M_2) = P(M_3) = 1/3 (which is something else I can show you how to derive, rather than taking for granted).
Thus, P(O_2 | P_1) = 1/2 * 1/3 + 1 * 1/3 = 3/2 * 1/3 = 1/2.
Yep
Thus, returning all the way back here and plugging in all the numbers, we have P(M_1 | O_2 P_1) = 1/3 * 1/2 / (1/2).
Which is just 1/3.
Now, since we know that P(M_1 | O_2 P_1) + P(M_2 | O_2 P_1) + P(M_3 | O_2 P_1) = 1 and that P(M_2 | O_2 P_1) = 0, then we arrive at 1/3 + P(M_3 | O_2 P_1) = 1, or P(M_3 | O_2 P_1) = 2/3.
Yep
Uhm Techie it's abit late in germany rn (12 a.m midnight) and I have school tomorrow. I don't know if the proof is done yet because I have to look at it a few times again to fully grasp the idea. I will come back tomorrow. Good night!
You were really helpful today thank you!
It basically is.
There might be details to shore up your understanding, but mechanically the proof is complete.
Okayy, thats nice to know ^^ I will continue tomorrow byee
@tulip solstice
Hello tony.241, this is a friendly reminder that your help request has been inactive for more than 24 hours. If you no longer need assistance, please consider closing the thread using the +close command. This thread will be automatically closed in 3 days if it remains inactive.