Log In  

Hello.

While this could be worked into a Pico-8 cart I wanted to ask first if someone could explain the answer to this question.

The premise is a simple one.

You are in a game show and you are given 3-doors to choose from. Behind two of the doors are goats, which I'm assuming you can't take home as a pet, yet the 3rd has a brand new car in it, your prize for choosing correctly.

And you don't know which item is behind each door.

So let's suppose you choose the first door and as you are reaching for it you are STOPPED by the host who opens the third door revealing a goat. The host then asks you would you like to continue to open the door you chose (the 1st) or would you like to change and choose the 2nd one instead.

The answer we are looking for is what is the chance of choosing the car at this point ?

Initially you have a 1 out of 3 chance of choosing the car.

Yet according to what is considered the most intelligent person in the world, not me, sadly, :) , they said after the 3rd and only the 3rd door is open revealing the goat, that you have a 2 out 3 chance for picking the car.

But I can't see this and neither did many other learned and intelligent people I see only a 50-50 chance of getting that car now just as they did.

Can someone explain to me, use code if you like, how it is possible that you have a 2 out of 3 chance for picking the car if the last door is opened revealing a goat still leaving two doors, one of which is a goat, and the other of which is the brand new car ?

I even considered it psychologically. Suppose the game show host WANTED you to win ? Well then it could be that he chose the 3rd door revealing it to be a goat to WARN the player that they are about ready to pick a goat, too, behind the 1st door, as the host obviously knows where all the prizes are, and they want you to CHANGE and pick the 2nd door where the car is so they win it ?

But now let us suppose the game show host wants you to LOSE ? That is the manager of the program said the host can keep the car for himself if the player does NOT choose it. Therefore the host seeing that the player is getting ready to open the correct door with the car, the 1st door, opens up the 3rd door revealing the goat and then asks the player would they like to change their choice from the first door to the 2nd door, hoping it will encourage them to change doors and get the wrong answer.

At all times we must assume the HOST knows where all 3-items are, otherwise he would not just willy nilly pick the 3rd door for it - knowing it to be a goat. If he just jumped in and randomly picked, it could've been the car - and then where does the game go ? So no, that option is out. The host clearly knows where the two goats are and the vehicle at all times.

So ... how can it be proven, clearly and easily, under these circumstances that the player after the host opens the 3rd door revealing a goat ONLY, leaves the player a 2 out of 3 chance of winning the new automobile instead of what is more to be believed a 50-50 chance for it ?

And don't forget the player could've been reaching for the second or third door as well. And we must think that once again the game show host reaches for one of the other doors that contains a goat to reveal it to the player - to either encourage or confuse them.

P#123685 2023-01-05 00:12 ( Edited 2023-01-05 00:21)

2

Okay, so firstly I'll point out a really important point that I've seen many very intelligent people miss about probability: it's based on the combination of known information and current situation. In this case, that means the probability of the entire scenario you are describing is different than the probability of each moment in isolation.

This is important, because the 2 out of 3 chance isn't for just opening the door after the reveal. It's for the strategy when playing the game. If you know the host is going to behave that way, then the plan to change your mind gives you a 2 out of 3 chance. If you analyze just the opening of 1 of the 2 doors that are left without any of the knowledge of what happened before that, then the probability is 50-50 like you would assume.

That said, here's why the strategy of changing your mind gives you a 2 out of 3 chance:

