USING BAYESIAN STATISTICS INSTEAD OF A TREE DIAGRAM
JOINT PROBABILITY OF A AND B:
P(A^B) = P(A|B) P(B) = P(B|A) P(A)
P(A|B) = probability of A given that B occurs
Let
A = Factory I
A' = Factory II
B = - is defective
P(A|-) P(-) = P(-|A) P(A)
Either comes from Factory 1 or Factory 2
P(A) + P(A') = 1
P(A) = 4 P(A') four times as many factories
5 P(A') = 1
P(A') = 0.20 , Factory II
P(A) = 1 - P(A') = 0.80, Factory I
Defect probablity
P(-) = P(-|A) P(A) + P(-|B) P(B)
P(-|A) = 0.20
P(-|B) = 0.05
P(-) = (0.20)(0.80) + (0.05)(0.20) = 0.17 or 17% probability of getting a defective
P(+) = 1 - P(-) = 0.83 or 83% probability of getting an ok item
What is the probability that a defective part came from A = Factory 1 ?
P(A|-) = P(-|A) P(A)/P(-)
P(A|-) = P(-|A) P(A)/P(-)
P(A|-) = (0.20) (0.80)/(0.17) = (20/17)(.80) = 0.94 or 94%
So knowing that a part is defective (-) raises the probability it came from Factory 1 (A) produces 0% of the parts to a probability of 94% that it came from that factory.
A Bayesian would say that the information was used to transform the prior probability of having come from Factory 1 from an initial estimate of 80% to a final (a posteriori) probability of 94%.
Presumably, the decision tree approach would reach the same answer.