Q:

The conditional expectation of a random variable

The conditional expectation of a random variable $\xi$ given $B$ is defined as its expectation with respect to the conditional probability measure given $B$: $\Bbb{E}[\xi|B]=\int\xi(\omega) P(d\omega|B)$. Can anyone show me why $\Bbb{E}[\xi|B]=\Bbb{E}[\xi1_B]/P(B)$ ? 

A:

The conditional probability measure given $B$ is defined as (assuming $P(B)>0)$)
$$
P(A\mid B)=\frac{P(A\cap B)}{P(B)}=\int_A1_B\frac{1}{P(B)}\,\mathrm dP,\quad A\in\mathcal{F},
$$
meaning that the probability measure $A\mapsto P(A\mid B)$ has density $1_B\frac{1}{P(B)}$ with respect to $P$. Now, apply how you integrate with respect to a measure that has density.