-- Known info --

  • The host knows what's behind each door.
  • The host will only reveal a goat. (This is very important)
  • Only one of the 3 doors has the prize.
  • Both the other 2 doors has a goat (not just one).
  • The host will definitely let you change your mind after the reveal.
  • The host won't reveal the door you chose.
  • All 3 doors have an equal chance to contain the car. (This is also important because probability theory doesn't assume that all possibilities always have an equal chance of happening, despite what many smart people believe)

-- the analysis --
The full set of possibilities here is not helpful to include because they're not all equal chance. Fortunately, the possibilities all fall under only 2 categories with clear weights. Those are

Category 1. You chose the car on the first try.
Category 2. You didn't choose the car on the first try.

The exact details of which door you chose don't matter, because there's no known info about the doors themselves nor any implications within the order of the doors. The host's behavior doesn't matter because the host is required to act based on full knowledge and in a way that doesn't change anything.

Since there are 3 doors and 1 car, Category 1 has a 1 out of 3 chance and makes changing your mind the wrong choice while Category 2 has a 2 out of 3 chance and makes changing your mind the correct choice. Thus, for the overall scenario, the strategy of changing your mind has a 2 out of 3 chance to be correct.

-- additional notes --
This problem is often called the Monty Hall problem, because of a gameshow with Monty Hall as the host. The point of the scenario was two-fold: 1. have a nice dramatic build-up and 2. Make the odds be against the contestant. The creator of the scenario knew that contestants tended to not change their mind, so this game gives something similar to a 2 out of 3 chance of saving the production money (but not actually that number because not all contestants follow suit). They actually stopped using that game in the gameshow when a mathematician published the trick behind it.

P#123691 2023-01-05 02:05

You'll forgive me if I PRINT OUT your answer, @kimiyoribaka. Wow ! What a brainweave ! :D

OK having gone through it, and wow, you really did answer it I think. Yet I am concerned about the part you wrote below, "tended to not change their mind."

So ... it's not 100% guaranteed to get a 2 out 3 then in all circumstances, is this then what you are saying ? Because if it is ... I think, I could be wrong ... that is not what I was looking for.

Wow this could be coded visually to show every possible permutation. It would actually be pretty interesting to code this I think.

P#123692 2023-01-05 02:48

@dw817
The chance of winning if you change your mind, assuming the host is being fair, is always 2 out of 3. The chance in each episode of the production company being able to use the same car again for the next episode, assuming the contestant doesn't know the math, is a little less than 2 out of 3 but more than 50-50. I just thought it'd be good to understand why the scenario is so precise.

P#123693 2023-01-05 03:13

OK @kimiyoribaka. Suppose I didn't change my mind. Suppose I went with the initial door. Door #1. Is that also out of 2 of 3 and =shouldn't= it be ?

Remember it is 50-50 if it falls either way, the host is helping or hindering you.

P#123694 2023-01-05 03:40

@dw817
No, the chance of winning if you don't change your mind is 1 out of 3.

As long as the game follows the events you described, then the chances can't be 50-50. An equal probability like that requires an even distribution to begin with and also nothing to happen that hints at the results.

P#123697 2023-01-05 04:10

Well now wait a minute, @kimiyoribaka.

How is changing my "choice" of unknowns going from 1 to 3 to 2 to 3 ?

If I disregard him asking if I would like to change. Yields 1 out 3.
If I heed him asking to change and do so. Yields 2 out 3.

So ... this is all assuming he is trying to help, yes ?

That once again enters the HUMAN element into the equation, which (I hope) doesn't have a bearing on the correct solution of 2 out of 3, yes ?

Ach ... I think this needs to be calculated. Tomorrow I'll write a program to go through the permutations to see what the final odds are - if someone doesn't beat me to it. :)

P#123698 2023-01-05 04:20 ( Edited 2023-01-05 04:39)
2

There are quite a few videos on YouTube that explain the Monty Hall problem. Here's a good one by Numberphile: https://www.youtube.com/watch?v=7u6kFlWZOWg

P#123699 2023-01-05 04:41

Here's an example on YouTube where a guy simulates 1,000,000 games and tallies up the score of wins from switching and wins from not switching: https://youtu.be/2yfLgS6Dbjo?t=122 (start at timestamp 2:02 if that link doesn't do it for you). Spoiler: you win more by switching.

P#123703 2023-01-05 04:46

Hi @MBoffin. I figured some of the greatest minds would show up for this one. I see I was not disappointed. While I may be able to ask some intelligent questions, I may not be able to understand the answer forthcoming. :)

