Sub topic 15
The Law of Total Probability
Assume you know fractions, ratios, conditional probability, and the multiplication rule. The law of total probability combines several possible cases to find an overall probability.
Splitting a problem into cases
Suppose an event \(E\) can happen through several nonoverlapping cases \(C1, C2, \ldots, C_n\). If the cases cover every possibility, they form a partition of the sample space.
The law of total probability is
\[ P(E)=P(C1)P(E\mid C1)+P(C2)P(E\mid C2)+\cdots+P(Cn)P(E\mid Cn). \]
In words:
- Find the probability of each case.
- Find the probability of the event within each case.
- Multiply these probabilities.
- Add the results.
Each product represents one path through the cases. The case probabilities act as weights.
Worked example
Machine 1 produces 60% of a factory's products, and 2% of its products are defective. Machine 2 produces the remaining 40%, and 5% of its products are defective. What is the probability that a randomly selected product is defective?
Let \(D\) mean “defective.” The two machines are the complete set of cases:
\[ P(D)=P(M1)P(D\mid M1)+P(M2)P(D\mid M2) \]
\[ P(D)=(0.60)(0.02)+(0.40)(0.05) \]
\[ P(D)=0.012+0.020=0.032. \]
Therefore, the probability is \(0.032\), or \(3.2\%\).
The answer is a weighted average of the two defect rates. It is not the ordinary average \((2\%+5\%)/2\), because the machines do not produce equal amounts.
machine_1_share = 0.60
machine_2_share = 0.40
defect_given_machine_1 = 0.02
defect_given_machine_2 = 0.05
overall_defect = (
machine_1_share * defect_given_machine_1
+ machine_2_share * defect_given_machine_2
)
print(overall_defect) # 0.032Common GRE errors
- Using the wrong condition: \(P(D\mid M_1)\) means defective given Machine 1. It does not mean Machine 1 given defective.
- Leaving out a case: Check that the cases cover all possibilities and do not overlap.
- Forgetting path multiplication: A complete path has probability \(P(\text{case})P(\text{event}\mid\text{case})\).
- Treating cases as equally likely: Use equal weights only when the problem states or implies equal probabilities.
The law is especially useful when a problem describes different groups, routes, machines, or populations and asks for one overall probability.
Exercise
A student travels by bus 70% of the time and by train 30% of the time. The bus is late 10% of the time, while the train is late 20% of the time. What is the probability that the student's ride is late?
Show answer
\(0.70(0.10)+0.30(0.20)=0.07+0.06=0.13\), so the probability is \(13\%\).