Bayes' theorem

贝叶斯公式

What is Bayes' theorem?

Given the outcome; the formula reverses the conditioning and updates the prior probability of each cause into a posterior.

TheoremKP000847

Sign in to read the whole lesson, with 2 exercises

Sign in / Sign up

Mastery goals

  • Can find the probability P(Aᵢ∣B) that an outcome came from case Aᵢ, given that B has occurred, using the definition of conditional probability and the law of total probability, and explain prior and posterior probabilities
  • Can write Bayes' formula in its general form and explain how it follows from the definition of conditional probability and the law of total probability

Example 5

Three lathes make parts of the same type. The defect rate of lathe 1 is and that of lathes 2 and 3 is each; the parts made are mixed together. Lathes 1, 2 and 3 make , and of all the parts.

(1) A part is picked at random. Find the probability that it is defective.

(2) If the part picked is defective, find the probability that it was made by lathe ().

Analysis: The part picked may come from lathe 1, lathe 2 or lathe 3, three possibilities. Let "the part picked is defective" and "the part was made by lathe " (). As in Figure 7.1-3, the event can be written as the union of pairwise mutually exclusive events, and the law of total probability gives the probability of .

A₁A₂A₃A₁BA₂BA₃BB
Figure 7.1-3: the large circle is the sample space , divided by three radii into , , ; the small circle in the middle is , divided into , , .

Solution: Let "the part picked is defective" and "the part was made by lathe " (). Then , and , , are pairwise mutually exclusive. From the problem,

(1) By the law of total probability,

(2) "If the part picked is defective, find the probability that it was made by lathe ()" means finding the probability of given that has happened.

In the same way,

is a probability known before the experiment: it is the share of the parts made by lathe , and it is called a prior probability. Once we know that the part picked is defective ( has happened), is how likely it is that this defective part came from lathe ; it is usually called a posterior probability. If the operators have to take responsibility for the defective parts, then , and are the shares to be borne by the operators of lathes 1, 2 and 3.

00.20.40.60.81Lathe 1Lathe 2Lathe 3prior P(Aᵢ)posterior P(Aᵢ∣B)
The prior probabilities (, , ) and the posterior probabilities (, , ) of the three lathes in Example 5.

Related points

All points in this topic

Cite this page: Bayes' theorem · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP000847