TITLE: Prove that $\mathbb P(X>Y) =\frac{b}{a + b}$ if $X, Y$ are exponentially distributed with parameters $a$ and $b$.
QUESTION [6 upvotes]: Let $X, Y$ be an exponentially distributed random variables with parameters $a, b$. Then $X$ has pdf: 
  $$f_X(x) =\begin{cases} a e^{-a x},& x\geq 0\\
0,& \text{otherwise}.\end{cases}$$ Suppose $X$ and $Y$ independent. Show that $$\mathbb P(X>Y) = \frac{b}{a+b}.$$

Now I thought the following:
$$f(x,y) = f_X(x)\ f_Y(y) = abe^{-ax -by},\qquad\text{for } x,y > 0.$$
And then $$\mathbb P(X>Y) = \int_0^\infty \int_0^x a b e^{-ax -by}\,dydx$$
However, if I solve this (manually or using Wolframalpha), I can't seem to end up with $\frac{b}{a+b}$. Any ideas?

REPLY [3 votes]: There is an alternative approach see this reference by first determining the pdf of $X-Y$ (or find it in tables) 
$$f(x) = \frac{ab}{a+b}
\begin{cases}e^{b x} & \text{if} \  x \leq 0\\
       e^{-a x} & \text{if} \  x \geq 0  \end{cases} \ \ \ (*)$$
Remarks: 
1) the curve of $f$ is tent-shaped (see figure below for the case $a=3$ and $b=1$).
2) a particular, rather well-known case of (*), is for $a=b$, the so-called double exponential $f(x)=\frac{1}{2}e^{-|x|}$.
Then the result is
$$\int_{x=0}^{\infty}f(x)dx=\int_{x=0}^{\infty}\frac{ab}{a+b}e^{-ax}dx=\frac{ab}{a+b}\frac{1}{a}=\frac{b}{a+b}.$$