Law of Total Probability and Bayes' Theorem Examples
Law of Total Probability and Bayes' Theorem Examples
Example 1
A different number of light bulbs are present in three boxes. The first box has 12 bulbs, out of which 5
are dead. The second box has eight bulbs, out of which the dead ones are 3. The third box has nine
bulbs, out of which two are dead. Find the probability of selecting a dead bulb randomly from one of the
three boxes.
Solution
Total number of boxes = 3
The number of boxes from which the bulbs will be chosen = 1
D = {Selecting a dead light bulb}
B1 = {Selecting a light bulb from box 1}
B2 = {Selecting a light bulb from box 2}
B3 = {Selecting a light bulb from box 3}
P{B1} = P{B2} = P{B3} =1/3
The probability of choosing the girl from one of the three groups will be calculated using the total
probability rule.
P(G) = P(G|GR1)P(G1) + P(G|GR2)P(GR2) + P(D|G3)P(GR3)
P(G) = (8/15)(1/3)+(4/9)(1/3)+(7/12)(1/3) = 281/540
Example 3
There are four bags. Each bag has 50 balls in it. There are 30 blue balls in the first bag, 45 blue balls in
the second bag, 35 blue balls in the third bag, and 15 blue balls in the fourth bag. Find the probability of
selecting a blue ball from one of the four bags at random.
Solution
Total number of bags = 4
B1 = {Selecting a ball from bag 1}
B2 = {Selecting a ball from bag 2}
B3 = {Selecting a ball from bag 3}
B4 = {Selecting a ball from bag 3}
B = {Selecting a blue ball}
Example 5
Three identical boxes contain red and white balls. The first box contains 3 red and 2 white balls, the
second box has 4 red and 5 white balls, and the third box has 2 red and 4 white balls. A box is chosen at
random and a ball is drawn from it. If the ball that is drawn out is red, what will be the probability that
the second box is chosen?
Let
A₁ = {Choosing the ball from the first box}
A₂= {Choosing the ball from the second box}
A₃ = {Choosing the ball from the third box}
R = {Drawing a Red ball}
P(A₂|R)=
4 1
( )( )
P( R∨ A ₂)P( A ₂) 9 3
= =¿10/31
P ( R∨ A ₁)P( A ₁)+ P( R∨ A ₂)P( A ₂)+ P( R∨A ₃)P (A ₃) ( 3 )( 1 ) .+( 4 )( 1 ) .+( 1 )( 1 )
5 3 9 3 3 3
Example 6
Two urns contain respectively 2 red, 3 white, and 3 red, 5 white balls. One ball is drawn at random from
the first urn and transferred into the second one. A ball is then drawn from the second urn and it turns
out that the ball is red. What will be the probability that the transferred ball was white?
Let
WT = {White ball transferred from the first urn to the second}
RT = {Red ball transferred from the first urn to the second}
P(WT) = 3/5
P(RT) = 2/5
R = {Red ball drawn the second urn after the occurrence of A₁ or A₂}
P(R|WT) = 3/9
P(R|RT) = 4/9
3 3
( )( )
P(R∨WT ) P(WT ) 9 5
P(WT|R) = = =¿ 9/17
P ( R∨WT )P(WT )+ P( R∨RT ) P( RT ) ( 3 )( 3 ) .+( 4 )( 2 )
9 5 9 5
Example 7
In a bolt factory, three machines M₁, M₂, and M₃ manufacture 2000, 2500, and 4000 bolts every day. Of
their output 3%, 4%, and 2.5% are defective bolts. One of the bolts is drawn very randomly from a day’s
production and is found to be defective. What is the probability that it was produced by machine M₂?
M₁ = {The randomly drawn bolt from a day’s production was manufactured by machines M₁}
M₂ = {The randomly drawn bolt from a day’s production was manufactured by machines M2}
M₃ = {The randomly drawn bolt from a day’s production was manufactured by machines M3}
D = {The drawn bolt is defective}
P(M₂|D)=
4 5
( )( )
P(D∨M ₂) P(M ₂) 100 17
= =¿
P ( D∨M ₁) P(M ₁)+ P(D∨M ₂) P(M ₂)+ P(D∨M ₃) P( M ₃) 3 4 4 5 2.5 8
( )( ).+( )( ).+( )( )
100 17 100 17 100 17
5/13
Problems are found from following sites:
https://www.vedantu.com/formula/bayes-theorem-formula
https://www.superprof.co.uk/resources/academic/maths/probability/normal-distribution/law-of-total-probability.html