The Law of Total Expectation for Discrete Random Variables

Compute the expected value of a discrete random variable by conditioning on a partition or an auxiliary discrete random variable, using E[X]=iE[XBi]P(Bi)E[X] = \sum_i E[X\mid B_i] P(B_i).

Step 1 of 157%

Tutorial

Introduction

The law of total expectation states that the expected value of a discrete random variable XX can be computed by averaging its conditional expectations, weighted by the probabilities of the conditioning events.

If {B1,B2,,Bk}\{B_1, B_2, \ldots, B_k\} is a partition of the sample space with P(Bi)>0P(B_i) > 0 for each ii, then

E[X]=i=1kE[XBi]P(Bi).E[X] = \sum_{i=1}^{k} E[X \mid B_i] \cdot P(B_i).

Equivalently, if YY is a discrete random variable taking values y1,y2,,yky_1, y_2, \ldots, y_k, then

E[X]=i=1kE[XY=yi]P(Y=yi).E[X] = \sum_{i=1}^{k} E[X \mid Y = y_i] \cdot P(Y = y_i).

For example, suppose

  • E[XY=0]=4E[X \mid Y = 0] = 4 with P(Y=0)=0.3,P(Y = 0) = 0.3,
  • E[XY=1]=10E[X \mid Y = 1] = 10 with P(Y=1)=0.7.P(Y = 1) = 0.7.

Then

E[X]=40.3+100.7=1.2+7=8.2.E[X] = 4 \cdot 0.3 + 10 \cdot 0.7 = 1.2 + 7 = 8.2.

This formula breaks a complicated expectation into a simple weighted average over branches.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle