MathorynMathematical Formula Database

Statistics & Probability

Law of Total Probability

If events AiA_i split the sample space into disjoint cases, the probability of BB is the weighted sum of its conditional probabilities. It is used to compute overall rates from group rates and supplies the denominator in Bayes' theorem.

P(B)=∑iP(B∣Ai) P(Ai)P(B)=\sum_{i}P(B\mid A_i)\,P(A_i)
LaTeXP(B)=\sum_{i}P(B\mid A_i)\,P(A_i)

Variables

AiA_i
a partition of the sample space
P(B∣Ai)P(B\mid A_i)
conditional probability of B in case i
P(Ai)P(A_i)
probability of case i

Example

Machine 1 makes 60% of parts with 2% defects; machine 2 makes 40% with 5% defects. Find the overall defect rate.

  1. 0.6⋅0.02=0.0120.6\cdot0.02=0.012.
  2. 0.4⋅0.05=0.0200.4\cdot0.05=0.020.

Answer: P(defect)=0.032P(\text{defect})=0.032.

Related formulas