Show HN: Understanding the Monty Hall paradox through code
github.com
github.com
If you take the "stay" strategy... 1/3 you hit the car and keep it. 2/3 you hit a goat and keep it.
In summary... "switch" is 2/3 car, "stay" is 2/3 goat.
In these times you should choose "stay" and hope to get a goat so you can turn grass into food. Cars are overrated.
Instead of 3 doors, imagine there are 100. 99 of which have a goat and only one of which has a price behind it. Now blindly choose a door and the host opens 98 of the other doors which have a goat behind it. Would you switch your door now, given the choice?
It's easy to see that your probability of choosing a "wrong" door when you had 100 doors to choose from was much higher than choosing the right door when you only have two doors to choose from.
This method of thinking, i.e. increasing or decreasing the problem space by some orders of magintude has helped me a lot in thinking about problems and their solutions in general.
The player are indifferent to switching under your scenario. Why not, I suppose?
Similarly, an adversarial host who sometimes opens a door and sometimes just shows you your choice can similarly mess with the odds.
It’s really due to the host both being forced to show a door and knowing which door to choose that you gain from leveraging that knowledge.
The probabilities are different but this does not make my first choice "worse"
Because Monty can never choose the door you first picked he can't give you any new information about that door. So when he reveals which of the remaining doors has a goat, he is only giving us new information about those remaining doors. That information reduces the odds on the remaining doors and that is why you should always switch.
#2 is I finally realized the importance of that postulate of Quantum Mechanics: The wavefunction contains everything you can know about the system. This problem pointed out for me that probability is not an unvariable thing. Different people will calculate different probabilities for different events (think if we're playing cards and I have three aces and you have none- you will calculate a different probability of drawing a ace that I will) and we will both be correct. This without this postulate the probabilities of QM would be meaningless.
If you consider it two independent rounds instead of stay/switch,
Stay: you get to roll 1d3, "1" wins
Switch: you get to roll 1d3, "1" loses, "2" or "3" wins
If the host opens the door with the car, the game would be over anyway. It is clearly implied that the host always opens a door with a goat.
"the host opens another door that he knows has a goat behind it, say No. 3,"
Using the knowledge of where the car is to avoid showing it, is more specific than just having the knowledge, and possibly still opening at random.
I think the source of the paradox lies somewhere in the biases (the Endowment effect or Status Quo bias) as discussed in the Wikipedia article about the problem - not with how the question was stated and especially not with the part about how the host selects a door.
If you model this game where the host chooses randomly, and might open the car door (when that hapoens the player instantly loses) , then there is no point switching.
I think the fact this does matter is the source of many people's confusion.
I don't think I've ever seen this rule in any variants.
Since we're making up rules: Could the player not still have the option to switch, and thus win the game?
I'm not convinced that I am wrong after your explanation.
Either way, my point is that focusing on the problem statement as the "main thing that seems to cause the paradox" allows the reader to stop there and disregard a far more interesting discussion about biases.
Why not? Your chances of choosing the correct door were 1 in 3 from the start. That doesn't change with the fact that the host opens the doors at random.
Otherwise, as a host, I would only offer the players to change if they picked the car. (And if they heard about this paradox before, they might even change their choice)
Given the description from the article:
> Suppose you're on a game show, > and you're given the choice of > three doors: Behind one door is > a car; behind the others, goats. > You pick a door, say No. 1, and > the host, who knows what's behind > the doors, opens another door, > say No. 3, which has a goat. He > then says to you, "Do you want > to pick door No. 2?" Is it to > your advantage to switch your > choice?
I'd say, no, it is not to my advantage because I'd think the host would only ask me to switch if I had taken the "right" choice and want to make me lose. Unless I knew that the host always ask if one wants to change, in which case the paradox indeed apply.
If the host does not have to open a door for the candidate (which is quite likely, he's playing his own strategy of making the show exciting, not predictable), then the usual solution (always switch) is not correct.
All this, and probably any variation and every solution of the problem that comes up in this thread (and probably every other Monty Hall forum thread in the post 3 decades) are discussed extensively in the Wikipedia entry (e.g. https://en.wikipedia.org/wiki/Monty_Hall_problem#Other_host_...).
Maybe every time a new Monty Hall thread comes a mod should just stick the Wikipedia entry at the top. I've never seen anything in any of the following discussion that hasn't been covered in Wikipedia already.
The strange thing is that "choosing to stay" somehow doesn't behave like a new 50/50 choice, but choosing to change does.
Intuition implies that given a random choice between a, b and c - chances are 1:3. And given a new choice a or b, chances are 50/50. But you only get to act on new information (make a new choice) if you change.
I must admit I'm still confused on this, and wonder if it bears out in simulation (that always change is better than random stay/change when offered to choose again
Ed: paultopia has a nice simulation and explanation below:
https://paul-gowder.com/montyhall/
Significantly - staying means the player remains at 1:3, but since we now know the chosen door, or the alternate, holds the car - if staying is 1:3 wins, changing must account for the remaining 2:3 - since there are only two options. And random choice is also better than staying (it's 50/50) - but worse than changing.
This is not the correct interpretation. In fact, the choice of getting the car if you switch is not 50/50, up from 1/3. It's 2/3. The choice of winning if you don't switch is 1/3.
The reason for this is that the second choice is not independent of the first choice, so you shouldn't model them as different choices.
Essentially the problem could be reformulated as: you choose one door at random. Then the host asks you if you would rather keep that door, or choose to get what is behind both of the other doors. The door opening is just a red herring.
I can’t argue with what you’ve observed, but my own experience is not that there’s a misunderstanding about the question, but that people simply don’t think properly about the question. Nobody I’ve ever seen confused about the answer was confused by the question, and many numerically literate people I know have struggled with it.
> https://stats.stackexchange.com/questions/373/the-monty-hall...
____
The topic of the counter-intuitive nature of probability reminds of Newton's letter to Pepys - "In 1693, Isaac Newton answered a query from Samuel Pepys about a problem involving dice. Newton’s analysis is discussed and attention is drawn to an error he made."
Here is the classic Newton-Pepys Problem http://www.datagenetics.com/blog/february12014/
Here is the Newton-Pepys problem explained by Professor Joe Blitzstein in the Harvard class Stats110: https://www.youtube.com/watch?v=P7NE4WF8j-Q&feature=youtu.be....
Here is further discussion about the logical error Newton made in his solution: http://arxiv.org/pdf/math/0701089.pdf
Therefore, it seems to me that many people fall for it not so much because they misunderstand the probability but because the rules of the game are designed to be misleading.
I always wondered why it's not 50/50 if I enter the room late. How can a past event that now seems irrelevant change the odds.
Basically you watch Monte jump around and see which doors he avoids because they have prices. Now you can't make that observation about your own door because he'd never touch it anyways and he jumps just once but sometimes skipping a door if his random hits the price. The fact that it's just 3 doors so just one is left makes it even more quirky, but doesn't change much.
So you know the other door is a door monty pontentialy avoided not to reveal the price.You don't have that information about your door.
funny how different people grasp things.. this code example didn't really click with me, but someone else explained it by imagining 100 doors, not 3. After you choose one door, 98 of the remaining 99 doors (all with goats behind them..) are opened.... leaving 1.
stay or switch? :)
Author is also a HNer: https://news.ycombinator.com/user?id=loup-vaillant
This note in particular could be a lesson for many things in life:
> When I believe the answer is 1/3, and I hear someone say the answer is 1/2, my response is not "You're wrong!", rather it is "How interesting! You must have a different interpretation of the problem; I should try to discover what your interpretation is, and why your answer is correct for your interpretation." The first step is to be more precise in my wording of the experiment...
There are dozens of videos explaining conditional probability on youtube, but basically, the taking away of a door gives us additional information about the state of the system. It is counter-intuitive, but it's not a mystery.
This principle is used everywhere to optimize real-world problems.
I much rather prefer that for literate programming.