Introduction to Bayesian algorithm principle

1, Introduction to Bayesian

Bayesian (about 1701-1761) Thomas Bayes, English mathematician, Bayesian approach stems from his lifetime in order to solve a "inverse probability" problems write an article.

2, Bayesian problem to be solved

Forward probability: Suppose there are N bags white ball, M black balls, with closed eyes reaching out a ball, work out what is the probability of black ball.

Reverse probability: After not know in advance if the proportion of black and white ball inside the bag, but close their eyes to work out a (or several) ball, taken out to observe the color of the balls, then we can on this black and white ball inside the bag What kind of speculation proportion made.

The real world itself is uncertain, observation of human limitations, we observed only daily results on the surface of things, but we can offer a guess based on the results of these things on the surface

3, Bayesian formula

In an example will be described:

60% of boys in schools, girls accounted for 40%, which boys always wear trousers, the girls wear trousers half half wearing a skirt.

Forward probability: a randomly selected student, the probability of him (her) to wear trousers and skirts probability is how much

Reverse probability: a student came face to wear pants, you only see him (her) whether wearing trousers,
but was unable to determine his (her) sex, you can infer that he (she) is the probability girls how much is it?

If the total number of schools on the assumption that people inside the U, the number of boys to wear trousers:
Here Insert Picture Description

Wherein, P (Boy) = is the probability of 60% male, P (Pants | Boy) is a conditional probability, i.e. the probability of trousers worn under what conditions this Boy, this is 100%, since all men wearing trousers .

Similarly, the number of girls to wear trousers:

Here Insert Picture Description

The total number of wear trousers:
Here Insert Picture Description
the next step to solve, there are people who wear trousers how many girls

Here Insert Picture Description
That is:
Here Insert Picture Description
find the total number of the person within the campus U can be eliminated:
Here Insert Picture Descriptionwherein, in fact, the denominator P (Pants), molecular fact P (Pants, Girl), so the Bayesian formula is as follows:

Here Insert Picture Description

Guess you like

Origin blog.csdn.net/qq_43660987/article/details/91444142