Professional Documents
Culture Documents
5 Bayes’ theorem
We begin this section by illustrating Bayes’ theorem with an example
Suppose now that the ball was red, but we do not know from which box it was
drawn. Compute the conditional probability that the ball was drawn from box B1, namely,
P(B1 |R).
1 2
P(B1 ∩ R) 3 . 6
𝑃 𝐵1 𝑅 = = = 1/4
𝑃(𝑅) 4/9
Suppose now that the ball was red, find the probability that the ball was drawn
from box B2
1 1
P(B2 ∩ R) P(B2) P(R|B2) 6 . 3 1
𝑃 𝐵2 𝑅 = = = =
𝑃(𝑅) 𝑃(𝑅) 4/9 8
P(Red) = P(B1) P(R|B1) + P(B2) P(R|B2) + P(B3) P(R|B3)
Suppose now that the ball was red, find the probability that the ball was drawn
from box B3
1 5
P(B3 ∩ R) P(B3) P(R|B3) 2 . 9 5
𝑃 𝐵3 𝑅 = = = =
𝑃(𝑅) 𝑃(𝑅) 4/9 8
P(Red) = P(B1) P(R|B1) + P(B2) P(R|B2) + P(B3) P(R|B3)
Note
𝟐 𝟏 𝟓
𝑷 𝑩𝟏 𝑹 + 𝑷 𝑩𝟐 𝑹 + 𝑷 𝑩𝟑 𝑹 = 𝟏 = + +
𝟖 𝟖 𝟖
b) Given that a seed germinates, find the probability that the seed was
purchased from supplier A
𝑷 𝑨𝑮 𝟎. 𝟒 𝟎. 𝟖𝟓
𝑷 𝑨𝑮 = = = 𝟎. 𝟒𝟑
𝑷 𝑨 . 𝟕𝟗
EXERCISE: In a factory, there’re 3 machines
Machine1: Produced 35% of the items (3% of them are defectives)
Machine2: Produced 45% of the items (1% of them are defectives)
Machine3: Produced 20% of the items (2% of them are defectives)
If 1 item is selected randomly.
Find
1) Probability that the selected item is defective [Ans: P(defetcive)=0.019]
2) Suppose now that the item was defective, find the probability that the item was
produced from box machine 3 [P(machine3|def)= 0.210526]
3) Suppose now that the item was defective, find the probability that the item was
produced from box machine 2 [P(machine2|def)= 0.236842]
4) Suppose now that the item was defective, find the probability that the item was
produced from box machine 1 [P(machine1|def)= 0.552632]