Conditional probability · Definition

Law of total probability

probabilityconditional

Before you start you need to know

When an event can happen through several routes, this formula lets you compute it case by case and then combine the results.

Definition

The total probability of an event \(A\) is the weighted average of its conditional probabilities \(P(A\mid B_i)\) over a partition \(B_i\) of the sample space, with the probability of each case as its weight.

\[P(A)=\sum_{i=1}^{n}P(A\mid B_i)\,P(B_i)\]

The idea is divide and conquer. If the events \(B_1,\dots,B_n\) are mutually exclusive and cover the whole sample space (a partition), every outcome of \(A\) falls in exactly one \(B_i\). So \(A\) splits into the disjoint pieces \(A\cap B_i\), and adding their probabilities with the product rule \(P(A\cap B_i)=P(A\mid B_i)P(B_i)\) gives the formula.

It is a weighted average: each \(P(A\mid B_i)\) is multiplied by the weight \(P(B_i)\), and the weights add up to 1. Hence the result always lies between the smallest and the largest conditional probability. With three machines making 50 %, 30 % and 20 % of the parts and producing 1 %, 2 % and 5 % defectives, the overall rate is \(0.005+0.006+0.010=0.021\), not the plain average of 1, 2 and 5.

The most common case is the smallest partition, \(\{B,B^c\}\): \(P(A)=P(A\mid B)P(B)+P(A\mid B^c)P(B^c)\). It also handles sequential problems: the probability that the second card of a deck is an ace, conditioning on whether the first one was, is \(\tfrac1{13}\), the same as for the first.

Typical mistakes: using cases that overlap or fail to cover the space, and forgetting the weights. This result is the denominator of Bayes' theorem, which uses it to invert conditional probabilities.

Think about it

If \(P(A\mid B_i)=0.3\) for every case of a partition, what is \(P(A)\)?

It is 0.3: a weighted average of equal values whose weights add up to 1.

Why is the probability of an ace on the second card the same as on the first?

Averaging over what the first card could have been, symmetry makes no position in the deck special: \(\tfrac4{52}\cdot\tfrac3{51}+\tfrac{48}{52}\cdot\tfrac4{51}=\tfrac1{13}\).

Exercises 10

What comes next

References

  • Joseph K. Blitzstein, Jessica Hwang, Introduction to Probability, 2nd edition, CRC Press, 2019. §2.3
  • Sheldon Ross, A First Course in Probability, 10th edition, Pearson, 2019. §3.3
  • Larry Wasserman, All of Statistics, 1st edition, Springer, 2004. §1.4