# Conditional Expectation problem

1. Sep 15, 2014

### jamescaan2004

1. I have a problem that I cannot figure out how to solve. I want to find the following:
E(X|X<Y) where X follows exp(a) and Y follows exp(b) (exp is for exponential distribution). Any ideas on how to solve it?

I got E(X|X<Y) = $$\int_{-∞}^{∞} E(X|X<y)f_{y}(y)dy = \int_{-∞}^{∞} \frac{\int_0^y x f_x(x)dx}{F_y(y)}f_{y}(y)dy = \int_{-∞}^{∞} \frac{-x e^{-ax}|^{0}_{y}-\int_0^y -e^{-ax}dx}{1-e^{-ay}}be^{-by}dy = \int_{-∞}^{∞} \frac{-y e^{-ay} + \frac{1}{a}e^{-ay}-\frac{1}{a}}{1-e^{-ay}}be^{-by}dy$$

However, I need to find a closed form solution to this problem in terms of rates a and b. Any ideas on how to solve this problem?

Last edited: Sep 15, 2014
2. Sep 15, 2014

### Ray Vickson

Why do you integrate from $-\infty$ to $+\infty$? These are exponential distributions, and surely you know what the appropriate range should be!

Anyway, start by obtaining the conditional density $f_{X<Y}(x)$ of $X$, which is given by
$$f_{X<Y}(x) \Delta x = \Pr ( x < X < x + \Delta x | X < Y) = \frac{ \Pr(x < X < x + \Delta x \; \& \; X < Y)}{\Pr( X < Y)}$$

3. Sep 18, 2014

### jamescaan2004

Thank you very much for your response. I have tried it several times for the last couple of days and cannot get anything out of it. Would you please be able to provide any additional insight?

4. Sep 18, 2014

### Ray Vickson

I am going to ask you a series of questions, and you should try very seriously to answer them. If you do, you ought to obtain the answer to your question.

1) What is the formula for the bivariate density function $f_{X,Y}(x,y)$, and over what $(x,y)$ region does that apply? From now on, let us call that region the "relevant region".
2) What is the sub-region of $Y > X$ in the relevant region? Using the bivariate density, what is $P(Y > X)$?
3) For very small $\Delta x > 0$, what is the sub-region of $x < X < x + \Delta X \; \& \; Y > X$ within the relevant region? Using the bivariate density, what is the probability $P(x < X < x + \Delta x \; \& \; Y > X)$?
4) Using your answers to 2) and 3), what is the conditional density $f_{Y>X}(x)$? You obtain it from
$$f_{Y > X}(x) \, \Delta x = P(x < X < x + \Delta x | Y > X) = \frac{P(x < X < x + \Delta x \: \& \; Y > X)}{P(Y>X)}$$
in the limit as $\Delta x \to 0$. In other words,
$$f_{Y>X}(x) = \lim_{\Delta x \to 0} \frac{P(x < X < x + \Delta x | Y > X)}{\Delta x}$$

If you do this carefully and step-by-step you will arrive at a surprisingly simple answer. Then getting the conditional expected value is easy.