Conditional Expectation for Discrete Random Variables

Compute E[YX=x]E[Y \mid X=x] for discrete random variables using a conditional pmf, and extend this computation to settings where only the joint pmf is given.

Step 1 of 119%

Tutorial

Introduction

Given two discrete random variables XX and Y,Y, the conditional expectation of YY given X=xX=x is the expected value of YY computed using the conditional distribution of YY given X=x:X=x{:}

E[YX=x]=yypYX(yx).E[Y \mid X = x] = \sum_y y \cdot p_{Y \mid X}(y \mid x).

This is the average value of YY that we expect once we know XX has taken the specific value x.x.

For example, suppose YY takes values in {1,2,3}\{1, 2, 3\} and its conditional distribution given X=5X = 5 is

y123pYX(y5)0.50.30.2\begin{array}{c|ccc} y & 1 & 2 & 3 \\ \hline p_{Y \mid X}(y \mid 5) & 0.5 & 0.3 & 0.2 \end{array}

Then

E[YX=5]=10.5+20.3+30.2=0.5+0.6+0.6=1.7.\begin{align*} E[Y \mid X = 5] &= 1 \cdot 0.5 + 2 \cdot 0.3 + 3 \cdot 0.2 \\[3pt] &= 0.5 + 0.6 + 0.6 \\[3pt] &= 1.7. \end{align*}

Notice that the conditional probabilities in the row sum to 11 — they form a valid pmf on the values of Y.Y.

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