Expectation of $X$ conditional on $aX+(1-a)Y>c$.

conditional probabilityconditional-expectationprobabilityprobability distributions

I am studying conditional probability by myself and came across this question.

Let $X$ and $Y$ be independent random variables (over a unit interval) with densities $f_x$ and $f_y$ respectively.

For $a\in [0,1]$, let $Z=aX+(1-a)Y$.

The question is "What is $\mathbb{E}(X\mid Z>c)$?" Here, $c$ is a constant.

I tried to find pdf of $Z$ and the joint density which are$$f_Z(z)=\frac{1}{a}\int \limits _0^1f_X\left (\frac{z-(1-a)y}{ay}\right )f_Y(y)\,dy$$and$$f_{XZ}(x,z)=\frac{1}{1-a}f_X(x)f_Y\left (\frac{z-ax}{1-a}\right ).$$However, I cannot figure out how to find the expectation conditioning on the event $Z$ is greater than $c$. Any help will be highly appreciated. (we may assume $f_x=f_y$ if the derivation is too complicated)

Best Answer

I don't know if you are looking for a closed and simplified solution based on the values of $a$ and $c$, but one approach for any problems in the conditional expectation is as follows:

As you have specified in your question, throughout the solution, I have assumed that $X$ and $Y$ are independent and they are defined over the unit interval, however the approach doesn't really depend on independency or a specific range.

First, find the conditional density:

$$f_{X|Z>c}(x|z>c) = \frac{f_{X,Y}(x,y)}{P(Z>c)}=\frac{f_{X,Y}(x,y)}{P(aX+(1-a)Y>c)}.$$ You can ignore the notation I have used for $f_{X|Z>c}(x|z>c)$. It's just the conditional density of $X$ given $Z>c$ and that's a function of $x,y$ so for simplicity you can call it $g(x,y).$

Note that the numerator is just the joint density of $X$ and $Y$, $f_{X,Y}(x,y)$.

If $X$ and $Y$ are independent, then

$$f_{X|Z>c}(x|z>c) = \frac{f_{X}(x)f_Y(y)}{P(aX+(1-a)Y>c)}.$$

The denominator can be calculated as

$$P(aX+(1-a)Y>c) = \iint_\limits{D} f_X(x) f_Y(y) dx dy.$$

Calculating the above double integral is straightforward. You need to find the region $D$. It depends on values of $a$ and $c$ but it's easy to calculate the bounds for the integrals, because the region $D$ is inside the unit square and above the line $y= -\frac{a}{1-a}x + \frac ca $.

For example, if $a=\frac 12$ and $c=\frac 13$, then we can draw the region and calculate the integral like this: enter image description here

$$P(aX+(1-a)Y>c) = \int_\limits{0}^{\frac 23} \int_\limits{\frac 23-x}^{1} f_X(x) f_Y(y) \,dy\, dx+ \int_\limits{\frac 23}^{1} \int_\limits{0}^{1} f_X(x) f_Y(y) \,dy\, dx.$$

After we find the conditional distribution, then we have

$$\mathbb{E}[X | Z>c] = \iint_\limits{D} x f_{X|Z>c}(x|z>c)\,dx \,dy.$$

So combining everything gives,

$$\mathbb{E}[X | Z>c] = \iint_\limits{D} \frac{x\,f_X(x)\,f_Y(y)}{\iint_\limits{D} f_X(x) f_Y(y) dx dy}\,dx \,dy.$$

where $D = [0,1]\times[0,1]\, \bigcap \, \{(x,y): ax+(1-a)y>c\}.$

For a concrete example, assume that $X$ and $Y$ are independent and uniformly distributed over $[0,1]$ and $a=\frac 12$ and $c=\frac 13$.

Then,

$$P(\frac{1}{2}X+\frac{1}{2}Y>\frac{1}{3}) = \int_\limits{0}^{\frac 23} \int_\limits{\frac 23-x}^{1} 1 \,dy\, dx+ \int_\limits{\frac 23}^{1} \int_\limits{0}^{1} 1 \,dy\, dx = \frac 79.$$

So,

$$\mathbb{E}[X | Z>\frac 13] = \int_\limits{0}^{\frac 23} \int_\limits{\frac 23-x}^{1} \frac{9x}{7} \,dy\, dx+ \int_\limits{\frac 23}^{1} \int_\limits{0}^{1} \frac{9x}{7} \,dy \,dx = \frac{73}{126}.$$

More general cases: Consider random variables $X$ and $Y$ with joint density distribution $f_{X,Y}(x,y)$ defined on region $\Omega$ and we want to calculate $\mathbb{E}[g(X,Y) | A]$ for some functions $g$:

Case 1: $P(A) > 0$:

Then the conditional density is $\frac{f_{X,Y}(x,y)}{P(A)}$ and therefore,

$\mathbb{E}[g(X,Y) | A] = \iint_\limits{A\cap\Omega} g(x,y) \frac{f_{X,Y}(x,y)}{P(A)} dx\,dy =\frac{1}{P(A)}\,\iint_\limits{A\cap\Omega} g(x,y) f_{X,Y}(x,y) dx\,dy.$

Case 2: $P(A)=0$.

It depends what $A$ is. For example, if $A=\{X=c\}$ then the conditional density is calculated as $\frac{f_{X,Y}(c,y)}{f_X(c)}$ where $f_X(x)$ is the marginal density of $X$ and therefore, $\mathbb{E}[g(X,Y) | X=c] = \int_\limits{A\cap\Omega} g(c,y) \frac{f_{X,Y}(c,y)}{f_X(c)} dy = \frac{1}{f_X(c)} \int_\limits{A\cap\Omega} g(c,y) f_{X,Y}(c,y) dy. $

Similarly, $\mathbb{E}[g(X,Y) | Y=c] =\frac{1}{f_Y(c)} \int_\limits{A\cap\Omega} g(x,c) f_{X,Y}(x,c) dx.$

For other cases such as $\mathbb{E}[g(X,Y) | X+Y=c]$, we need to calculate the density of $X+Y$ first and then

$\mathbb{E}[g(X,Y) | X+Y=c] =\frac{1}{f_{X+Y}(c)} \int_\limits{A\cap\Omega} g(x,c-x) f_{X,Y}(x,c-x) dx.$

Intuition behind the conditional density:

When you condition on an event, say $aX+(1-a)Y>c$, it means that your new region is now $D = [0,1]\times[0,1]\, \bigcap \, \{(x,y): ax+(1-a)y>c\}$ and the conditional expectation $E[X | Z>c]$ is just the usual expectation $E[X^*]$ on the new region, where $X^*=X|_{Z>c}$ is the restriction of $X$ on the new region. So, $E[X^*] = \int_\limits{X} x f^*(x) dx$ where $f^*(x)$ is the density distribution of $X^*$. This $f^*(x)$ is actually the conditional distribution because we need some kind of normalization for $f(x)$ on the new region where $f(x)$ is the marginal density of $X$ on the original region which is $[0,1] \times [0,1]$. So to summarize, the conditional density is just the density distribution of the new random variable which is restricted on the new region.

Related Question