# conditional expectation

## Primary tabs

\documentclass{article}
% this is the default PlanetMath preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
%\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%%%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here
\begin{document}
Let $(\Omega,\mathcal{F},P)$ be a probability space and $X\colon \Omega \to \mathbb{R}$ a real random variable with $E[|X|]<\infty$.

\subsubsection*{Conditional Expectation Given an Event}
Given an event $B\in \mathcal{F}$ such that $P(B)>0$, then we define the \emph{conditional expectation of $X$ given $B$}, denoted by $E[X | B]$ to be
$$E[X | B]:=\frac{1}{P(B)}\int_B X dP.$$

When $P(B)=0$, $E[X|B]$ is sometimes defaulted to $0$.

If $X$ is discrete, then we can write $X=\sum_{i=1}^{\infty}w_i 1_{B_i}$, where $1_{B_i}$ are the indicator functions, $B_i=X^{-1}(\lbrace w_i\rbrace)$ and $w_i\in\mathbb{R}$, then conditional expectation of $X$ given $B$ becomes
\begin{eqnarray*}
E[X|B]&=&\frac{1}{P(B)}\int_B \Big( \sum_{i=1}^{\infty}w_i 1_{B_i} \Big) dP = \frac{1}{P(B)} \Big( \sum_{i=1}^{\infty}w_i \int_B 1_{B_i}  dP\Big) \\
&=& \frac{1}{P(B)} \Big( \sum_{i=1}^{\infty}w_i P(B_i\cap B) \Big) =  \sum_{i=1}^{\infty}w_i P(B_i| B),
\end{eqnarray*}
where $P(B_i|B)$ is the conditional probability of $B_i$ given $B$.

\subsubsection*{Conditional Expectation Given a Sigma Algebra}
If $\mathcal{D} \subset \mathcal{F}$ is a sub $\sigma$-algebra, then the \emph{conditional expectation of $X$ given $\mathcal{D}$}, denoted by $E[X|\mathcal{D}]$ is defined as follows$\colon$
\paragraph{Definition} $E[X|\mathcal{D}]$ is the function from $\Omega$ to $\mathbb{R}$
satisfying $\colon$
\begin{enumerate}
\item $E[X|\mathcal{D}]$ is $\mathcal{D}$-measurable
\item $\displaystyle \int_{A}E[X|\mathcal{D}]dP=\int_{A}XdP$ ,\,for\,\ all\,\ $A\in \mathcal{D}$.
\end{enumerate}
It can be shown, via Radon-Nikodym Theorem, that $E[X|\mathcal{D}]$ always exists and is unique almost everywhere: any two $\mathcal{D}$-measurable random variables $Y,Z$ with $$\displaystyle \int_{A} YdP = \int_{A} ZdP = \int_{A} XdP$$ 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 \emph{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\colon \Omega \to \mathbb{R}$ is another random variable with $E[|Y|]<\infty$
and let $\alpha,\beta \in \mathbb{R}$. Then
\begin{enumerate}
\item $E[\alpha X+\beta Y|\mathcal{D}]=\alpha E[X|\mathcal{D}]+\beta E[X|\mathcal{D}]$
\item $E[E[X|\mathcal{D}]]=E[X]$
\item $E[X|\mathcal{D}]=X$ if $X$ is $\mathcal{D}$-measurable
\item $E[X|\mathcal{D}]=E[X]$ if $X$ is \PMlinkname{independent}{IndependentSigmaAlgebras} of $\mathcal{D}$
\item $E[YX|\mathcal{D}]=YE[X|\mathcal{D}]$ if $Y$ is $\mathcal{D}$-measurable
\end{enumerate}

\subsubsection*{Conditional Expectation Given a Random Variable}
Given any real random variable $Y:\Omega \to \mathbb{R}$, we define the \emph{conditional expectation of $X$ given $Y$} to be the conditional expectation of $X$ given $\mathcal{F}_Y$, the \PMlinkname{sigma algebra generated by $Y$}{MathcalFMeasurableFunction}.
%%%%%
%%%%%
nd{document}