# Definition:Conditional Expectation

## Definition

Let $\struct {\Omega, \Sigma, \Pr}$ be a probability space.

Let $X$ be a discrete random variable on $\struct {\Omega, \Sigma, \Pr}$.

Let $B$ be an event in $\struct {\Omega, \Sigma, \Pr}$ such that $\map \Pr B > 0$.

The conditional expectation of $X$ given $B$ is written $\expect {X \mid B}$ and defined as:

$\expect {X \mid B} = \ds \sum_{x \mathop \in \image X} x \map \Pr {X = x \mid B}$

where:

$\map \Pr {X = x \mid B}$ denotes the conditional probability that $X = x$ given $B$

whenever this sum converges absolutely.