# Conditional expectation of exponential distribution.

1. Mar 9, 2010

### manish13

I have been stuck at this calculation. There are two exponential distributions X and Y with mean 6 and 3 respectively. We need to find
E[y-x|y>x]
I keep getting it negative, which is clearly wrong. Anybody wants to try it?

2. Mar 10, 2010

### mathman

Show your calculation. It should be easy to find the flaw.

3. Mar 10, 2010

### manish13

I got it finally. But here is a brief note about it

$$E[t_2-t_1|t_2>t_1] = E[(t_2-t_1)*I_{\{t_2>t_1\}}] = \int_0^{\infty} \int_{t_1}^{\infty}(t_2-t_1)\lambda_1 \lambda_2 e^{-\lambda_1 t_1} e^{-\lambda_2 t_2} dt_2 dt_1$$

This nicely gives the answer as $$\frac{\lambda_1}{\lambda_2(\lambda_1+\lambda_2)}$$

I was doing a mistake in byparts.