AI engineering glossary · Probability

What is law of total probability?

Law of total probability: If events B1, B2, ... form a partition of the sample space, the probability of any event A is the sum over i of P(A | Bi) x P(Bi). It lets you compute an overall probability by averaging over separate cases.

Level: intermediateTopic: Probability

Law of total probability: an example

If 60% of orders come from mobile with 4% return rate and 40% from web with 2%, overall return probability = 0.6 x 0.04 + 0.4 x 0.02 = 0.032.

Related terms

More Probability terms

Where you learn it

Law of total probability is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.