conditional expectation
Let $(\mathrm{\Omega},\mathcal{F},P)$ be a probability space^{} and $X:\mathrm{\Omega}\to \mathbb{R}$ a real random variable^{} with $$.
Conditional Expectation Given an Event
Given an event $B\in \mathcal{F}$ such that $P(B)>0$, then we define the conditional expectation of $X$ given $B$, denoted by $E[XB]$ to be
$$E[XB]:=\frac{1}{P(B)}{\int}_{B}XdP.$$ 
When $P(B)=0$, $E[XB]$ is sometimes defaulted to $0$.
If $X$ is discrete, then we can write $X={\sum}_{i=1}^{\mathrm{\infty}}{w}_{i}{1}_{{B}_{i}}$, where ${1}_{{B}_{i}}$ are the indicator functions^{}, ${B}_{i}={X}^{1}(\{{w}_{i}\})$ and ${w}_{i}\in \mathbb{R}$, then conditional expectation of $X$ given $B$ becomes
$E[XB]$  $=$  $\frac{1}{P(B)}}{\displaystyle {\int}_{B}}\left({\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{w}_{i}{1}_{{B}_{i}}\right)\mathit{d}P={\displaystyle \frac{1}{P(B)}}\left({\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{w}_{i}{\displaystyle {\int}_{B}}{1}_{{B}_{i}}\mathit{d}P\right)$  
$=$  $\frac{1}{P(B)}}\left({\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{w}_{i}P({B}_{i}\cap B)\right)={\displaystyle \sum _{i=1}^{\mathrm{\infty}}}{w}_{i}P({B}_{i}B),$ 
where $P({B}_{i}B)$ is the conditional probability^{} of ${B}_{i}$ given $B$.
Conditional Expectation Given a Sigma Algebra
If $\mathcal{D}\subset \mathcal{F}$ is a sub $\sigma $algebra, then the conditional expectation of $X$ given $\mathrm{D}$, denoted by $E[X\mathcal{D}]$ is defined as follows$:$
Definition
$E[X\mathcal{D}]$ is the function from $\mathrm{\Omega}$ to $\mathbb{R}$ satisfying $:$

1.
$E[X\mathcal{D}]$ is $\mathcal{D}$measurable

2.
${\int}_{A}}E[X\mathcal{D}]dP={\displaystyle {\int}_{A}}XdP$ , for all $A\in \mathcal{D}$.
It can be shown, via RadonNikodym Theorem^{}, that $E[X\mathcal{D}]$ always exists and is unique almost everywhere: any two $\mathcal{D}$measurable random variables $Y,Z$ with
$${\int}_{A}Y\mathit{d}P={\int}_{A}Z\mathit{d}P={\int}_{A}X\mathit{d}P$$ 
differ by a null event in $\mathcal{D}$. We can in fact set up an equivalence relation^{} on the set of all integrable $\mathcal{D}$measurable functions^{} satisfying condition 2 above. In this sense, $E[X\mathcal{D}]$ is an equivalence class^{} of random variables, and any two members in $E[X\mathcal{D}]$ may qualify as conditional expectations of $X$ given $\mathcal{D}$ (they are often called versions of the conditional expectation). In practice, however, we often think of $E[X\mathcal{D}]$ as a function rather than a set of functions. As long as we realize that any two such functions are equal almost surely, we may blur such differences and abuse the language^{}.
Suppose $Y:\mathrm{\Omega}\to \mathbb{R}$ is another random variable with $$ and let $\alpha ,\beta \in \mathbb{R}$. Then

1.
$E[\alpha X+\beta Y\mathcal{D}]=\alpha E[X\mathcal{D}]+\beta E[X\mathcal{D}]$

2.
$E[E[X\mathcal{D}]]=E[X]$

3.
$E[X\mathcal{D}]=X$ if $X$ is $\mathcal{D}$measurable

4.
$E[X\mathcal{D}]=E[X]$ if $X$ is independent^{} (http://planetmath.org/IndependentSigmaAlgebras) of $\mathcal{D}$

5.
$E[YX\mathcal{D}]=YE[X\mathcal{D}]$ if $Y$ is $\mathcal{D}$measurable
Conditional Expectation Given a Random Variable
Given any real random variable $Y:\mathrm{\Omega}\to \mathbb{R}$, we define the conditional expectation of $X$ given $Y$ to be the conditional expectation of $X$ given ${\mathcal{F}}_{Y}$, the sigma algebra generated by $Y$ (http://planetmath.org/MathcalFMeasurableFunction).
Title  conditional expectation 

Canonical name  ConditionalExpectation 
Date of creation  20130322 15:43:45 
Last modified on  20130322 15:43:45 
Owner  georgiosl (7242) 
Last modified by  georgiosl (7242) 
Numerical id  13 
Author  georgiosl (7242) 
Entry type  Definition 
Classification  msc 6000 
Classification  msc 60A10 
Related topic  ConditionalProbability 
Related topic  ConditionalExpectationUnderChangeOfMeasure 
Related topic  ConditionalExpectationsAreUniformlyIntegrable 