In probability theory, the conditional expectation of a random variable is another random variable equal to the average of the former over each possible "condition". In the case when the random variable is defined over a discrete probability space, the "conditions" are a partition of this probability space. This definition is then generalized to any probability space using measure theory.
Conditional expectation is also known as conditional expected value or conditional mean.
In modern probability theory the concept of conditional probability is defined in terms of conditional expectation.
Concept
The concept of conditional expectation can be nicely illustrated through the following example. Suppose we have daily rainfall data (mm of rain each day) collected by a weather station on every day of the ten year period from Jan 1, 1990 to Dec 31, 1999. The conditional expectation of daily rainfall knowing the month of the year is the average of daily rainfall over all days of the ten year period that fall in a given month. These data then may be considered either as a function of each day (so for example its value for Mar 3, 1992, would be the sum of daily rainfalls on all days that are in the month of March during the ten years, divided by the number of these days, which is 310) or as a function of just the month (so for example the value for March would be equal to the value of the previous example).
It is important to note the following.
The conditional expectation of daily rainfall knowing that we are in a month of March of the given ten years is not a monthly rainfall data, that is it is not the average of the ten monthly total March rainfalls. That number would be 31 times higher.
The average daily rainfall in March 1992 is not equal to the conditional expectation of daily rainfall knowing that we are in a month of March of the given ten years, because we have restricted ourselves to 1992, that is we have more conditions than just that of being in March. This shows that reasoning as "we are in March 1992, so I know we are in March, so the average daily rainfall is the March average daily rainfall" is incorrect. Stated differently, although we use the expression "conditional expectation knowing that we are in March" this really means "conditional expectation knowing nothing other than that we are in March".
In classical probability theory the conditional expectation of X given an event H (which may be the event Y=y for a random variable Y) is the average of X over all outcomes in H, that is
The sum above can be grouped by different values of , to get a sum over the range of X
In modern probability theory, when H is an event with strictly positive probability, it is possible to give a similar formula. This is notably the case for a discrete random variableY and for y in the range of Y if the event H is Y=y. Let be a probability space, X a random variable on that probability space, and an event with strictly positive probability . Then the conditional expectation of X given the event H is
where is the range of X and is the conditional probability of A knowing H.
When P(H) = 0 (for instance if Y is a continuous random variable and H is the event Y=y, this is in general the case), the Borel–Kolmogorov paradox demonstrates the ambiguity of attempting to define the conditional probability knowing the event H. The above formula shows that this problem transposes to the conditional expectation. So instead one only defines the conditional expectation with respect to a sigma-algebra or a random variable.
Conditional expectation with respect to a random variable
If Y is a discrete random variable with range , then we can define on the function
Sometimes this function is called the conditional expectation of X with respect to Y. In fact, according to the modern definition, it is that is called the conditional expectation of X with respect to Y, so that we have
which is a random variable.
As mentioned above, if Y is a continuous random variable, it is not possible to define by this method. As explained in the Borel–Kolmogorov paradox, we have to specify what limiting procedure produces the set Y = y. This can be naturally done by defining the set , and taking the limit , so that if for all , then
.
The modern definition is analogous to the above except that the above limiting process is replaced by the Radon–Nikodym derivative, so the result holds more generally.
Formal definition
Conditional expectation with respect to a σ-algebra
The existence of can be established by noting that for is a measure on that is absolutely continuous with respect to . Furthermore, if is the natural injection from to then is the restriction of to and is the restriction of to and is absolutely continuous with respect to since . Thus, we have
the random variable , denoted as , is a conditional expectation of X given .
This definition is equivalent to defining the conditional expectation using the pre-image of Σ with respect to Y. If we define
then
.
Discussion
A couple of points worth noting about the definition:
This is not a constructive definition; we are merely given the required property that a conditional expectation must satisfy.
The definition of may resemble that of for an event but these are very different objects, the former being a -measurable function , while the latter is an element of for fixed , or a function if considered as the function .
Existence of a conditional expectation function is determined by the Radon–Nikodym theorem, a sufficient condition is that the (unconditional) expected value for X exist.
Uniqueness can be shown to be almost sure: that is, versions of the same conditional expectation will only differ on a set of probability zero.
The σ-algebra controls the "granularity" of the conditioning. A conditional expectation over a finer-grained σ-algebra will allow us to condition on a wider variety of events.
Conditioning as factorization
In the definition of conditional expectation that we provided above, the fact that is a real random element is irrelevant. Let be a measurable space, where is a σ-algebra in . A -valued random element is a measurable function , i.e. for all . The distribution of is the probability measure such that .
Theorem. If is an integrable random variable, then there exists a -unique integrable random element , such that
for all .
Proof sketch
Let be such that . Then is a signed measure which is absolutely continuous with respect to . Indeed means exactly that . Since the integral of an integrable function on a set of probability 0 is 0, this proves absolute continuity. The Radon–Nikodym theorem then proves the existence of a density of with respect to , which we denote by .
Comparing with conditional expectation with respect to sub-sigma algebras, it holds that
We can further interpret this equality by considering the abstract change of variables formula to transport the integral on the right hand side to an integral over Ω:
The equation means that the integrals of and the composition over sets of the form , for , are identical.
This equation can be interpreted to say that the following diagram is commutativein the average.
Computation
When X and Y are both discrete random variables, then the conditional expectation of X given the event Y=y can be considered as function of y for y in the range of Y
Conditional variance: Using the conditional expectation we can define, by analogy with the definition of the variance as the mean square deviation from the average, the conditional variance
Martingale convergence: For a random variable , that has finite expectation, we have , if either is an increasing series of sub-σ-algebras and or if is a decreasing series of sub-σ-algebras and .
Conditional expectation as -projection: If are in the Hilbert space of square-integrable real random variables (real random variables with finite second moment) then
for -measurable we have , i.e. the conditional expectation is in the sense of the L2(P) scalar product the orthogonal projection from to the linear subspace of -measurable functions. (This allows to define and prove the existence of the conditional expectation based on the Hilbert projection theorem.)
^Kolmogorov, Andrey (1933). Grundbegriffe der Wahrscheinlichkeitsrechnung (in German). Berlin: Julius Springer. p. 46. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)[page needed]