by drfuchs · 7y ago · 0 comments
We had it beaten into us not to use truth tables to solve problems in college, because it doesn't scale. But the Monty Hall problem has a finite set of states you can easily write on a piece of paper. And then you'll see that it jumps from 2/6 successes to 3/6.
I tried to replicate that table under duress once (see initial comment) and I couldn't get it sorted. I should try it again and write it down this time.
Edit: Why do work when you can find someone else who already has:
https://www.statisticshowto.datasciencecentral.com/probabili...
and particular to my statement, this table:
https://www.statisticshowto.datasciencecentral.com/wp-conten...
When switching the number of lose scenarios is lower than a naive expectation of outcomes.
I couldn't get my mind to accept the explanation. So I coded it and ran the simulation 100,000 times.
I got about 50,000 instances where switching won the prize. Biases confirmed.
... until I found the bug in my code where Monty was allowed to open the door containing the car as the one showed to the player.
Fixed the bug, and switching won the prize in about 66,666 instances.
It jumps to 4/6! Even better.
For example, we'll label the three doors P, L, R, for the prize door, the leftmost goat door and the rightmost goat door. This gives possibilities
1. You choose P, Monty chooses L - switching loses
2. You choose P, Monty chooses R - switching loses
3. You choose L, Monty chooses R - switching wins
4. You choose R, Monty chooses L - switching wins
This seems to indicate that switching gives you a 50/50 likelihood of winning. In fact, this is the correct truth table to use if Monty doesn't know which door has the prize. In that case, these are all equally likely.
Instead, if he does know where the prize is and won't open that door, this truth table is misleading because the cases where switching loses are less likely. If you choose L, he'll definitely choose R, but if you choose P, he has two options to split the probability.
Similarly, if you model Monty as not knowing what's behind the doors, then the truth table you're thinking of doesn't work. Either way, the truth table on its own isn't convincing.
The thing I find more clear is using Bayes' rule, as it shows exactly how the model of Monty's behavior affects the probability that switching is beneficial.
Let H be the event that your door has a prize and G be the event that Monty shows you a goat door. Then P(H|G) = P(G|H) * P(H) / P(G). Obviously, P(H) = 1/3 and (assuming Monty must pick a door other than yours) P(G|H) = 1, so it just comes down to what P(G) is.
If he always shows a goat, then P(G) 1 and you should switch. If he doesn't know what's behind the doors, it's 2/3 and it doesn't matter whether you switch. If he knows but prefers to spoil the prize, it's 1/3 and you definitely have the prize door.
┌─────────────┼─────────────┐
G G C
┌┴┐ ┌┴┐ ┌┴┐
Stay│ │Switch Stay│ │Switch Stay│ │Switch
G C G C C GWait, really? When did you go to college?
In mid 2000s, we used truth tables every day studying boolean algebra, logic gates, circuits, etc.
Which is funny because that's a group that's very capable of simulating it for themselves.
- Let them pick one card of three
- Offer to switch their card for the other two (closed!) cards. Most people take this deal, in my experience everyone takes this deal.
- Then, show the "goat"/useless card of the two remaining cards
- Offer them (again) to switch their original choice of card for the remaining card.
If they accept to switch, let them explain why (this is when people get it). If they don't switch, tell them that one of the two cards they could have switched for must have been a goat, so I could always show them one goat between these two.
After this, most people (all my test subjects, anyway) understand that in the long run, they're best off switching to the "two card" deal. They now understand that one must be a goat but that the probability of the "car" being among the two-card offer is twice as likely.
N<10 so YMMV
I was debugging my monty-hall simulator to try and work out why my intuition was so wrong when I came across my comment "Iterate through doors, open first door without prize" when this point finally struck me.
Or perhaps better stated in the Wikipedia article:
> "By opening his door, Monty is saying to the contestant 'There are two doors you did not choose, and the probability that the prize is behind one of them is 2/3. I'll help you by using my knowledge of where the prize is to open one of those two doors to show you that it does not hide the prize. You can now take advantage of this additional information. Your choice of door A has a chance of 1 in 3 of being the winner. I have not changed that. But by eliminating door C, I have shown you that the probability that door B hides the prize is 2 in 3.'"
[1] https://en.wikipedia.org/wiki/Monty_Hall_problem#Variants
a) Staying wins (Monty opens to a goat) b) Swap wins (Monty opens to a goat) c) First pick lost, no chance to swap (Monty opens to the car)
each of equal probability.
Your first choice is either right or it's wrong. If you switch, right becomes wrong and wrong becomes right.
Your first choice is 1/3 right 2/3 wrong.
I think there's a psychological component too. So many probability questions are about random events so you (very naturally) take a position that the revealed door is randomly chosen. It is NOT - you always see one of the goats.
You may be on to something.
Perhaps part of it is not wanting to switch from a winning position to a losing one. Thats harder to take so inertia sets in.
This is reminiscent of the endowment effect: https://en.wikipedia.org/wiki/Endowment_effect
I struggled with this because I didn't see the first choice as relevant to the final outcome. It is easy to see the game as restarted somehow when the 50/50 choice is presented.
When a casual observer assesses the situation they see an equal set of unknowns behind each outcome, since that matches the set of conditions.
While the probability would have remained the same, it's the elimination of all (but one) remaining false choices that tips the scale. The weight that the selected door was the correct one remains at 1/3rd, but the probability that the only remaining door was the correct one is the inverse, 2/3rds.
Meanwhile in the 1,000,000 doors set, if instead one door was picked, one other door was opened, and the choice was between keeping the current door and picking one of the other 999,998 doors, the odds increase so infinitesimally that both ego and a need to know would bias me to staying the course.
The bizarre scenario some people try to propose is that Monty doesn't know what's behind the doors, but if he happens to reveal the winning door, then we...ignore that entire Universe, or...rewind the simulation and try again, until he "by chance" reveals a non-winning door.
Enough to say that if Monty opens the winning door then he apologizes, closes it, and his helpers place the car to a new random place and they try again from the start.
Or say, ignorant Monty may open the winning door accidentally, but here I have a stack of DVDs of all lucky episodes where Monty got a goat. When binge watching these videos, would you expect to see switchers win at a higher rate?
Answer to both: it becomes 50-50 if Monty was ignorant, even if we post hoc filter out those cases where he got it right.
Bonus philosophical question: you don't know whether Monty knew the car's location. He may say he does, or he may say he doesn't but you don't trust him. Or maybe he says "phew, how lucky to be a goat, I actually had a short amnesia an bluffed it". How can such a murky thing whether a human knows something or not impact the very, financially real world, even when all outward appearances are equal: I saw with my eyes that Monty opened a goat door with his hands. Yes it might have been an accident/luck but what is the precise definition of luck anyway? How can it have an influence whether his brain contained this information, given that he ended up opening this goat door anyway. How can counterfactual Universes influence ours? I have my own answers but it's an interesting thing to ponder.
If Monty knows what's behind the doors, we arrive at the scenario immediately where the door that's left has 2/3 chance of hiding the car, because the door you picked has 1/3 chance of hiding the car.
If Monty doesn't know what's behind the doors, and goes into a cycle of opening doors and shuffling the prizes if it was the car, or rewinding the universe, or whatever, at the end of that sequence, you will still hold on to the same door you initially picked that has 1/3 chance of hiding the car. And the door that you get the offer to switch to therefore has a 2/3 chance of hiding the car.
"For example, he might open their door immediately if it was a losing door, might offer them money to not switch from a losing door to a winning door, or might only allow them the opportunity to switch if they had a winning door."
[1] https://en.wikipedia.org/wiki/Monty_Hall#Monty_Hall_problem
If he was opening doors randomly then you're left with a one-in-two chance. But if he was giving you information by opening doors he knew were bad, you're left with two possibilities: the door you started with just happened to be the right door (a tiny chance), or (much more likely) the door you started with was not the right door - in which case Monty was forced to open every other door so as to avoid showing you the car, and he has eliminated all the non-car options.
No. Or, well, it depends on what happens if Monty opens a door with the car. If I lose if he does that, then switching doors doesn't change the probability.
It's easy to prove. Let's say that I always pick door #1, and Monty always picks door #2. Then we get the following probabilities:
car-goat-goat: I stay, I win. I switch, I lose.
goat-car-goat: I stay, I lose. I switch, I lose.
goat-goat-car: I stay, I lose. I switch, I win.
Staying: 1/3 chance of winning. Switching: 1/3 chance of winning.
I didn't believe it until I simulated it myself.
He knows exactly where the prize is. He just had a good poker face and head game. Which is why he hosted the show for 15+ years.
He illustrated it with the problem of what happens to the level of water on a pool when you throw overboard a stone from a floating boat. Does the water level rise or drop? Well, imagine that your small stone is made of neutron star material...
Forgive me if I'm missing something obvious, I have a newborn and am underslept.
I assume neutron star material is incredibly dense and so the rock would be unbelievably heavy. To the point that the mass would actually likely sink the boat, and then we can't throw the rock out.
OK but let's assume that the boat is somehow massive enough to support the weight of the rock. Now we've changed the scale of the other variables of the experiment in proportion to the rock/neutron star, and we're back to ground zero, are we not?
The trick is in the wording. With 3 you are literally saying "let me remove all the cards except for a random one, the one you chose, and the one I chose, of which, one is the correct card to choose. Do you want to change your choice?" So it plays out as expected with 3, and the obviousness of the solution when done with 52 cards.
I think the intuition behind is that, when you initially choose one door out of 1000000, you are almost sure not to have picked the right one, so you ignore the fact that you even chose one. Then, the host opens 999998 doors, but leaves one closed. That door is now really special!
Or a different way to look at it: The host gives you partial information about what's between the 999999 doors you didn't choose. Doesn't it seem really unlikely that your intial choice matters given that there are so many doors?
The problem to me is more that when you go back down from 1M to 3 doors one can just as well say again "but now we only have three doors". Meaning that a proof of the original problem is the only satisfactory answer; the 1M comparison is maybe for people that don't like proofs and want "evidence".
This explanation offered above makes sense to my "gut" however: https://news.ycombinator.com/item?id=21349295
You can sidestep this by playing a slightly different but equivalent game.
The player chooses a door. The host then gives the player the choice of sticking with that door, or instead taking all of the other doors.
It's only when the person opening the door knows where the prize is, that I should always switch?
(note: when you do this in real life, you stop talking now. let them explain it.)
When you have N>2 doors, the host will with 100% certainty open N-2 doors with goats behind them. It doesn't matter whether N is 3 or 1,000,000. After the host's hidden knowledge has reduced the problem space from N options to 2 options, the probability of getting the car is increased from 1/N to 1/2.
The key phrase is "host's hidden knowledge". Once the host starts opening the wrong doors, the fundamental nature of the problem is changed from being an independent probability problem to a dependent probability one.
No, your numbers are wrong.
In your initial choice, the probability of picking the winning door is 1/N.
When Monty opens doors so that there is a single door remaining, the probability of that door containing the prize is the complement of the probability that you picked the winning door, i.e. 1-(1/N).
So switching doors increases your probability from 1/3 to 2/3 if N=3, not to 1/2.
If N=1000, switching doors increases your probability from 1/1000 to 999/1000, and that is why increasing the number of doors makes the correct solution more intuitive for some people.
That's why this approach to teaching it has never made sense to me -- it's not clear at all why opening 998 doors should be analogous to opening 1 door, which it's much more obvious that opening 1 door is analogous to 1 door.