Why on Earth would you have a greater chance of winning by switching ? Unless there is a human element. If there =IS= a human element then, I completely misunderstood the question and there is no need to proceed further as I wanted this to be a purely unbiased mathematical answer based on hard facts and principles of probability.

However if for some reason by switching does have nothing to do with the motives of the game show host or even the player trying to 2nd guess - then I'm not entirely sure how switching would still would increase your odds.

P#123704 2023-01-05 04:51 ( Edited 2023-01-05 04:57)
1

Looks like MBoffin responded while I was typing this. Oh well, the youtube links are probably as good as what I have below anyway, but here's the pico-8 solution if you'd like.

I was about to start trying to explain the idea that assuming the host is human and not a machine designed to follow the rules of the game is pointless, but then it occurred to me that I might as well show you that point instead. Here's a cart that simulates the scenario when changing your mind 10000 times. The code is written to always reveal a goat after the first choice and for the second choice to be neither the original choice nor a goat. When I ran it several times, the result differed, as expected due to 10000 only being so big, but the result was always within 100 of the expected %66 probability. The host being "human" is not needed for the result. If you wish to check for not changing one's mind, just have victories be incremented when doors[choice] == 1 instead of doors[choice2] == 1.

Cart #monty_hall_sim-0 | 2023-01-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Disclaimer: this experiment assumes that pico-8's rnd() function does a good job of simulating randomness.

P#123700 2023-01-05 04:52

Did you watch the first video I linked? (4mins long)

P#123705 2023-01-05 04:54

Actually I'm more interested in you guys, @MBoffin. It seems that @kimiyoribaka has already proven it is the case.

Now my query is WHY does this work ? How does 2nd guessing give you the advantage - what mechanics are involved that shift you from 50-50 to 2 out of 3 ?

. . .

And yes I'll look at the video now. I kind of don't want to open the present before me. I'm more fascinated not so much with HOW the answer is derived but WHY it gets the correct answer each time.

P#123706 2023-01-05 05:00 ( Edited 2023-01-05 05:02)

... Okay guys, in this video at this time: https://youtu.be/7u6kFlWZOWg?t=175

it gets weird. he is saying "He is indirectly telling you exactly where the car is."

So ... there is a human element involved in this then, yes ?

So if I am to understand this correctly, let's say it was done entirely with robots who are neither interested in the car nor goats, after the 3rd door was open then it WOULD be a 50-50 chance for the other robot to get the car, yes ?

There is no passion or mental drive behind Monty wanting the player to win - and that is affecting the answer ?

It is then stated that you have a 2/3 chance of winning by changing merely because MONTY WANTS you to win ??

If that is the case then, at least to me, this is a bit of a trick question. It's like the classic trick math question.

"There are 10 blackbirds sitting on a fence. You have a rifle and shoot one of them, how many are left ?"

Yes - that sort of answer. And to me, that's no answer at all.

Not now as it's getting late - but tomorrow I'm going to sieve through @kimiyoribaka's code and see if I can understand what is happening in it ...

If someone else wants to jump in to show how this logical conundrum functions or to write your own code to test this equation - please be my guest.

P#123708 2023-01-05 05:14 ( Edited 2023-01-05 05:21)
1

@dw817
Okay, maybe I should have looked at the youtube video before assuming it was good. That's a terrible explanation that makes me wonder if the person in the video understands.

Look, the actual scenario once you clear away the fluff is very straight forward. Your first guess has a 1/3 chance of being the car. The events with the "host" are confusing but ultimately, the second choice is a bet regarding if your first guess was correct.

If you change your mind, you're betting that your initial guess was wrong. Since the initial guess had 1/3 chance of being the car, betting against it gives you a 2/3 chance. 1 - 1/3 = 2/3 . QED.

P#123709 2023-01-05 05:24
1

