# ProbabilityConditional Expectation

The **conditional expectation** of given is defined to be the expectation of calculated with respect to its conditional distribution given . For example, if and are continuous random variables, then

**Example**

Suppose that is the function which returns for any point in the triangle with vertices , , and and otherwise returns 0. If has joint pdf , then the conditional density of given is the mean of the uniform distribution on the segment , which is .

The **conditional variance** of given is defined to be the variance of with respect to its conditional distribution of given .

**Example**

Continuing with the example above, the conditional density of given is the variance of the uniform distribution on the segment , which is .

We can regard the conditional expectation of given as a random variable, denoted by coming up with a formula for for each , and then substituting for . And likewise for conditional variance.

**Example**

With and as defined above, we have and .

**Exercise**

Find the conditional expectation of given where the pair has density on .

*Solution.* We calculate the conditional density as

which means that

So

## The tower law

Conditional expectation can be helpful for calculating expectations, because of the **tower law**.

**Theorem** (Tower law of conditional expectation)

If and are random variables defined on a probability space, then

**Exercise**

Consider a particle which splits into two particles with probability at time . At time , each extant particle splits into two particles independently with probability .

Find the expected number of particles extant just after time . Hint: define to be or depending on whether the particle splits at time , and use the tower law with .

*Solution.* If is the number of particles and is the

while

Therefore, . By the tower law, we have