Home page for accesible maths 6 Expectation (II)

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

6.2 Conditional Expectations

Expectations for conditional random variables are defined in the obvious way. Conditional expectations are given by

  1. 𝖤[X∣Y=y]=∫-∞∞sfX∣Y(s∣y)ds,

  2. 𝖤[Y∣X=x]=∫-∞∞tfY∣X(t∣x)dt.

𝖤⁡[Y∣X=x] is a function g⁢(x), say, of x (a real number). If we have not yet seen x then this becomes a function g⁢(X) of the random variable X. i.e. 𝖤⁡[Y∣X] is a random variable because it is a function of the random variable X.

Sometimes conditioning provides an easy way to obtain the expectations of the marginal variables. Consider the random variable 𝖤⁡[h⁢(Y)|X], which is a function of X. Just as 𝖤⁡[g⁢(X)]=∫g⁢(s)⁢fX⁢(s)⁢ds, so the expectation of 𝖤⁡[h⁢(Y)|X] is

𝖤⁡[𝖤⁡[h⁢(Y)|X]] =∫-∞∞𝖤⁡[h⁢(Y)∣X=s]⁢fX⁢(s)⁢ds
=∫s=-∞∞∫t=-∞∞h(t)fY∣X(t∣s)dtfX(s)ds
=∫-∞∞∫-∞∞h⁢(t)⁢fX⁢Y⁢(s,t)⁢ds⁢dt
=𝖤⁡[h⁢(Y)].

Now consider 𝖤⁡[g⁢(X)⁢h⁢(Y)|X], which is a random variable, since it is a function of the random variable X.

𝖤⁡[g⁢(X)⁢h⁢(Y)|X] =∫t=-∞∞g(X)h(t)fY|X(t|X)dt
=g(X)∫t=-∞∞h(t)fY|X(t|X)dt
=g⁢(X)⁢𝖤⁡[h⁢(Y)|X].

Intuitively, by conditioning on the unknown X it becomes an unknown constant as far as the expectation is concerned and so it can be taken outside the expectation.

Example 6.2.1.

The rvs X and Y follow a distribution specified by X∼𝖭⁡(0,1) and Y∣X=x∼𝖭(αx,1).

  1. (a)

    Write down 𝖤⁡[Y|X=x] and 𝖵𝖺𝗋⁡[Y|X=x].

  2. (b)

    Find 𝖤⁡[X] and 𝖤⁡[Y].

  3. (c)

    Find 𝖤⁡[X⁢Y].

Solution. 

  1. (a)

    𝖤⁡[Y|X=x]=α⁢x and 𝖵𝖺𝗋⁡[Y|X=x]=1.

  2. (b)

    𝖤⁡[X]=0 and

    𝖤⁡[Y] =𝖤⁡[𝖤⁡[Y|X]]
    =𝖤⁡[α⁢X]=α⁢𝖤⁡[X]=0
  3. (c)
    𝖤⁡[X⁢Y] =𝖤⁡[𝖤⁡[X⁢Y|X]]
    =𝖤⁡[X⁢𝖤⁡[Y|X]]
    =𝖤⁡[α⁢X2]
    =α.

    Note that 𝖤⁡[X⁢Y]-𝖤⁡[X]⁢𝖤⁡[Y]=α.

The conditional variances are given by

𝖵𝖺𝗋⁡[X∣Y=y] =∫-∞∞(s-𝖤[X∣Y=y])2fX∣Y(s∣y)ds
=𝖤[X2∣Y=y]-𝖤[X∣Y=y]2,
𝖵𝖺𝗋⁡[Y∣X=x] =∫-∞∞(t-𝖤[Y∣X=x])2fY∣X(t∣x)dt
=𝖤[Y2∣X=x]-𝖤[Y∣X=x]2.

If X and Y are independent the conditional distributions are the same as the marginal distributions (fX|Y(x|y)=fX(x) and fY|X(y|x)=fY(y)), so that in particular

  1. 𝖤⁡[X∣Y=y]=𝖤⁡[X],

  2. 𝖵𝖺𝗋⁡[X∣Y=y]=𝖵𝖺𝗋⁡[X],

  3. 𝖤⁡[Y∣X=x]=𝖤⁡[Y],

  4. 𝖵𝖺𝗋⁡[Y∣X=x]=𝖵𝖺𝗋⁡[Y].