In: Statistics and Probability
A factory has in it five machines, A, B, C, D, and E that produce Smart Pencils.
Machine A produces 5 % of the factory's output with a 2 % defective rate.
Machine B produces 10 % of the factory's output with a 3 % defective rate.
Machine C produces 25 % of the factory's output with a 4 % defective rate.
Machine D produces 3 0% of the factory's output with a 5 % defective rate.
Machine E produces 3 0% of the factory's output with a 6 % defective rate.
1.
A pencil is selected at random and found to be defective. What is the probability it was produced by Machine A?
2.
A pencil is selected at random and found to be defective.
What is the probability it was produced by Machine A or E?
P(A) : Probability that a randomly selected pencil is produced by Machine A = 5/100=0.05
P(B) : Probability that a randomly selected pencil is produced by Machine A = 10/100=0.10
P(C) : Probability that a randomly selected pencil is produced by Machine A = 25/100=0.25
P(D) : Probability that a randomly selected pencil is produced by Machine A = 30/100=0.30
P(E) : Probability that a randomly selected pencil is produced by Machine A = 30/100=0.30
X: Event of a randomly selected pencil found to be defective
P(X|A) = Probability that the randomly selected pencil found to be defective given that it was produced by Machine A = 2/100 =0.02
P(X|B) = Probability that the randomly selected pencil found to be defective given that it was produced by Machine B = 3/100 =0.03
P(X|C) = Probability that the randomly selected pencil found to be defective given that it was produced by Machine C = 4/100 =0.04
P(X|D) = Probability that the randomly selected pencil found to be defective given that it was produced by Machine D = 5/100 =0.05
P(X|E) = Probability that the randomly selected pencil found to be defective given that it was produced by Machine E = 6/100 =0.06
1.
A pencil is selected at random and found to be defective, probability it was produced by Machine A = P(A|X)
By Bayes theorem,
P(A)P(X|A) = 0.05 x 0.02 =0.001
P(B)P(X|B) = 0.10 x 0.03 =0.003
P(C)P(X|C) = 0.25 x 0.04 =0.01
P(D)P(X|D) =0.30 x 0.05 =0.015
P(E)P(X|E) =0.30 x 0.06 =0.018
P(A)P(X|A)+P(B)P(X|B)+P(C)P(X|C)+P(D)P(X|D)+P(E)P(X|E) = 0.001+0.003+0.01+0.015+0.018=0.047
A pencil is selected at random and found to be defective, probability it was produced by Machine A = 1/47 = 0.021276596
2.
A pencil is selected at random and found to be defective. probability it was produced by Machine A or E
= P((A or E)|X)
As A and E are mutually exclusive, if a selected pencil is produced by machine A, it can not be produced by machine E
Therefore,
P((A or E)|X) = P(A|X) + P(E|X)
P((A or E)|X) = P(A|X) + P(E|X) = 1/47 + 18/47 =19/47 = 0.404255319
A pencil is selected at random and found to be defective. probability it was produced by Machine A or E =19/47=0.404255319