Conditional expectation of two exponential random variables $X$ and $Y$ are two independent exponential random variables:
$P(X \geq x)=e^{-\lambda_1 x}$ for every $x>0$;
$P(Y \geq y)=e^{-\lambda_2 y}$ for every $y>0$;
How to calculate the expectation of $X$ under the condition that $X<Y$?
i.e. How to calculate $E(X|X<Y)$?
===========================================
I'm also wondering why I am wrong:
$E(X)=E(X|X<Y)*P(X<Y)+E(X|X \geq Y)*P(X \geq Y)$
$E(X)=1/\lambda_1$
$P(X<Y)=\lambda_1/(\lambda_1+\lambda_2)$
$E(X|X \geq Y)=E(X)+E(Y)=1/\lambda_1+1/\lambda_2$
$P(X \geq Y)=\lambda_2/(\lambda_1+\lambda_2)$
However, the result of $E(X|X<Y)$ is $0$.
===I see $E(X|X \geq Y)$ should be $E(X)+E(Y|Y<X)$...
 A: One approach is to notice that we can express the given event $\{X<Y\}$ equivalently as $\{M=X\}$ where we introduce a new random variable $M=\min(X,Y)$.
Then we can use the fact that the minimum of independent exponentials is independent of their ordering so that we have
\begin{align}
\mathrm{E}[X|X<Y] = \mathrm{E}[X|M=X] = \mathrm{E}[M|M=X] = \mathrm{E}[M] = \frac1{\lambda_1+\lambda_2}.
\end{align}
Or from your law of total expectation approach, we have
\begin{align}
\frac1\lambda=\mathrm{E}[X] &= \mathrm{E}[X|X<Y]\cdot \mathrm{P}[X<Y] + \mathrm{E}[X|X>Y]\cdot \mathrm{P}[X>Y]\\
&= \mathrm{E}[X|X<Y]\cdot \frac{\lambda_1}{\lambda_1+\lambda_2} + \big[\mathrm{E}[X] + \mathrm{E}[Y|Y<X] \big]\cdot\frac{\lambda_2}{\lambda_1+\lambda_2}.
\end{align}
In the above, we used that given that $\{X>Y\}$, then $X=\max(X,Y)$ and $Y=\min(X,Y)$ and $X+Y=\max(X,Y)+\min(X,Y)$ so that
\begin{align}
\mathrm{E}[X|X>Y] &= \mathrm{E}[X+Y-M|X>Y]\\
&= \mathrm{E}[(X-M) + Y|X>Y]\\
&= \mathrm{E}[(X-M)|X>Y] + \mathrm{E}[Y|Y<X] &(\text{linearity})\\
&= \mathrm{E}[(X-M)|X>M] + \mathrm{E}[Y|Y<X]\\
&= \mathrm{E}[X] + \mathrm{E}[Y|Y<X] &(\text{memoryless})\\
\end{align}
