Flaw in my Method in Calculating Expectation of Maximum of Exponential RVs? So I'm trying to find $\mathbb{E}(\text{max}(T_1,T_2))$ where $T_1$ and $T_2$ are exponential distributions with rate $\mu_1$ and $\mu_2$ respectively. What is the problem in the following method in determining this expectation?
$\begin{align*}
\mathbb{E}[\mathbb{E}[\text{max}(T_1,T_2) | \text{min}(T_1,T_2)]]\\
=\mathbb{E}[T_1]\cdot\mathbb{P}(T_1>T_2) + \mathbb{E}[T_2]\cdot\mathbb{P}(T_2>T_1)\\
=\frac{1}{\mu_1}\cdot \frac{\mu_2}{\mu_1+\mu_2}+\frac{1}{\mu_2}\cdot \frac{\mu_1}{\mu_1+\mu_2}\\
=etc...\\
\end{align*}$
I'm 95% sure it's to do with the second line but I don't have a clear picture of what I'm doing wrong.
Thanks in advance.
 A: It should be $\mathsf E(\max(T_1,T_2))\\\qquad = \mathsf E(T_1\mid T_1>T_2)\,\mathsf P(T_1>T_2)+\mathsf E(T_2\mid T_1\leqslant T_2)\,\mathsf P(T_1\leqslant T_2) \\ \qquad = \mathsf E(T_1\,\mathbf 1_{T_1>T_2})+\mathsf E(T_2\,\mathbf 1_{T_1\leqslant T_2})$
A: It may help to begin with the distribution of the maximum. Here is an outline,
with some proofs.
Let $V= \min(T_i,T_2)$ and $W = \max(T_1,T_2),$ where
$T_i \stackrel{indep}{\sim} \mathsf{EXP}(rate = \lambda_i).$
Then
$$F_W(t) = (1 - e^{-\lambda_1t})(1 - e^{-\lambda_2t})
= [1-e^{-\lambda_1t}] + [1-e^{-\lambda_2t}] - [1-e^{-(\lambda_1 + \lambda_2)t}]\\
= F_{T_1}(t) + F_{T_2}(t) - F_V(t),$$
for $t > 0.$  So that
$$f_W(t) = \lambda_1e^{-\lambda_1t}+\lambda_2e^{-\lambda_2t}-
(\lambda_1 + \lambda_2)e^{-(\lambda_1+\lambda_2)t}$$
and $$E(W) = \frac{1}{\lambda_1}+\frac{1}{\lambda_2}-\frac{1}{\lambda_1+\lambda_2} = E(T_1)+E(T_2)-E(V).$$ It is easy to show that
$V \sim \mathsf{Exp}(rate=\lambda_1+\lambda_2)$ with $E(V) = \frac{1}{\lambda_1+\lambda_2}.$
If $\lambda_1 = \lambda_2,$ then $E(W) = E(V) + E(T).$ Intuitively,
we wait for the first of the two events $V$, invoke independent increments,
and wait additional time $T$ for the second event $W.$
If $\lambda_1 \ne \lambda_2,$ one can show that $p_i = P(T_i = V) = \lambda_i/(\lambda_1 + \lambda_2)$ and thus
$$E(W) = p_1[E(V) + E(T_2)] + p_2[E(V) + E(T_1)].$$
Some of these relationships are illustrated for $\lambda_1 = 2, \lambda_2=3$ by
the following brief simulation in R of a million maximums.
set.seed(1234);  m = 10^6;  lam1 = 2;  lam2 = 3
t1 = rexp(m, lam1);  t2 = rexp(m, lam2)
w = pmax(t1,t2);  v = pmin(t1,t2)
mean(w);  mean(v);  mean(v==t1)
## 0.63378             # aprx E(W) = 19/30
## 0.2001691           # aprx E(V) = 1/5
## 0.39968             # aprx P(T_1 = V) = 2/5
## 1/2 + 1/3 - 1/5     
## 0.6333333           # exact E(W), first formula
.4*(1/5 + 1/3) + .6*(1/5 + 1/2)
## 0.6333333           # exact E(W), second formula

