# Definition:Conditional Expectation

## Defintion

### General Case

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

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

### Conditioned on $\sigma$-Algebra

Let $\GG \subseteq \Sigma$ be a sub-$\sigma$-algebra of $\Sigma$.

We say that $Z$ is a version of the conditional expectation of $X$ given $\GG$, or version of $\expect {X \mid \GG}$ if and only if:

$(1): \quad \expect {\cmod Z} < \infty$
$(2): \quad$ $Z$ is $\GG$-measurable
$(3): \quad \ds \forall G \in \GG: \int_G Z \rd \Pr = \int_G X \rd \Pr$

From Existence and Essential Uniqueness of Conditional Expectation Conditioned on Sigma-Algebra, any two versions of the conditional expectation of $X$ given $\GG$ agree almost surely, so we write:

$Z = \expect {X \mid \GG}$

in the sense of almost-sure equality.

### Conditioned on Set of Random Variables

Let $\SS$ be a set of real-valued random variables on $\struct {\Omega, \Sigma, \Pr}$.

Then we define the conditional expectation of $X$ given $\SS$:

$\expect {X \mid \SS} = \expect {X \mid \map \sigma \SS}$

where:

$\map \sigma \SS$ denotes the $\sigma$-algebra generated by $\SS$
$\expect {X \mid \map \sigma \SS}$ denotes the conditional expectation of $X$ given $\map \sigma \SS$
$=$ is understood to mean almost-sure equality.

If $\SS$ is countable set, say $\SS = \set {X_n : n \in \N} = \set {X_1, X_2, \ldots}$, we may write:

$\expect {X \mid \SS} = \expect {X \mid X_1, X_2, \ldots}$

### Conditioned on Event

Let $A \in \Sigma$.

Then we define the conditional expectation of $X$ given $A$:

$\expect {X \mid A} = \expect {X \mid \map \sigma A}$

where:

$\map \sigma A$ denotes the $\sigma$-algebra generated by $A$
$\expect {X \mid \map \sigma A}$ denotes the conditional expectation of $X$ given $\map \sigma A$
$=$ is understood to mean almost-sure equality.

### Discrete Case

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 \condprob {X = x} B$

where:

$\condprob {X = x} B$ denotes the conditional probability that $X = x$ given $B$

whenever this sum converges absolutely.