Case Study
In a certain assembly plant, three machines, M1, M2, and M3, make 20%, 30%, and 50%, respectively, of the products. It is known from past experience that 4%, 3%, and 5% of the products made by each machine, respectively, are defective. a) Suppose that a finished product is randomly selected. What is the probability that it is defective? b) If a product were chosen randomly and found to be defective, what is the probability that it was made by machine M2?
Part a) of the simple study case above is a typical problem that can be solved by applying the total probability theorem (another name: elimination rule). Meanwhile, part b) is a sample problem related to Bayes’ theorem. This post will be talking about the theorems. For this purpose, it is necessary to understand the notion of partition of a set.
Definition
Let S be a set and K1, K2, K3, …, Kn be subsets of S. The sets K1, K2, K3, …, Kn are said to form a partition of S if the following conditions are satisfied. 1) K1 ∪ K2 ∪ K3 ∪ … ∪ Kn = S and 2) Ki∩Kj = ∅ if i ≠ j.
Example 1
Let S = {1, 2, 3, 4, 5, 6, 7, 8}, A= {1, 2, 5}, B = {3, 7, 8}, and C = {4, 6}. In this example A, B, and C form a partition of S because the first condition is satisfied: A∪B∪C = S, and so is the second condition: A∩B = Ø, A∩C = Ø, and B∩C = Ø.
Example 2
Let S = {1, 2, 3, 4, 5, 6, 7, 8}, A= {1, 2}, B = {3, 7, 8}, and C = {4, 6}. In this example A, B, and C do not form a partition of S because the first condition is violated. A ∪ B ∪ C ≠ S.
Example 3
Let S = {1, 2, 3, 4, 5, 6, 7, 8}, A= {1, 2, 5}, B = {3, 7, 8}, and C = {1, 4, 6 }. In this example A, B, and C do not form a partition of S since the second condition is violated. A ∩ C ≠ Ø.
Theorem of Total Probability (Elimination Rule)
Let K1, K2, …, Kn form a partition of the sample space S and P(Kj) ≠ 0 for j = 1, 2, …, n. If A is an event relative to the sample space S then:
………………………………………….. (*)
In the example above, let A = the product is defective, Kj = the product is made by machine Mj. The sample space is S, i.e. all the products made by the three machines. From all the information provided above, we can write: P(K1) = 0.2, P(K2) = 0.3, P(K3) = 0.5, P(A|K1) = 0.04, P(A|K2) = 0.03, and P(A|K3) = 0.05. To apply the total probability theorem, we must first check whether K1, K2, and K3 form a partition of the sample space S. First, note that every product made by the assembly plant must be produced from these machines. So, condition 1) is satisfied. Second, each product is made by one and only one machine among the three available machines. Stated another way, it is impossible for a particular product to be made by more than one machine. Hence, condition 2) is satisfied. In addition, P(K1) ≠ 0, P(K2) ≠ 0, and P(K3) ≠ 0. We have shown that all prerequisites for the validity of (*) are satisfied.
P(A) = P(K1).P(A|K1) + P(K2).P(A|K2) + P(K3).P(A|K3)
P(A) = 0.2⋅0.04 + 0.3⋅0.03 + 0.5⋅0.05 = 0.008 + 0.009 + 0.025 = 0.042.
Hence, the probability of selecting a defective product is 0.042. This is the answer to part a).
Bayes’ Theorem (or Bayes’ Rule)
Let K1, K2, …, Kn form a partition of the sample space S and P(Kj) ≠ 0 for j = 1, 2, …, n. If A is an event relative to the sample space S then:
for t = 1, 2, …, n
Note:
The denominator of P(Kt|A) above, namely , is none other than P(A), as stated in the Total Probability Theorem.
Now, we will apply Bayes’ Theorem to answer part b). What is sought here is P(K2|A).
Note that P(K2)⋅P(A|K2) = 0.3⋅0.03 = 0.009.
Next,
So, the probability that the defective product is made by the M2 is 0.2143.