Use probability tree to analyze goat's car problems

Source: Internet
Author: User
ArticleDirectory
    • Yangche Problems
    • Bayesian inference
Yangche Problems

The Monty Hall problem, also known as Monti Hall, is a famous probability problem. It originated from a video game:

If you are a contestant in a game, there are three closed doors in front of you. One is behind a car, and the other two are behind goats. The host knows the situation behind the door, but you don't know. Your goal is to guess which door is behind the car. If you guess right, the car will be yours. First, you can choose one door, which we call a. The other two are B and C. Then, the host opens a goat door in B or C to help you eliminate it. Finally, the host will ask if you want to change your initial choice? You can choose door A or another unopened door.

There have been many different analyses about this question, and they have been arguing over each other. For example, the following typical analyses:

Analysis 1: The probability of choosing A, B, and C for the first time is 1/3. The probability that the host does not change the probability of A, B, and C after a door is exclusive. Therefore, whether or not the probability of a change is 1/3.

Analysis 2: The probability of selecting a door for the first time is 1/3. After the host excludes one door, the probability of the remaining two doors is 1/2. Therefore, no matter whether the probability of change is 1/2.

Analysis 3: The probability of choosing a for the first time is 1/3. If the host does not select a door again, the probability of choosing a for the first time is 1/3, selecting another door can increase the probability to 1/2.

Analysis 4: The probability of choosing a for the first time is 1/3. If the host does not select a door again, the probability of choosing a for the first time is 1/3, selecting another door can increase the probability to 2/3.

Which of the following analyses is true? In fact, we can intuitively see through the probability tree:

If you do not change the selection policy, the probability of first-time right selection is 1/3, and the probability of wrong selection is 2/3. If you select the right for the first time, the probability of continuing to select the right is 1. If you select an error for the first time, the probability of continuing to select an error is also 1. Therefore, the probability of final right selection is 1/3.

Under the change selection policy, the probability of first-time right selection is 1/3, and the probability of wrong selection is 2/3. if you select the right for the first time, the probability of changing the right after the change is 0. if an error is selected for the first time, the probability of right selection after the change is 1. therefore, the probability of final right selection is 2/3.

With the probability tree tool, the analysis of problems is much more intuitive. We can also think further: if the problem becomes n doors, and the host will exclude M doors, what is the probability of changing the choice and not changing the choice?

Bayesian inference

The probability tree can be used not only to solve the goat's car problem, but also to use classical Bayesian inference. The following is a typical example:

In summer, a male in a park may wear 1/2 sandal sandals, and women may wear 2/3 sandals. in this park, the ratio of male to male is usually, if you meet a random sandal person in the park, what is the probability of Gender male or female?

All those who have learned probability theory know that this is the most classic Bayesian inference problem. According to Bayesian formula:

 
P (A | B) = P (A & B)/P (B) = P (a) * P (B | A)/P (B)

Available

P (male | sandal) = P (male and sandal)/P (sandal) = P (male) * P (sandal | male)/P (sandal) = (2/3*1/2)/P (sandal) = (1/3)/P (sandal) P (female | sandal) = P (female and sandal) /P (sandals) = P (female) * P (sandals | female)/P (sandals) = (1/3*2/3)/P (sandals) = (2/9)/P (sandal) 1 = P (male | sandal) + P (female | sandal) = (1/3 + 2/9)/P (sandal) => P (sandal) = 5/9 p (male | sandal) = 1/3*9/5 = 3/5 p (female | sandal) = 2/9*9/5 = 2/5

The above solution needs to be familiar with Bayesian formulas, which not everyone can remember at any time. Next we will analyze them through a probability tree, which is very intuitive.

Based on the probability tree, we can intuitively see the probability of each branch

 
P (male | sandal)/P (female | sandal) = (2/3*1/2)/(1/3*2/3) = 3/2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.