News for hackers. Stuff that matters.
Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @02:47PM (#31685226)
Here is a simulation in Clojure showing that the host's knowledge is important.

    (def doors {0 :goat 1 :goat 2 :prize})
    (def choose (rand-nth 3))

    (defn game []
      (let [choice (choose)
            remaining (dissoc doors choice)
            monty (rand-nth (vec (keys remaining)))]
        {:choice (when (= (get doors monty) :goat) (get doors choice))
         :monty (get doors monty)
         :switch (when (= (get doors monty) :goat) (first (vals (dissoc remaining monty))))}))
So Monty is choosing a random door that you have not picked. When he picks the prize, the game is over and you lose.

    (def ten-thousand-games (repeatedly 10000 game))
    (frequencies (map :choice ten-thousand-games))
    ;; {:goat 3309, :prize 3307, nil 3384}
    (frequencies (map :switch ten-thousand-games))
    ;; {:goat 3307, :prize 3309, nil 3384}
Re:Monty Hall Problem by mathgeek on Thursday June 09, 2022 @02:59PM (#31685339)
Can you elaborate on why you feel this proves that the host's knowledge is important in deciding on whether to switch after a goat is revealed from one of the two doors you haven't chosen? As far as I'm aware (but it's been a while), the host's knowledge is only important up to the point where the first door to be revealed contains a goat. All scenarios where the host reveals a prize on the first door to be opened are discarded for the sake of the problem statement (when dealing with the host being ignorant).
Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @04:05PM (#31686099)
Sure. This simulation shows the scenario OP described in his misunderstanding of the MHP, which is that he didn't realize the host was picking with foreknowledge of which doors were which. So if the host doesn't know that and is himself simply picking a random door (and 1/3 of the time, revealing the prize), then switching does not improve your odds.
Re:Monty Hall Problem by ALittleLight on Thursday June 09, 2022 @04:35PM (#31686486)
Foreknowledge has absolutely no effect. Again, go back to the problem I posed where Monty reveals a random door and has revealed a goat. Should you switch or not? The correct answer is that you should.

Monty's knowledge has no effect on the problem or the player's choices. What has an effect is the information the player learns from seeing the revealed door. If the player sees a goat behind the revealed door - that is the relevant information. Whether Monty was surprised or not by the revealed goat is irrelevant.

Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @04:41PM (#31686570)
This is just asserting the same thing over and over again. You can go upthread to the simulation to see that when you are in the "Monty showed you a goat" scenario, the results for staying and switching are equal. If you rewrite the simulation such that Monty always shows you a goat and look at the scenarios where "Monty showed you a goat" (i.e., all of them), you will see that switching wins.
Re:Monty Hall Problem by ALittleLight on Thursday June 09, 2022 @04:53PM (#31686714)
I'm not familiar with Clojure, so I can't point out the error in your simulation, but there undoubtedly is one. Here is a simulation in javascript that supports my point - https://pastebin.com/y5G4PE75

And yes, your simulation should include that Monty always shows a goat. That is given in the problem statement.

Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @04:59PM (#31686803)
> And yes, your simulation should include that Monty always shows a goat.

I feel like I've said this thirty times now, I'm specifically discussing a misinterpretation of the problem where Monty does not know what he's opening, so he sometimes opens a prize door. A game where Monty always opens a goat door is the original, correct Monty Hall Problem, and switching is the correct strategy.

Re:Monty Hall Problem by ALittleLight on Thursday June 09, 2022 @05:13PM (#31686975)
The parent comment that starts this thread[1] is antris writing "The fact that the show host knows what's behind the doors and never chooses a door with the prize behind it is crucial." (Emphasis added). Then, I reply[2], saying "I don't think the host's knowledge is important." I include an example where the host has no knowledge, but has coincidentally revealed a goat, and the best strategy remains switching. In other words, antris says the host's knowledge is crucial and I'm saying the host's knowledge is irrelevant, what matters is what was revealed.

If you are talking about some other scenario - then why? I've just explained what this thread is about. Why would you invent an alternate scenario, not tell anyone about your alternate scenario, and argue that correct interpretations of the scenario I laid out in [2] are wrong because they don't fit with your interpretation of your private variation?

1 - https://news.ycombinator.com/item?id=31684653

2 - https://news.ycombinator.com/item?id=31683850#31684801

Re:Monty Hall Problem by icambron on Friday June 10, 2022 @01:56AM (#31690565)
You are misunderstanding conditional probability. You keep doubling down on the idea that the alternative scenarios don’t matter, but this is mistaken. They very much matter. They are the crux of how Monty Hall “works”.

Bayes’ theorem is the relevant piece of information here. It tells us the relationship between a conditional probability and the information you have. Specifically, the probability of P(door 3 has the prize | host opened door 2 and found a goat) depends in a very important way on P(host opened door 2 and found a goat). You are acting as though it does not, that only the specific current state matters. This is the cause of your confusion: everyone else is working out the conditional probabilities and you are declaring them irrelevant.

The key is that if the host doesn’t know where the prize is, he can’t avoid picking the door its behind. This changes the probability that he would open that door and reveal a goat in the first place, and how that relates to the various places the prize could be. It would be really strange if the host’s behavior were in some way controlled by the location of the prize and this didn’t give you additional information on that location.

To spell it out:

You choose door 1, the prize is behind door 3, host opens door 2

Prop A: the prize is behind door 3

Prop B: the host opens door 2 and found a goat

P(A|B) = P(B|A)P(A) / P(B)

P(A) = 1/3 in either scenario

In regular Monty Hall, the host will open door 2 always if the prize is behind 3, and half the time it is behind 1. So:

P(B) = (1/2)(1/3) + 1/3 = 1/2

P(B|A) = 1

Thus P(A|B) = (1/3)/(1/2) = 2/3. You’ll recognize this as the answer to Monty Hall. Note that conditional probability is foundational to how we got that answer.

Let’s try with the new rules. The host can pick either door, whether it has a goat or not. He can do this because he doesn’t even know which door is which. The host opens 2 half the time. 2/3 of the time he picks that, the prize is not behind it, so he finds a goat.

P(B) = (1/2)(2/3) = 1/3

P(B|A) = 1/2

P(A|B) = (1/3)(1/2)/(1/2) = 1/2

Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @05:18PM (#31687024)
You should update the Wikipedia article that is linked as the OP, since you disagree with its conclusions: https://en.wikipedia.org/wiki/Monty_Hall_problem#Other_host_...

If you scroll down to "Monty Fall," the description of the problem is "The host does not know what lies behind the doors, and opens one at random that happens not to reveal the car" and the solution is "Switching wins the car half of the time." (This is the result demonstrated in my simulation)

Re:Monty Hall Problem by colinmhayes on Thursday June 09, 2022 @03:14PM (#31685517)
So if the host can reveal a prized door your odds are 1/3 prize, 1/3 goat, 1/3 redo. So each door has a 50% chance of having the prize after Monty reveals a goat door. Basically the game is just reduced to having 2 doors instead of your choice vs. all other doors.
Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @02:56PM (#31685303)
The problem statement doesn't permit him to choose the prize. He is explicitly stated as having revealed the goat. Given that, do you switch? Even if he could have revealed the prize (due to lack of knowledge or care), he does not reveal the prize so why are we considering that circumstance?
Re:Monty Hall Problem by antris on Thursday June 09, 2022 @03:05PM (#31685406)
>The problem statement doesn't permit him to choose the prize

Doesn't disallow it either. That's the problem: if you describe the problem without all necessary details, it doesn't work like the Monty Hall Problem is supposed to. If you fill in the details yourself (host never showing the prize in this case) then of course the problem becomes complete and then works like Monty Hall Problem again.

Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @03:08PM (#31685446)
The statement is that he revealed the goat, in what world could that be interpreted as him revealing the prize?

"But he could have" but he didn't.

"But does he always" but he did.

What he always does or could do in an alternative scenario are irrelevant, you are given one scenario: He reveals the goat. Don't overthink it, it's not hard, switch and double your odds or stick with it and keep the 1/3rd chance.

Re:Monty Hall Problem by em500 on Thursday June 09, 2022 @03:29PM (#31685692)
This has already been explained elsewhere in this thread, but here it goes. The original problem formulation in Parade magazine is as follows:

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?

Assumptions about the strategy or decision rule of the host are not irrelevant, but crucial. Suppose the hosts' decision rule (unknown to the candidate) is

IF (candidate's initial choice is correct): open one of the remaining goat doors ELSE: don't open anything

then it's of course not advantagous to switch. The problem with the original Parade formulation is that it only describes what the candidate sees and what the host actually did in one particular scenario, not what rules the hosts must obay. So you don't know if the hosts is playing adversarial games, but you can't rule it out either.

That's why (as per linked article) in later formulations the "standard assumptions" (that the hosts will always open a door with a goat) are usually given explicitly (in which case the solution is also a lot more obvious).

Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @04:01PM (#31686027)
It's entirely possible the host is a cheat and the prize is always moved to whichever door you didn't select so you only can ever get a goat. So don't play the game.

We can come up with a million what-ifs, but none have a basis in the problem statement so there's no point in them.

Re:Monty Hall Problem by em500 on Thursday June 09, 2022 @05:54PM (#31687422)
The original Parade problem is fairly ambiguous and incomplete. Therefor there is no "correct solution". Other formulations typically include the conditions that the host will always open a door, and that door will always contain a goat as explicit assumptions. In that case the math and logic are pretty straightforward.

But in the setting of an actual repeated game show, I think the more realistic case to keep the show interesting is that the host will mix up his strategy, i.e. sometimes he opens another door, sometimes he doesn't. If it's a long running daily or weekly show, if he always opens a door with a goat, the public will work out pretty quickly that it's advantageous to always switch.

Re:Monty Hall Problem by mcphage on Friday June 10, 2022 @08:21AM (#31693032)
The original formulation was probably written under the assumption that the readers were familiar with the game show it was drawn from.
Re:Monty Hall Problem by em500 on Friday June 10, 2022 @11:44AM (#31695744)
As TFA notes the Parade magazine formulation is only "loosely based" on the actual show Lets Make a Deal" hosted by Monty Hall. The real Lets Make a Deal* is a bit more complicated[1], and AFAICT there is no easy analysis or solution for an optimal strategy.

The game described in Parade magazine is different from the TV show game, and the assumptions (about the host's behavior) are incomplete/ambiguous enough that switching is not necesarrily the optimal strategy. This, like almost everything else you can think about the Monty Hall Problem, is also described in TFA[2].

[1] https://en.wikipedia.org/wiki/Let%27s_Make_a_Deal#Format [2] https://en.wikipedia.org/wiki/Monty_Hall_problem#Other_host_...

Re:Monty Hall Problem by antris on Thursday June 09, 2022 @03:18PM (#31685578)
If the door the host chooses is random, and the door you choose first is random, then it's 50/50, because there's only two doors left and neither door choice was made with any information of what's behind the door.

Your chances improve from 1/3 to 1/2 when the host opens the empty door, but whether you stay on the first door or not doesn't matter.

Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @03:21PM (#31685617)
If the host randomly selects the goat or not doesn't change the odds. You should switch. The statement is that he does reveal the goat. Why or how is irrelevant.

One of three doors is selected.

One of the other two is opened, revealing a goat.

Should you switch to the unopened door? Yes, it doesn't matter how that goat was revealed, it could've kicked the door open itself. The odds are better to switch.

Re:Monty Hall Problem by antris on Thursday June 09, 2022 @03:37PM (#31685792)
You're the one who's saying the odds change when the door is opened. I'm the one saying that the odds remain the same (or rather, increase to 50/50) if the doors picked are random.

If the host knows where the prize is, the odds change when the host picks a door, because we know the hosts strategy. If it's just random, then the odds don't change and changing the door doesn't matter, because each unopened door has the same chance of revealing the prize (1/3 before a door is revealed, 1/2 after).

Look up "other host behaviors" on the Wikipedia article, especially the table with "Ignorant Monty", if you don't believe me.

Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @03:53PM (#31685947)
> You're the one who's saying the odds change when the door is opened.

No, I said the player's odds of winning improve if they switch (to the unopened door).

If the host randomly revealed a goat or deliberately revealed the goat is immaterial. A goat was revealed, that's all that matters.

The player has 3 doors to choose from. 1 is selected, 2 are not. That means the other two have a combined 2/3rds chance of holding the prize. The selected door has a 1/3rd chance of holding the prize. A goat is revealed behind one of the two unselected doors. The remaining closed, but unselected, door has a 2/3rds chance of being the one with the prize.

The selected door's odds of being the winning door remains 1/3rd after the reveal. The player's odds of winning improve if they switch.

Re:Monty Hall Problem by cortesoft on Thursday June 09, 2022 @10:39PM (#31689361)
I feel like this is just going around in circles, but let me take a stab at explaining the flaw in your reasoning.

Let’s try to simplify the problem. Let’s assume there are three numbered doors: 1, 2, and 3. A car is randomly placed behind one door, and goats behind the other two.

To make it easy, I will always guess door 1. In the ‘ignorant host’ scenario, we can just have the host always reveal door 2 (the math doesn’t change if he randomly selects which door to open or always opens the same door, so keeping it always door 2 makes it easier to understand).

Ok, so we guess door 1, and the host opens door 2.

1/3 of the time, the host reveals a car. Obviously we would switch in this case, since we know exactly where the car is.

2/3 of the time, the host will reveal a goat. When this happens, 1/2 the time the car will be in door #1 (our door) and 1/2 the time the car will be behind door #3. If the car is not revealed behind door #2, we have a 50% chance whether we switch or not.

With this random reveal style, we end up winning 1/3 (the chance of revealing the car behind #2) + (2/3 * 1/2) = 2/3rds chance of winning… which makes sense, because we get our original 1/3 chance plus the free 1/3 chance it is behind the revealed door. Crucially, though, it doesn’t matter if we switch or not. You always win if it is behind door #2 (because you are shown it) and win half the time if it is behind #1 or #3.

Contrast this with the case of the host always revealing a goat. In that case, you again have a 1/3 chance of it being behind your door #1 choice. However, in this case, you can essentially guess that your choice was wrong (2/3rds chance) by switching your guess, which will make your guess correct if it is either in door #2 or #3 (since the host will reveal the one which it isn’t behind if it is one of 2 or 3.)

In both the ignorant host and non-ignorant host situations, you end up with a 2/3rds chance of getting the car. However, in the ignorant host situation, you don’t need to switch unless the host shows the car in his reveal to get the 2/3rds odds.

Of course, it never hurts to switch in either case, so always switching is not a bad strategy, just not necessary if the host knows nothing.

Re:Monty Hall Problem by antris on Thursday June 09, 2022 @04:25PM (#31686341)
From the article:

The original problem:

>The host acts as noted in the specific version of the problem.

>Switching wins the car two-thirds of the time.

The random door pick:

>"Monty Fall" or "Ignorant Monty": The host does not know what lies behind the doors, and opens one at random that happens not to reveal the car.

>Switching wins the car half of the time.

Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @04:07PM (#31686112)
> The problem statement doesn't permit him to choose the prize.

I agree, but this subthread is discussing a misinterpretation of the problem statement, and asking the question about whether switching still matters if the host is also picking randomly. This is showing that it does in fact matter whether the host is picking deliberately or randomly.

Re:Monty Hall Problem by Jtsummers on Thursday June 09, 2022 @04:13PM (#31686179)
OP for the thread:

> I was told about this problem and the person telling it didn't say anything about that, just that you pick a door and the host opens another one which doesn't have a prize behind it. So I thought the probabilities don't change at all because the host just picked a random door. [emphasis mine]

It doesn't matter if it was at random or deliberate. It matters that a non-prize (goat in most versions) is revealed. The question is about one very specific scenario, even in what antris was originally given: The goat is revealed. In that scenario, you switch.

The OP misunderstood the problem because they forgot (as many others have in this discussion) that it's about one scenario, not about all times. If Monty selects a door at random and reveals the prize, then it's not this same scenario anymore so the odds of that situation are necessarily different over all scenarios. And if we include all possible scenarios (really, two) then the odds of winning drop, but only because you have a 100% chance of losing when he reveals the prize (or 100% chance of winning and the odds increase).

This is the fundamental misunderstanding in many of the comments. If I tell you, "We select, each day, either a prize or a tiger to put behind this door at random. Today it's the tiger. Do you open it?" You'd be a fool to open it. And over all scenarios you'd have a (if chosen uniformly) 50/50 chance of getting the prize or the tiger. But if today I tell you, "It's the prize" should you open it? There's a 100% chance it's the prize, I've told you it's the prize.

Now we can get into adversarial situations, whether I'm honest or not. But that's diving into something entirely different and makes it impossible to consider the problem statement because we'll be chasing nonsense after a few minutes. I've just told you, 100% chance it's the prize today. You should open it.

The Monty Hall problem is the same. It is one scenario, a goat is revealed. The reason or mechanism of that reveal is irrelevant. He could know it, he could not know it. He could have revealed the goat by dumb luck. Or maybe because it started kicking at the door and was too obvious not to reveal. But today, for this game show he revealed a goat. So your odds are better if you switch. And even antris' original statement presented that scenario, they just answered a different question.

Re:Monty Hall Problem by jdminhbg on Thursday June 09, 2022 @04:22PM (#31686302)
> It doesn't matter if it was at random or deliberate. It matters that a non-prize (goat in most versions) is revealed. The question is about one very specific scenario, even in what antris was originally given: The goat is revealed. In that scenario, you switch.

You can just go back to the simulation numbers and check. If you eliminate the games where Monty "wins" (i.e., reveals the prize), you are in the specific scenario you described. You have chosen a door and Monty has revealed a goat, and you win 3309 times by staying and 3307 times by switching.

If you rewrite the simulation to follow the correct problem statement (that Monty knows and always picks a goat), you will see that switching is in fact the correct strategy.