Skip to content
Glacius
ProbabilityConcept reference

Total probability

The law of total probability sums event contributions over an exhaustive disjoint case split.

On this page 7 sections
  1. Overview
  2. An event can happen through several cases
  3. A closer look
  4. Equal case weights justify averaging the rates
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01An event can happen through several cases#

An event can happen through several cases. If the cases are disjoint and cover the whole sample space, their separate event contributions add to the total.

Cases X and Y have weights 0.3 and 0.7. Their A rates are 0.8 and 0.2. The joint contributions are 0.24 and 0.14, so P(A) is 0.38.

Exhaustive disjoint cases X and Y have probabilities .3 and .7. Event rates .8 and .2 produce joint areas .24 and .14. Their sum is event probability .38.Exhaustive disjoint cases X and Y have probabilities .3 and .7. Event rates .8 and .2 produce joint areas .24 and .14. Their sum is event probability .38.
Figure 1Exhaustive disjoint cases X and Y have probabilities .3 and .7. Event rates .8 and .2 produce joint areas .24 and .14. Their sum is event probability .38.
Link to this figure ↗Download SVGDownload PNG

For P(A)P(A) across cases BiB_i:

iP(Bi)P(ABi)\sum_i P(B_i)P(A\mid B_i)

Each case weight is positive, so its conditional is defined. Sum the contributions, not the unweighted rates.

Check your reasoning

Exhaustive disjoint cases. Weights: 0.6, 0.4. Rates of A in the same order: 0.5, 0.25. Find P(A).

Show answer and explanation
0.4

0.3 + 0.1 = 0.4.

02A closer look#

If a record uses route X with chance 0.5, otherwise Y, and their alert rates are 0.6 and 0.2, the overall rate is 0.3 + 0.1 = 0.4.

Check your reasoning

A record uses X with chance 0.4, otherwise Y. Alert rates within X and Y are 0.8 and 0.3. Find the overall alert chance.

Show answer and explanation
0.5

0.32 + 0.18 = 0.5.

03Equal case weights justify averaging the rates#

Equal case weights justify averaging the rates. Otherwise, use the weights. A positive rate in a common case contributes more than the same rate in a rare case.

Check your reasoning

Exhaustive disjoint cases. Weights: 0.25, 0.75. Rates of A in the same order: 0.4, 0.8. “Add rates: 1.2.” Repair it.

  1. A1.2
  2. B0.32
  3. C0.7
Show answer and explanation
0.7

0.1 + 0.6 = 0.7.

Key takeaway

Multiply each within-case rate by its case probability. Add those disjoint contributions to recover the whole-event probability.

  • Weight each case rate before adding.

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Total probability.” Math behind ML. /learn/p-total