There's nothing tricky or any kind of human element of "want" or "not want". It's just math. That's why you can simulate it on a computer and get the same result every time. The first video I linked explains the probability fairly clearly. At the timestamp you linked, in the next sentence after what you quoted, he says the math right there. "In two thirds of the games, Monty can only open one door." Meaning in two thirds of the games, if you switch, you'll win.

Here you go, with comments:


P#123710 2023-01-05 05:35
3

@kimiyoribaka,

Thanks for the explanation, I'd read about the Monty Hall Problem before, but it never quite clicked.

Basically, if you don't change your guess, you're betting that it was right, which has a probability of 1 out of 3. If you do change it, you're betting that it was wrong, which has a probability of 2 out of 3.

P#123711 2023-01-05 05:53 ( Edited 2023-01-05 07:10)
1

@JadeLombax's comment is probably the shortest and clearest explanation of the Monty Hall's problem that I have ever seen. Fantastic!

P#123733 2023-01-05 13:59

Hi guys.

Despite the brevity of both codes written by both @kimiyoribaka and @MBoffin, it still seems fairly complex to me. I think I can write one that is smaller - and while I still don't understand WHY it gets the answer, perhaps by me writing code to repeat the results, receiving 2/3 for swapping doors, then I might be further to understanding it.

P#123749 2023-01-05 16:56 ( Edited 2023-01-05 19:17)
1

Cart #montyhall-2 | 2023-01-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

I still don't understand how it works - despite writing this code for it.

Yet facts don't lie. Clearly if you stay with your same door you have a greater chance of losing.

If you swap doors as suggested by Monty, you have a greater chance of winning.

. . .

Oh wait ... I think I see. At least for staying on the same door. Yeah, that is a 1 out of 3 chance. I couldn't see this until I watched the animation steps. Because what you are doing is NOT choosing one door once you are choosing the SAME door twice !

As for the other, it still feels like a 50-50 chance. Interesting stuff ...

. . .

Hmm ! I'm glad I've got this animation. I see now. If you always choose to change, you can only lose if you choose the car initially. That means you will ALWAYS win if you do not select the car first. And selecting the car first is a 1 out of 3 chance.

However, if you are guaranteed to win by NOT selecting the car, then those odds become 2 out 3. So to win 66% of the time, simply randomly do not select the car and always choose to change doors.

What an interesting mental exercise ! :D Thank you for sharing your experience peoples.

P#123756 2023-01-05 18:52 ( Edited 2023-01-05 22:32)

Oh yeah, Monty Hall Problem. One of the things that made it 'click' for me was watching a video that explained it like this: If you had 500 doors, picked 1, and then the gameshow host opened 498 doors to reveal goats inside them... Would you switch to the remaining 1 door that's still closed?

The point of this little thought exercise is to realize that the gameshow host is introducing a logical NOT operator to the game!

By eliminating 100% of the remaining goats and then offering the choice to swap doors, your initial 1/3rd chance to guess correctly can retroactively become a 2/3rds chance that you guessed correctly!

Here's a quick run-through of what playing the game is really like, where the choice in [Brackets] is the player's initial choice. Consider that the player is choosing blindly. This is essentially a completely random choice between goats and the car, so don't worry about the order or permutations or whatever...

You've blindly picked a door! A goat is then eliminated! You may swap to the last door! Should you swap?
[Goat] Goat Car > SWAP to win
Goat [Goat] Car > SWAP to win
Goat Goat [Car] > Stay to win

Let's remove even more of the gameshow theatrics, and make it more of a pure logic puzzle.

Given a random value in the following set, which action is most likely to result in a True value?
[False] False True > INVERT to win
False [False] True > INVERT to win
False False [True] > Stay to win

And now, consider the following door setup:

False False False False False False False False False True

After making a blind, random choice between each of those values, would YOU invert that random value to try and win?

P#123805 2023-01-06 06:29
1
P#123839 2023-01-06 18:58

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 18:15:09 | 0.066s | Q:53