AI engineering glossary · Probability

What is law of total expectation?

Law of total expectation: The overall expected value of a variable equals the average of its conditional expected values, weighted by the probabilities of the conditions: E[X] = sum of E[X | B] x P(B). It splits a hard average into easier cases.

Level: advancedTopic: Probability

Law of total expectation: an example

If mobile users spend Rs 300 on average (60% of users) and web users Rs 500 (40%), overall average is 0.6 x 300 + 0.4 x 500 = Rs 380.

Related terms

More Probability terms

Where you learn it

Law of total expectation 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.