Baye's Theorem
Baye's Theorem
If B1, B2, …, Bn are mutually disjoint events with 𝑃(𝐵𝑖) ≠ 0 (𝑖 = 1,2, … , 𝑛) then for any arbitrary
event A which is a subset of ⋃𝑛𝑖=1 𝐵𝑖 such that 𝑃(𝐴) > 0, then
𝑃(𝐵𝑖 )𝑃(𝐴|𝐵𝑖 )
𝑃(𝐵𝑖 |𝐴) = 𝑛 .
∑𝑖=1 𝑃(𝐵𝑖 )𝑃(𝐴|𝐵𝑖 )
1. In a certain assembly plant, three machines, B1, B2, and B3, make 30%, 45%, and 25%,
respectively, of the products. It is known from past experience that 2%, 3%, and 2% of the products
made by each machine, respectively, are defective. Now, suppose that a finished product is randomly
selected. What is the probability that it is defective? What is the probability that it was made by
machine B3?
Solution: Consider the following events:
A: the product is defective,
B1: the product is made by machine B1,
B2: the product is made by machine B2,
B3: the product is made by machine B3.
Using Baye’s rule, the probability that the defective product was made by machine B3 is
𝑃(𝐵3)𝑃(𝐴|𝐵3)
𝑃(𝐵3|𝐴) =
𝑃(B1)P(A|B1) + P(B2)P(A|B2) + P(B3)P(A|B3)
0.005
= = 0.204
0.0245
2. An office has 4 secretaries handling respectively 20%, 60%, 15% and 5% of files of all government
reports. The probability that they misfile such reports are respectively 0.05, 0.1, 0.1 and 0.05. Find the
probability that the misfiled report can be blamed on the first secretary.
Solution: Let 𝐴1 , 𝐴2 , 𝐴3 and 𝐴4 be 4 secretaries of the office respectively handling 20%, 60%, 15%
and 5% of these files. Hence we have
𝑃(𝐴1 ) = 0.2, 𝑃(𝐴2 ) = 0.6, 𝑃(𝐴3 ) = 0.15 and 𝑃(𝐴4 ) = 0.05
𝑃(𝐴1 )𝑃(𝐸|𝐴1 )
𝑃(𝐴1 |𝐸) =
𝑃(𝐸)
0.01
𝑃(𝐴1 |𝐸) = = 0.1142
0.0875
3. One factory F1 produces 1000 articles of which 20 are defective, second factory F2 produces 4000
articles of which 40 are defective and the third factory F3 produces 5000 articles of which 50 are
defective. All these articles are put in one stock file. If one of them is chosen, what is the probability
that it is defective? If a chosen item is defective, what is the probability that it is from factory F1?
Since there are 10,000 articles in all (produced by F1, F2 and F3 taken together), we have
1000 4000 5000
𝑃(𝐹1 ) = 10000 = 0.1 , 𝑃(𝐹2 ) = 10000 = 0.4, 𝑃(𝐹3 ) = 10000 = 0.5
20 40 50
𝑃(𝐸|𝐹1 ) = 1000 = 0.02, 𝑃(𝐸|𝐹2 ) = 4000 = 0.01, 𝑃(𝐸|𝐹3 ) = 5000 = 0.01
Therefore, the probability of selecting a defective article from the lot is,
𝑃(𝐸) = 𝑃(𝐹1 )𝑃(𝐸|𝐹1 ) + 𝑃(𝐹2 )𝑃(𝐸|𝐹2 ) + 𝑃(𝐹3 )𝑃(𝐸|𝐹3 )
𝑃(𝐸) = 0.002 + 0.004 + 0.005
𝑃(𝐸) = 0.011
Using Baye’s rule, the probability that the disease was correctly diagnosed is
5. A shipment of components consists of 3 identical boxes. The first box contains 200 components of
which 25% are defective, the second box has 5000 components of which 20% are defective and the
third box contains 2000 components of which 600 are defective. A box is selected at random and a
component is removed at random from this box. What is the probability that this component is
defective? If the component drawn is found to be defective, what is the probability that it came from
the first or second box?
Solution: Let A , B, C are the first second and third box respectively.
Let P(A), P(B) and P(C) be the probabilities of choosing the first, second and third boxes respectively.
1 1 1
𝑃(𝐴) = , 𝑃(𝐵) = , 𝑃(𝐶) =
3 3 3
E be the event of defective component
Let 𝑃(𝐸|𝐴), 𝑃(𝐸|𝐵) and 𝑃(𝐸|𝐶) denote the probabilities of choosing a defective item from the first,
second and third boxes respectively
600
𝑃(𝐸|𝐴) = 0.25, 𝑃(𝐸|𝐵) = 0.2 and 𝑃(𝐸|𝐶) = 2000 = 0.3
Therefore, the probability of drawing a defective component from an arbitrarily chosen box is
𝑃(𝐸) = 𝑃(𝐴)𝑃(𝐸|𝐴) + 𝑃(𝐵)𝑃(𝐸|𝐵) + 𝑃(𝐶)𝑃(𝐸|𝐶)
1
𝑃(𝐸) = 3 [0.25 + 0.2 + 0.3] = 0.25
The probability that a drawn component is defective and it is from the first box is
1
𝑃(𝐴)𝑃(𝐸|𝐴) 3 × 0.25 1
𝑃(𝐴|𝐸) = = =
𝑃(𝐸) 0.25 3
The probability that a drawn component is defective and it is from the second box is
1
𝑃(𝐵)𝑃(𝐸|𝐵) 3 × 0.2
𝑃(𝐵|𝐸) = = = 0.2667
𝑃(𝐸) 0.25
Consequently, the probability that a drawn component is defective and it is from the first or second
box is
𝑃(𝐴|𝐸) + 𝑃(𝐵|𝐸) = 0.3333 + 0.2667 = 0.6.
6. A company manufacturing ball pens in two writing colours blue and red make packets of 10 pens
with 5 pens of each colour. In a particular shop it was found that after sales, packet 1 contained 3 blue
and 2 red pens, packet 2 contained 2 blue and 3 red pens, packet 3 contained 3 blue and 5 red pens.
On the demand of a customer for a pen, packet was drawn at random and a pen was taken out. It was
found blue. Find the probability that packet 1 was selected.
Solution: Let 𝑃1 , 𝑃2 and 𝑃3 be the event of selecting packets 1, 2 and 3 respectively at random.
1
∴ 𝑃(𝑃1 ) = 𝑃(𝑃2 ) = 𝑃(𝑃3 ) = 3