# Moment generating function of the minimum of two independent exponential random variables directly

If $$X$$ has distribution $$\mathbb{exp}(\lambda_1)$$ and $$Y$$ has distribution $$\mathbb{exp}(\lambda_2)$$, and they are independent of each other, then how do we obtain the MGF of $$Z=\mathbb{min}(X,Y)$$ directly?

I know that we can obtain the distribution of $$Z$$ simply by examining its CDF, which tells us that it would be $$\mathbb{exp}(\lambda_1 + \lambda_2)$$. This appears to be the usual method in finding the minimum's distribution. Easily, this gives us: $$M_Z(t)=\frac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2-t},$$as its MGF. I was curious about doing this by figuring out the expectation instead: $$M_Z(t)=E[e^{t\times\mathbb{min}(X,Y)}].$$ I applied the law of total expectation, partitioning with the events $$\{X>Y\}$$ and $$\{X \le Y\}$$. This gives: $$M_Z(t)=E[e^{t\times\mathbb{min}(X,Y)}|X>Y]P(X>Y)+E[e^{t\times\mathbb{min}(X,Y)}|X \le Y]P(X \le Y)$$The conditions on the expected values simplifies the minimums. We also have $$P(X>Y) = \frac{\lambda_2}{\lambda_1+\lambda_2}$$. Putting these together, we should get: $$M_Z(t) = E[e^{tY}]\frac{\lambda_2}{\lambda_1+\lambda_2} +E[e^{tX}]\frac{\lambda_1}{\lambda_1+\lambda_2}.$$ Applying the exponential MGF to both, we finally get: $$M_Z(t) = \frac{\lambda_2}{\lambda_2-t} \frac{\lambda_2}{\lambda_1+\lambda_2} + \frac{\lambda_1}{\lambda_1-t}\frac{\lambda_1}{\lambda_1+\lambda_2}.$$To check if this MGF was right, I let $$\lambda_1=1$$, $$\lambda_2=2$$ and evaluated the derivative at $$t=0$$ on Wolfram Alpha. It gave me $$2/3$$, but I know it's meant to be $$1/3$$ since it should correspond to the mean: $$\frac{1}{\lambda_1+\lambda_2}$$. This implies I've messed up somewhere, but I can't find where I've went wrong. Any help would be appreciated.

You seem to use the identities $$E[e^{tY}|X>Y]=E[e^{tY}]$$ and $$E[e^{tX}|X\leq Y]=E[e^{tX}]$$ which are not correct. Instead you can write $$E[e^{t\min(X,Y)}]=E[e^{tY}1_{\{X>Y\}}]+E[e^{tX}1_{\{X\leq Y\}}].$$ Now you can calculate each expectation. For example, \begin{align*} E[e^{tY}1_{\{X>Y\}}]&=\int_0^\infty e^{ty}\lambda_2 e^{-\lambda_2 y}\int_y^\infty\lambda_1 e^{-\lambda_1 x}\,\mathrm{d}x\,\mathrm{d}y \\ &=\int_0^\infty e^{ty}\lambda_2 e^{-\lambda_2 y}e^{-\lambda_1 y}\int_0^\infty\lambda_1 e^{-\lambda_1 x}\,\mathrm{d}x\,\mathrm{d}y \\ &=\frac{\lambda_2}{\lambda_1+\lambda_2}\int_0^\infty e^{ty}(\lambda_1+\lambda_2)e^{-(\lambda_1+\lambda_2)}\,\mathrm{d}y \\ &=\frac{\lambda_2}{\lambda_1+\lambda_2}\frac{\lambda_1+\lambda_2}{\lambda_1+\lambda_2-t} \\ &=\frac{\lambda_2}{\lambda_1+\lambda_2-t}. \end{align*} Similarly, $$E[e^{tX}1_{\{X\leq Y\}}]=\frac{\lambda_1}{\lambda_1+\lambda_2-t}$$. Now you get the desired MGF by adding the two expectations.