You are on page 1of 7

1.

5 Bayes’ theorem
We begin this section by illustrating Bayes’ theorem with an example

EXAMPLE: Box B1 contains 2 red, 4 white balls, box B2


contains 1 red, 2 white balls, and box B3 contains 5 red and 4
white balls.
Say that the probabilities for selecting the boxes are not the same
(unequally likely) but are given by
P(B1) = 1/3, P(B2) = 1/6, P(B3) = 1/2
The experiment consists of selecting a box with these
probabilities and then drawing a ball at random from that box

Let us compute the probability of drawing a red chip—say,


P(R)
Note that P(R) is dependent first of all on which box is selected and then on the
probability of drawing a red ball from the selected box. That is, the event R is the
union of the mutually exclusive events B1 ∩ R, B2 ∩ R, and B3 ∩ R.
Thus, P(Red) = P(Box1 ∩ Red) + P(Box2 ∩ Red) + P(Box3 ∩ Red)
Now, by multiplication rule , we get
P(Red) = P(B1) P(R|B1) + P(B2) P(R|B2) + P(B3) P(R|B3)

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
𝟐 𝟏 𝟓
𝑷 𝑩𝟏 𝑹 + 𝑷 𝑩𝟐 𝑹 + 𝑷 𝑩𝟑 𝑹 = 𝟏 = + +
𝟖 𝟖 𝟖

We generalize the result of the previous


1.5-2. Bean seeds from supplier A have an 85% germination rate and those
from supplier B have a 75% germination rate. A seed-packaging company
purchases 40% of its bean seeds from supplier A and 60% from supplier B
and mixes these seeds together.
a) Find the probability P(G) that a seed selected at random from the mixed
seeds will germinate.
𝑷 𝑮 = 𝑷 𝑨∩𝑮 +𝑷 𝑩∩𝑮 = 𝑷 𝑨 𝑷 𝑮 𝑨 +𝑷 𝑩 𝑷 𝑮 𝑩
=. 𝟒 ∗. 𝟖𝟓+. 𝟕𝟓 ∗. 𝟔 = 𝟎. 𝟕𝟗

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]

You might also like