I recall conversations on Usenet decades ago about the Monty Hall problem[1] in which people gave elementary proofs that probabilities don't change by opening a door. Even from mathematicians and statisticians. People were very insistent that the analytical solution was simple and obvious and that switching doors didn't change anything.
The only thing that changed some people's minds was a program that simulated the Monty Hall problem. This was needed to get people to reconsider their proof when the claim was highly counterintuitive.
The Monty Hall Problem is a fun one because you can try to approach it from a purely analytical perspective and get one answer, while incorporating the whole situation (especially the fact that the final probability is not natural as they force the final decision into far fewer doors than originally present) and testing you can find a different answer entirely.
I suppose this is an interesting corollary with discoveries made by deep theoretical mathematics. While something may seem possible because "the math checks out" it could be only theoretically possible as it relies on some unnatural value to "be" possible in the first place.
Testing is where hopeful theories are smashed by reality until all that remains is the verifiable truth. Truly, why wouldn't we test?
Fundamentally, the trouble with the Monty Hall problem isn't that analysis comes to the wrong answer, it's that people often come to the wrong model when reasoning about it informally.
It's not any harder to do the "correct" analysis than to write up a simulation. It's mostly just easier to convince yourself that the simulation matches the problem description when it reaches the unintuitive result.
Fundamentally, I think the real trouble with the Monty Hall problem is that the assumptions of the game are not clearly stated. Because of this, people come up with different models.
That's absolutely right; further, if you explicitly model the behavior of the game show host, you can exhibit models under which "it's better to switch" and models under which "it doesn't matter if you switch or not".
Take a game show host who lets you choose a door, randomly reveals what is behind one other door, and then gives you an opportunity to change your choice. This game show host CAN (randomly) reveal the prize; he has equal probability of revealing ANY of the unchosen doors.
Say you are playing the Monty Hall game with this host. You choose your door, he opens another door, and it happens (purely by chance) that there is no prize there. Do you still believe that you have a 2/3 chance of winning if you switch to the other unopened door?
Isn't that a different problem entirely?
The original is that the host reveals a door without the prize.
Aren't you modeling an entirely different problem as opposed to modeling the same problem with a different model, since the problem states the parameters and you are changing those?
> Aren't you modeling an entirely different problem...
Not really, but read on:
You correctly state that in the Monty Hall problem, the host reveals a door without the prize. That's the same situation which I described in my previous comment.
Try thinking about it this way: Say you are the contestant on that show. You have never played the game before, and you will never play it again. So you don't know how the host behaves. You pick your door, he reveals another door, there is no prize behind it. You would have to ask yourself: did he deliberately open that door because it had no prize? Or did he just happen to open a door that had no prize?
Your best estimation of your odds of winning changes completely depending on how you model the behavior of the host.
However, with any type of host, the situation whereby "contestant opens door with no prize, host reveals another door with no prize" can still occur, and regardless of whether you deem that the 'original' Monty Hall problem or not, it is the most interesting way to define the Monty Hall problem. Call it the extended Monty Hall problem if you want: the situation described above has occurred, and you have to both define a model for the behavior of the host (and game) and calculate your odds under that model.
Here's a challenge for you: Can you find a model under which the contestant has 100% chance of winning by not switching to the unopened door?
This modelling ambiguity is resolved by do calculus, which makes a clear distinction between intervention and observation: https://arxiv.org/pdf/1305.5506.pdf
That's how it went when I was solving problems at the Statistics course at university. I modeled the problem perfectly, got the wrong result. Changed assumptions, got the wrong result. Checked the solution, its reasoning didn't make much sense anyway. Run a simulation, got an approximate result close to the correct solution.
You pick a door. Monty shows you a Goat. You switch or stay.
Monty will never show you the Car before offering a switch. He always shows you a Goat. It doesn't matter which Goat he shows you - it's just "not the Car".
If your first choice is a Goat, switching will win you the Car. If your first choice is a Car, switching will win you a Goat. You have a 2/3 chance of picking a Goat, so, effectively, you want to pick a Goat so that you switch to the Car.
For sufficiently analytical folks that works, but for lay people it tends to still be confusing.
The best way I’ve heard it explained to help people get it through intuition is by changing the number of doors and goats. Say there are 100 doors, and they all have goats except one, which has a car. You pick door 1. Monty then proceeds to open doors 2 through 48, skips door 49, and then opens the remaining doors. After all that, he stops and asks you, would you like to switch?
I always feel like there is something fundamental missing from the examination of Monty Hall problems.
I think it has to do with the difference between "probable outcome in reality" and "probably outcome based on personally known information".
Lets say when you get down to doors #1 and #49, Monty brings in someone new, with no information and says pick a door. For that new person, standing right next to you, doors #1 and #49 have a 50-50% chance, while for you they are a 2% vs 98% chance.
How can door #1 simultaneously have a 2% chance for you and a 50% chance for Bob? The answer is that the chance is not a single fixed property of the door itself- which is hard to wrap ones head around.
And for that matter, Monty Hall himself knows one of the doors is 100% and the other is 0%.
There is something missing: regular stats don't differentiate between doing things and observing things and these two are not at all the same. If I have a digital thermometer and I observe it to show a high temperature, then I will note an association between that and feeling warm. But if I merely set the thermometer gauge to a high value artificially, it's not going to make me feel any warmer.
I think it is more fundamental than that, and not even mathematical. I think the issue is that people conflate or blur the difference between reality and their models of reality.
Your personal, information limited calculation of the chance a car is behind door #1 has no impact on if there is a car behind door #1. Reality is binary and constant. There was always a car there, or there always wasn't.
Most people correctly intuit that of course the real probability that the car is behind door #1 cant change with reveled information. It isn't a quantum car. They just get caught up on the fact that predictive chance is a attribute of the model, not the real door.
The situation is now counterintuitive in the other direction: if Monty Hall had opened those 48 doors at random and they just happened to not contain the car, then there is no advantage to switching, though many people would insist otherwise.
> if Monty Hall had opened those 48 doors at random
The fact that Monty Hall opens the doors deterministically (not randomly) is KEY.
In the original problem, Monty ALWAYS opens a door with a goat. In using 50 doors, Monty would ALWAYS open doors containing goats, and not the car. It's not random.
Knowing it's not random, it should be very intuitive.
But the doors weren't opened at random. You know he won't open the car, because that's part of the rules of the game.
Let's demonstrate with a slightly different construction: You're no longer playing with monty, but with a demon. This demon wants you to lose, but also picked a very bad game for themselves. You pick a door, then the demon opens all-but-one of the remaining doors. Then, you can pick any door, open or closed, and you get what's in it.
If the demon opens doors at random, nearly all the time (with 100 doors) you'll see the car and be able to pick it directly. In this situation, switching between the closed doors doesn't really matter, but you'll usually know exactly which door to pick, because you can see the car.
So instead, the demon only opens doors that don't have a vehicle behind them. You only ever see goats. At this point, he's not opening doors at random. If he were, you'd see the car 98% of the time, but you never do. At this point, since he's using additional information, it is in your best interest to switch.
I've never been happy with that explanation. I don't get why the host would not just open a single door, that's what the host does in the other scenario to me.
Sure, it could be that the host only opens one door, or it could be that he opens all but one door. In every case, however, it is better to switch. The all-but-one example is hyperbolic but still follows precisely the same mathematical rules. Your interpretation is valid, but so is the all-but-one example, and they all lead to the same result, it's just more obvious when you open nearly all the doors.
The best way that I've thought about it is like this:
You pick a door, then Monty let's you switch to the two remaining doors and if the car is behind either of them you win.
Obviously choosing the two remaining doors is better.
The trick is to realize that Monty showing you the contents of one door and letting you choose the other one is identical to Monty letting you choose both the remaining doors.
I think the great advantage of "simulation", for the programming-literate, is not that you can simulate your way to a correct answer, but that the process of creating a simulation is likely to show you the error in your reasoning.
As a young teenager, I encountered the Monty Hall problem for the first time, and I didn't believe that the "analytical" answer was correct. I decided to simulate it by programming. In the 20 minutes it took me to write a simulation, I went from complete incomprehension to a full understanding of why I got the results I got. Programming a simulation of the problem forces you to write out the algorithmic significance of "Monty reveals one of the goats".
The Monty Hall problem is a fun one to code up, and yeah, there are otherwise smart people who refuse to believe it.
I coded it up in F# https://github.com/jackfoxy/LetsMakeADeal to convince one of the founders of a start-up I worked for. He just grunted and walked away. Pretty sure he still doesn't want to hear about Bayes' Theorem.
The Monty Hall problem is especially unintuitive if you've ever watched Let's Make a Deal, since the problem set up is oh so close to, but not exactly, the set up of the Big Deal in the show. It's too easy to conflate the rules of the show with the math problem, which will lead to confusion.
I think seeing the results of a simulation also elucidates the set up of the math problem vs reading a proof.
No, I don't think that detail makes it any easier. I know that but I still really can't accept the correctness of the Monty Hall strategy (I have to basically just take it on faith and stop trying to understand it). I was trying to put my finger on why, and I think it's this.
After Monty eliminates one of the three doors, then the prize is behind one of the two. If someone were to come in this point, with no prior knowledge whatsoever, their chance of picking the correct door at random is 1/2. And that is still true even if they pick the door which our contestant is being asked whether or not to switch from! This is a real mind fuck to try to accept, that the same state of what's behind each door leads to different odds of making a correct random choice, depending on when you make the choice.
I honestly don't think I'll ever be able to "get" the Monty Hall strategy. I think I get why it works (choosing to switch means you're going from a 1/3 probability to 1/2), but it makes no sense at all. It seems like even if you choose to stay on the same door, your probability is 1/2 (the same as if Joe came in off the street and chose the same door as you). Like I said, I just have to take it on faith.
The best probability estimate you can make is constrained by the information you have available. The new person showing up has less information than the existing constant, so it makes sense that their best estimate would be less precise. Similarly, if someone with x-ray vision walked up in the middle of the game, they could pick the car 100% of the time, because they have access to more information than either of the existing contestants.
Your last paragraph isn't correct though, By switching you go from a 1/3 probability to a 2/3 probability. Based on the information the original contestant has, switching gets the car 2/3 of the time.
I don't see how a new contestant has less information, though? They know that one of the two doors contains the prize, which is all the previous contestant knows either.
The crucial bit of information that the new contestant doesn't have is that there was a door that was ineligible to be eliminated (the door chosen by the original contestant).
If the game had different rules, it would work like you are imagining. Specifically, if Monty randomly eliminated one of the two doors, meaning there was a chance for Monty to reveal the prize instead of a goat. If Monty has the chance to eliminate the prize before giving the contestant a chance to switch, then switching does not give you an advantage.
But it didn't. Before, we knew that one of those two doors could contain either a prize or a goat. After, we know the same exact thing. No information was gained there.
Maybe this will help understand it intuitively. You have a choice between doors 1 2 3. You pick door 1. You know the odds of the car being in door 1 is 1/3. The odds of the car being in door 2 or door 3 are 2/3.
Monty opens door 3, showing a zonk. You knew there was a 2/3 chance of the car being in door 2 or 3, but now you know there's a 2/3 chance of the car being in door 2 (since you know it is not in door 3).
All this didn't change anything you know about door 1. It has the same 1/3 chance it started with. Probability is all about what you know in the moment.
The math involves understanding the rules, that Monty will never open the door you picked and will never open the door with the car behind it. This is why one can't look above and say "well, there is a 1/2 chance of the car being behind door 1 after door 3 was opened and there wasn't a car there". This would only be true mathematically if the door Monty opened was random, but we know the door Monty picks isn't random. In fact, the pool of doors that could be opened depends on your initial pick. Monty was never going to open door 1 (the door that you picked), even if it was a zonk & Monty was never going to open the door with the car, therefore one can't make that assertion.
I have fun trying to explain this problem. Let me see if I can give an explanation that will help you.
So lets say you have just picked a door in the beginning. You know you have a 1/3 chance of being right.
If I then tell you, "I will give you two options... you can either bet you are right, or bet that you are wrong"
You would obviously choose to bet you are wrong, correct? Because you know you only have a 1/3 chance of being right with your guess, which means you have a 2/3 chance of being wrong. The smart bet is that your original guess was wrong.
This is actually what is happening in the game if you think about it. You pick a door and it has 1/3 chance of being the right one; since we know Monty is only going to ever reveal a goat and never the prize, we don't even NEED Monty to reveal the door at this point - we know he is going to reveal a goat, no matter what. We don't even have to wait to see which door he reveals, since that isn't going to give us more information (it is going to be a goat, no matter what). So when he asks you if you want to switch doors, he isn't asking you to switch to ONE of the other two doors, he is asking if you want to switch to having BOTH other doors as your choice. Whether he reveals the goat before or after you choose to switch doesn't matter, because you know it will always be a goat.
If that is still not clear, lets just write out all the options:
There are three doors, A B C. One has a prize, the other two have goats. Let see what happens with your two options (switch or dont switch).
In our first example, you pick door A and you are going to switch.
1/3 of the time the prize is behind door A. If the prize is behind door A, and you switch, you lose. This is 1/3 of the time, and you lose for switching.
1/3 of the time the prize is behind door B. You picked door A, so Monty reveals door C. You switch to the remaining door (B) and you win.
1/3 of the time the prize is behind door C. You picked door A, so Monty reveals door B. You switch to the remaining door (C) and you win.
Add up all those choices, and 2 out of the 3 times you win.
Now lets imagine that we DON'T switch.
1/3 of the time the prize is behind door A. Monty reveals one of the other doors, but you don't switch. You win.
1/3 of the time the prize is behind door B. Monty reveals door C, but you don't switch from A. You lose.
1/3 of the time the prize is behind door C. Monty reveals door B, but you don't switch. You lose.
So in this not switching world, you win 1/3 of the time.
In summary, switching wins 2/3rds, not switching wins 1/3.
That does help - if nothing else, adding up the outcomes manually helps to demonstrate it in a way that's not really easy to grasp on first glance. It still is kind of a spooky result which makes no sense, but at least I feel a little better about the correctness.
The Monty Hall problem is small enough to enumerate all the out comes on paper. If you then test all the different scenarios (not many) and compare switching to not switching - switching produces a slight edge. So it can be done without a computer and not a great deal of effort. I am not a mathematician so it was the only way I could prove it to myself at the time.
You can demonstrate the Monty Hall problem solution analytically with Bayesian statistics using prior probabilities, no need to go all the way to Monte Carlo methods.
I'm curious. When those people see the simulation, do they then go back to the analysis and uncover their mistaken reasoning? Or do they just continue to reject the analysis but begrudgingly accept the outcome of the simulation? The analysis of the Monty Hall problem is so very simple I find it very odd to staunchly reject it but then be persuaded by the simulation.
Years ago, when the Monty Hall problem was not well known, I've seen with my own eyes that it was hard to convince some very smart people of the correct answer. Indeed, after being convinced through simulation or exhaustive enumeration of the decision tree or some other way, they would go back and see what went wrong with their initial analysis.
This was how I built an intuition into the Monty Hall problem as well! Wrote a little app that simulated it a decade or so ago when I was discussing with friends!
Something that makes this a lot more intuitive is to increase the number of doors. If there's 100 doors, the host will open all remaining doors except 1, and they will never open the door with the car behind it, then one has a 1% chance of winning the car if they don't switch doors and it would happen only because they initially chose the door with the car.
While I agree we should leave the correct answer to simulation, analytical approximations are often surprisingly close and have the benefit of being intuition-building.
You learn a lot more from generating an analytical solution than a simulation, so it's usually worth at least taking a stab at it analytically before jumping to monte carlo methods.
Ironically, this reminds me of a story (folk tale?) about Von Neumann himself.
A colleague told him about the Two Trains Problem (https://mathworld.wolfram.com/TwoTrainsPuzzle.html), and Von Neumann replied with the correct answer. When his colleague said, "Ah! You figured out he trick!", Von Neumann replied, "What trick? I just summed up the distances in my head!"
Math is often much more fun and compelling for some people when you both theoretically prove something works and then also convince yourself of the same thing via a numerical experiment. I’m pretty good at math proofs (pure math PhD, wrote some books and papers), but I still love to do numerical experiments. It’s fun, and you also set yourself up to be able to easily ask different questions that may be very hard to answer theoretically.
Some of you might have just suffered from poor math education. I don't believe anyone capable of learning to program competently lacks the cognitive horsepower to do math competently with more or less equivalent ease. Many do however lack the training.
Part of the problem is that the basic statistical model simply neglects to differentiate between observing and doing, which changes the odds. This is very important when trying to reason about causality. When you observe an association like your thermometer shows a high number when it's warm out it's one thing, but when you set your thermometer to a high number you won't get any warmer. Whereas if you warm the room, your thermometer will rise. This symmetry breaking is captured by something called do calculus.
> Probability of two heads: pp
> Probability of two tails: (1-p)(1-p)
> Probability of head followed by tails: p(1-p)
> Probability of tails followed by heads: (1-p)p
>
> It's not difficult to notice that if you remove the first two, the last two form a 50/50 distribution
Very nice way to illustrate why throwing out the duplicate sequences gets back to a 50/50 distribution.
Because that's how science is done, theory then practical?
Maybe it's just a meat space thing, but even if the math gives us the answer it still only feels "final" or "true" to me when we've actually tested something out.
https://www.techiedelight.com/generate-fair-results-biased-c...
The coin is biased to come up TAILS 80% of the time, but using Von Neumann's method in the program I got HEADS 50.035%, TAILS 49.965%.