Girish Mahajan (Editor)

Conditional expectation

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Conditional expectation

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.

Contents

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".
  • History

    The related concept of conditional probability dates back at least to Laplace who calculated conditional distributions. It was Andrey Kolmogorov who in 1933 formalized it using the Radon–Nikodym theorem. In works of Paul Halmos and Joseph L. Doob from 1953, conditional expectation was generalized to its modern definition using sub-sigma-algebras.

    Conditional expectation with respect to an event

    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

    E ( X H ) = ω H X ( ω ) | H |

    The sum above can be grouped by different values of X ( ω ) , to get a sum over the range X of X

    E ( X H ) = x X x | { ω H X ( ω ) = x } | | H |

    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 variable Y and for y in the range of Y if the event H is Y=y. Let ( Ω , F , P ) be a probability space, X a random variable on that probability space, and H F an event with strictly positive probability P ( H ) > 0 . Then the conditional expectation of X given the event H is

    E ( X H ) = E ( 1 H X ) P ( H ) = x X x P ( d x H ) ,

    where X is the range of X and P ( A H ) = P ( A H ) P ( H ) 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 Y , then we can define on Y the function

    g : y E ( X Y = y ) .

    Sometimes this function is called the conditional expectation of X with respect to Y. In fact, according to the modern definition, it is g Y that is called the conditional expectation of X with respect to Y, so that we have

    E ( X Y ) : ω E ( X Y = Y ( ω ) ) .

    which is a random variable.

    As mentioned above, if Y is a continuous random variable, it is not possible to define E ( X Y ) 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 H y ϵ = { ω Y ( ω ) y < ϵ } , and taking the limit ϵ 0 , so that if P ( H y ϵ ) > 0 for all ϵ > 0 , then

    g : y lim ϵ 0 E ( X H y ε ) .

    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.

    Conditional expectation with respect to a σ-algebra

    Consider the following

  • ( Ω , F , P ) is a probability space
  • X : Ω R n is a random variable on that probability space
  • H F is a sub-σ-algebra of F
  • Since H is a subalgebra of F , the function X : Ω R n is usually not H -measureable, thus the existence of the integrals of the form H X d P | H , where H H and P | H is the restriction of P to H cannot be stated in general. However, the local averages H X d P can be recovered in ( Ω , H , P | H ) with the help of the conditional expectation. A conditional expectation of X given H , denoted as E ( X H ) , is any H -measurable function ( Ω R n ) which satisfies:

    H E ( X H ) d P = H X d P for each H H .

    The existence of E ( X H ) can be established by noting that μ X : F F X for F F is a measure on ( Ω , F ) that is absolutely continuous with respect to P . Furthermore, if h is the natural injection from H to F then μ X h = μ | H X is the restriction of μ X to H and P h = P | H is the restriction of P to H and μ X h is absolutely continuous with respect to P h since

    P h ( H ) = 0 P ( h ( H ) ) = 0 μ X ( h ( H ) ) = 0 μ X h ( H ) = 0 .

    Thus, we have

    E ( X H ) = d μ | H X d P | H = d ( μ X h ) d ( P h )

    where the derivatives are Radon–Nikodym derivatives of measures.

    Conditional expectation with respect to a random variable

    Consider further to the above

  • ( U , Σ ) is a measurable space
  • Y : Ω U is a random variable
  • Then for any Σ -measurable function g : U R n which satisfies:

    g ( Y ) f ( Y ) d P = X f ( Y ) d P for every  Σ -measurable function f : U R n .

    the random variable g ( Y ) , denoted as E ( X Y ) , is a conditional expectation of X given Y .

    This definition is equivalent to defining the conditional expectation using the pre-image of Σ with respect to Y. If we define

    H = σ ( Y ) := Y 1 ( Σ ) := { Y 1 ( B ) : B Σ }

    then

    E ( X Y ) = E ( X H ) = d ( μ X Y 1 ) d ( P Y 1 ) Y .

    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 E ( X H ) may resemble that of E ( X H ) for an event H but these are very different objects, the former being a H -measurable function Ω R n , while the latter is an element of R n for fixed H , or a function F R n if considered as the function H E ( X H ) .
  • 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 H controls the "granularity" of the conditioning. A conditional expectation E ( X H ) over a finer-grained σ-algebra H 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 Y is a real random element is irrelevant. Let ( U , Σ ) be a measurable space, where Σ P ( U ) is a σ-algebra in U . A U -valued random element is a measurable function Y : Ω U , i.e. Y 1 ( B ) F for all B Σ . The distribution of Y is the probability measure P Y : Σ R such that P Y ( B ) = P ( Y 1 ( B ) ) .

    Theorem. If X : Ω R is an integrable random variable, then there exists a P Y -unique integrable random element E ( X Y ) : U R , such that

    Y 1 ( B ) X d P = B E ( X Y ) d P Y ,

    for all B Σ .

    Proof sketch

    Let μ : Σ R be such that μ ( B ) = Y 1 ( B ) X d P . Then μ is a signed measure which is absolutely continuous with respect to P Y . Indeed P Y ( B ) = 0 means exactly that P ( Y 1 ( B ) ) = 0 . 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 P Y , which we denote by E ( X Y ) .

    Comparing with conditional expectation with respect to sub-sigma algebras, it holds that

    E ( X Y ) Y = E ( X Y 1 ( Σ ) ) .

    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 Ω:

    Y 1 ( B ) X   d P = Y 1 ( B ) ( E ( X Y ) Y )   d P .

    The equation means that the integrals of X and the composition E ( X Y ) Y over sets of the form Y 1 ( B ) , for B Σ , are identical.

    This equation can be interpreted to say that the following diagram is commutative in 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

    E ( X Y = y ) = x X x   P ( X = x Y = y ) = x X x   P ( X = x , Y = y ) P ( Y = y ) ,

    where X is the range of X.

    If X is a continuous random variable, while Y remains a discrete variable, the conditional expectation is:

    E ( X Y = y ) = X x f X ( x Y = y ) d x

    with f X ( x Y = y ) = f X , Y ( x , y ) P ( Y = y ) (where fX,Y(x, y) gives the joint density of X and Y) is the conditional density of X given Y=y.

    If both X and Y are continuous random variables, then the conditional expectation is:

    E ( X Y = y ) = X x f X Y ( x y ) d x

    where f X Y ( x y ) = f X , Y ( x , y ) f Y ( y ) (where fY(y) gives the density of Y).

    Basic properties

    All the following formulas are to be understood in an almost sure sense. The sigma-algebra H could be replaced by a random variable Z

  • Pulling out independent factors:
  • If X is independent of H , then E ( X H ) = E ( X ) .
  • If X is independent of σ ( Y , H ) , then E ( X Y H ) = E ( X ) E ( Y H ) . Note that this is not necessarily the case if X is only independent of H and of Y .
  • If X , Y are independent, G , H are independent, X is independent of H and Y is independent of G , then E ( E ( X Y G ) H ) = E ( X ) E ( Y ) = E ( E ( X Y H ) G ) .
  • Stability:
  • If X is H -measurable, then E ( X H ) = X .
  • If Z is a random variable, then E ( f ( Z ) Z ) = f ( Z ) and in its simplest form: E ( Z Z ) = Z
  • Pulling out known factors:
  • If X is H -measurable, then E ( X Y H ) = X E ( Y H ) .
  • If Z is a random variable, then E ( f ( Z ) Y Z ) = f ( Z ) E ( Y Z )
  • Law of total expectation: E ( E ( X H ) ) = E ( X ) .
  • Tower property:
  • For sub-σ-algebras H 1 H 2 F we have E ( E ( X H 2 ) H 1 ) = E ( X H 1 ) .
  • A special case is when Z is a H -measurable random variable. Then σ ( Z ) H and thus E ( E ( X H ) Z ) = E ( X Z )
  • Doob martingale property: the above with Z = E ( X H ) (which is H -measurable), and using also E ( Z Z ) = Z , gives E ( X E ( X H ) ) = E ( X H ) .
  • For random variables X , Y we have E ( E ( X Y ) f ( Y ) ) = E ( X f ( Y ) ) .
  • For random variables X , Y , Z we have E ( E ( X Y , Z ) Y ) = E ( X Y ) .
  • Linearity: we have E ( X 1 + X 2 H ) = E ( X 1 H ) + E ( X 2 H ) and E ( a X H ) = a E ( X H ) for a R .
  • Positivity: If X 0 then E ( X H ) 0 .
  • Monotonicity: If X 1 X 2 then E ( X 1 H ) E ( X 2 H ) .
  • Monotone convergence: If 0 X n X then E ( X n H ) E ( X H ) .
  • Dominated convergence: If X n X and | X n | Y with Y L 1 then E ( X n H ) E ( X H ) .
  • Fatou's lemma: If E ( inf n X n H ) > then E ( lim inf n X n H ) lim inf n E ( X n H ) .
  • Jensen's inequality: If f : R R is a convex function, then f ( E ( X H ) ) E ( f ( X ) H ) .
  • 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
  • Definition: Var ( X H ) = E ( ( X E ( X H ) ) 2 H )
  • Algebraic formula for the variance: Var ( X H ) = E ( X 2 H ) ( E ( X H ) ) 2
  • Law of total variance: Var ( X ) = E ( Var ( X H ) ) + Var ( E ( X H ) ) .
  • Martingale convergence: For a random variable X , that has finite expectation, we have E ( X H n ) E ( X H ) , if either H 1 H 2 is an increasing series of sub-σ-algebras and H = σ ( n = 1 H n ) or if H 1 H 2 is a decreasing series of sub-σ-algebras and H = n = 1 H n .
  • Conditional expectation as L 2 -projection: If X , Y are in the Hilbert space of square-integrable real random variables (real random variables with finite second moment) then
  • for H -measurable Y we have E ( Y ( X E ( X H ) ) ) = 0 , i.e. the conditional expectation E ( X H ) is in the sense of the L2(P) scalar product the orthogonal projection from X to the linear subspace of H -measurable functions. (This allows to define and prove the existence of the conditional expectation based on the Hilbert projection theorem.)
  • the mapping X E ( X H ) is self-adjoint: E ( X E ( Y H ) ) = E ( E ( X H ) E ( Y H ) ) = E ( E ( X H ) Y )
  • Conditioning is a contractive projection of Lp spaces L P s ( Ω ; F ) L P s ( Ω ; H ) i.e. E | E ( X H ) | s E | X | s for any s ≥ 1.
  • Doob's conditional independence property: If X , Y are conditionally independent given Z , then P ( X B Y , Z ) = P ( X B Z ) (equivalently, E ( 1 { X B } Y , Z ) = E ( 1 { X B } Z ) ).
  • References

    Conditional expectation Wikipedia