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?

  • $\begingroup$ Have a look at the pdf of $X-Y$ that I establish in my answer to this question $\endgroup$
    – Jean Marie
    Aug 13, 2016 at 21:16

2 Answers 2


\begin{align*} P(X>Y) &= \int_{0}^\infty\int_{0}^x abe^{-ax}e^{-by}\,dydx\\ &=\int_0^\infty ae^{-ax}\left[\int_0^xbe^{-by}\,dy\right]\,dx\tag 1\\ &=\int_0^\infty ae^{-ax}\left(1-e^{-bx}\right)\,dx\\ &=\int_0^\infty ae^{-ax}-a e^{-(a+b)x}\,dx\tag 2\\ &=1-\frac{a}{a+b}\int_0^\infty(a+b)e^{-(a+b)x}\,dx\tag 3\\ &=\frac{a+b-a}{a+b}\\&=\frac{b}{a+b}. \end{align*} where in

  1. I recognize the inside integral as the cdf of $Y$
  2. The left integral is the integral of a density so it is $1$ and
  3. I make the integrand a density by multiplying and diving by the factor $a+b$ to make it equal $1$.

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} \ \ \ (*)$$


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


enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.