I still don't understand the monty hall problem

i still don't understand the monty hall problem

what's the easiest, shit-stupid way to visualize and make sense of it

Make the numbers bigger.

100 doors, 1 prize.
Choose a door.
He opens all the other doors except yours and one other, showing 98 goats.
Will you bet you chose the prize the first time? Or did he just show you where the prize is?

man i went to like 10 different sites and your explanation is the only one that's made me understand this shit. thanks

so whats the probability then if you understand it so well

Are you autistic?

are u on Veeky Forums?

Here is the worlds best proof of the monty hall problem. Let 1 be the prize, and zero be the goat.

In the first part of the problem you select a door at random out of 3 doors. Draw a tree with 3 branches 1, 0, 0 representing each possibility.

For the first branch, you selected 1. Add a new branch with 1 (stay) and 0 (switch)

For the second branch, you selected 0. Add a new branch with 0 (stay) and 1 (switch)

For the third branch, you selected 0. Add a new branch with 0 (stay) and 1 (switch)

The final tree has 6 possible outcomes. Of the branches in which the user switched numbers you win 2/3 times. Of the branches in which the number stayed the same you win 1/3 times.

Draw the tree, see how easy and boring it is. THen never think about the monty hall problem again for the rest of your life.

also paul erdos is retarded, fucking jew.

Changing doors is the same as picking the opposite prize to the one you originally choose, and you are twice as likely to have picked that goat originally

fuuuuck breeeeh

>mfw no code tags for Veeky Forums

I got a revolutionary scientific development. I wrote a simple program:

int getRandomNumber(int min, int max)
{
static const double fraction = 1.0 / (static_cast(RAND_MAX) + 1.0); // static used for efficiency, so we only calculate this value once
// evenly distribute the random number across our range
return static_cast(rand() * fraction * (max - min + 1) + min);
}

struct Door {
bool doors[3];
};

void init_door(Door * d) {
int setup = getRandomNumber(0,2);
d->doors[0] = d->doors[1] = d->doors[3] = false;
d->doors[setup] = true;

}

void monty_hall() {
Door door;
int pick;
double stay,change;
stay = change = 0.d;

while(true) {
init_door(&door);
pick = getRandomNumber(0,2);

if(door.doors[pick]) stay++;
else change++;

std::cout

> not using matlab
how the fuck am i supposed to run and debug this?

...

>Any Veeky Forumsentist got an explanation for this?
your code sucks

Each door has 1/3 chance of a win. Your door has a 1/3 chance to win and the other 2 doors combined have a 2/3 chance of a win.

Even when you open one of the two doors you didnt pick, that group still retains a 2/3 chance of a win.

Thus, you have better odds of winning if you switch.

Imagine doors with 99 goats and 1 car.
You pick one. Host opens 98 doors with goats. Do you switch or stay?

Imagine 1 trillion doors with 1 car and 1 trillion minus 1 goats. Hosts opens 1 trillion minus two goats.
Do you switch or stay

Imagine you have 3 doors. Behind two are goats, behind one is a car.

So either you get a goat to fuck or a free car. You literally have a 100% chance to win.

You're*

>struct contains only an array
>efficieny in this simple of a program
Holy shit your code is horrifying, is this what "coding is ez" people are like on sci?

Just imagine it with 300 instead of 3 doors. BANG! now it is intuitive

nice filename.

I know everyone is recommending the "large-number-of-doors" analogy, but personally from a cognitive standpoint, I was never satisfied with that treatment.

The Monty Hall problem is quite small. Small enough that you can simply graph out every single possibility, and compare them. In this brute-force comparison, the 2/3 --- 1/3 thing becomes clear. Do that, OP.

I already understand the problem intuitively and mathematically, but this is a lovely visual explanation.

Fucking Greeks man....

...

Your're*

Because no one is mentioning this and it's critical to the problem:

The host always opens doors he KNOWS there is a goat/are goats behind.

If you picked a door, and he opened a door at random and the goat happened to be there, your chance is now 1/2 and 1/2.

If he ALWAYS opens a door that contains the goat, THEN switching gives you 2/3 chance vs. 1/3 chance.

If you don't clarify this point, then you could argue it's either 1/2 1/2 or 1/3 2/3, depending on how you interpret the problem.

FFFFFFFFFFFFUCCCCCCCCCCCCCCK DUDE THAT'S SO OBVIOUS

always switch b/c there was a 2/3 chance you were wrong anyway

You did a roulette that guarantees a car for 33%. The host then does a roulette that guarantees a car for 66%.

Monte Hall knows which one the prize is not in, and picks that one. That act changes the game.

This is perfect.

You are code sucks!

I understand the numbers, but in reality, the possiblity of me picking the prize doesn't really change, does it?

if you choose a goat at the beginning the host is forced to show, and thus eliminate, the other one
you have a higher initial chance of choosing a goat, so your chances of the host having to show you the only other goat are higher

Suppose there are n > 2 doors. You select one. The proability that you selected the correct door is 1/n, and the probability that the prize is not behind the door you selected is (n-1)/n. Suddenly, all but one of the n-1 doors you did not select are opened, revealing no prize. Looking at all of the doors you did not select, you know that the chances of there being a prize over there is still (n-1)/n, but now you know for sure that n-2 of those doors do not hide it. That probability, then, is on the remaining closed, unselected door. You should switch.

>using rand() to generate entropy

Everyone always tries to approach this from a probability of winning. It is way easier to look at probability of losing.

A priori you have three doors The probability of picking the loser is 1/3. Once a door is revealed these initial probabilities do not change. You picked your door before the reveal. So the probability that the other door is now a winner is 1 - 1/3 = 2/3.

Monty Hall has some kind of knowledge of the correct doors, his choice isn't random. The original door has 1/3 chance of a car. The remaining two doors form a group with a 2/3 chance. If you open the door to find the goat that Monty knows is there, it's chance is now 0/3. The other group still has a 2/3 chance, and so the remaining door in the group now inherits all 2/3 chance of there being a car, which is better than 1/3. So you switch.

You're are code sucks!*

FUCK

Fuck man, i have struggled to grasp this for so long until now.

Thank you

make a list of all 6 possible positions for G1, G2, and C.
G1,G2,C
G2,G1,C
G1,C,G2
G2,C,G1
C,G1,G2
C,G2,G1
Now, because the 2 goats and the car are hidden by doors, I can only choose from door 1, door 2, or door 3. I pick door 2. We will analyze what happens next case by case. In scenario 1, I pick G2, but the host doesn't show it to me. The host tells me that there is a goat behind door 1, and gives me the option to switch to door 3. Door 3 has the car, so, in scenario 1, switching gives me the car. In scenario 2, i pick G1, host shows me a goat behind door 1, switching to door 3 gives me the car. Scenario 3, I pick the car, host shows me a goat behind door 1, staying with my first choice gets me the car. Scenario 4, I pick the car, host shows me a goat behind door 1, staying with my first choice gets me the car. Scenario 5, I pick G1, host shows me a goat behind door 3, switching to door 1 gets me the car. Scenario 6, I pick G2, host shows me a goat behind door 3, switching to door 1 gets me the car. In 4/6 scenarios, switching wins me the car.

The first explanation given is very good, but I have yet to see my favorite explanation, so I might as well give it.

Think about what happens if you switch given knowledge of what you initially choose. If you choose the prize in the first place, then you will lose if you switch. If you choose a goat in the first place, you will win if you switch. The probability of choosing a goat is 2/3, so you win 2/3 of the time if you switch.