Imagine that you have become a participant in the game in which you need to choose one of the three doors. Behind one of the doors is a car, behind two other doors - a goat. You choose one of the doors, for example, number 1, then the presenter, who knows where the car is and where the goats open, opens one of the remaining doors, for example, number 3, behind which there is a goat. After that, he asks you if you would like to change your choice and choose door number 2. Will your chances of winning a car increase if you accept the offer of the presenter and change your choice?
(while the participant of the game knows in advance the following rules:
- the car is equally placed behind any of the 3 doors;
- In any case, the presenter is obliged to open the door with a goat (but not the one the player has chosen) and to offer the player to change the choice;
- if the presenter has a choice, which of the 2 doors to open, he chooses any of them with the same probability)
A. Experiment number (for convenience)
B. We generate a random number from 1 to 3. This will be the door, behind which the car is hidden
CE. for clarity, I placed in these cells "goats" and "cars"
F. Now we are choosing a random door (in fact, you can always choose the same door all the time, because the randomness in choosing a door for a car is enough for a model - check it out!)
G. The presenter now chooses the door of the two remaining to open it to you.
H. And here is the most important thing: he does not open the door, behind which the car, and in case you initially showed the door with a goat, opens another single door with a goat! This is his clue for you.
I. Well, now let's count the odds. Until we change the door - i.e. let's calculate cases when column B is equal to column F. Let it be “1” - won, and “0” - lost. Then the sum of cells (cell I1003) is the number of wins. You should get a number close to 333 (we are doing 1000 experiments altogether). Indeed, finding a car behind each of the three doors is an equally probable event, which means choosing one door, the chance to guess is one of the three.
J. Will be enough! Let's change our choice.
K. Similarly: “1” is a gain, “0” is a loss. And what is the amount? And in total, we get a number equal to 1000 minus the number from cell I1003, i.e. close to 667. Does that surprise you? Could something else have happened? After all, there are no other closed doors anymore! If the initially selected door gives you a prize in 333 cases out of 1000, then the other door should give a prize in all remaining cases!
Mr. Smith is the father of two children. We met him walking down the street with a little boy, whom he proudly presented to us as his son. What is the likelihood that the other child of Mr. Smith is also a boy?
Source: https://habr.com/ru/post/201788/