Distribution of the difference between the max and min of two exponentially distributed random variables We start with two independent random variables, X and Y, both being distributed Expo($\lambda$). I am working with $\lambda = 1$ to see if it makes it easier for me. Call M = max(X,Y) and L = min(X,Y). I know that L~Expo(2) and I can find the distribution of M. Now, I want to be able to find the distribution of A = M - L. Here is where I am at in solving the problem.
$F_A = P(A < a) = P(M-L < a) = P(M < a + L) = P(max(X,Y) < a + L) = P( X < a + L, Y < a + L) = P( X < a + L) * P( Y < a + L)$
And since X and Y have the same distribution, $P( X < a + L) * P( Y < a + L) = [P(X<a+L)]^2$
Then we need to find $P(X<a+L)$. 
$P(X<a+L) = \int_0^\infty F_X(a+l)f_L(l)dl = \int_0^\infty (1-e^{-(a+l)})(2e^{-2l})dl = \int_0^\infty (2e^{-2l} - 2e^{-(a+3l)})dl = 1-\frac{2}{3}e^{-a}$
I can square this, but ultimately it does not agree with the answer presented to me - that A~Expo(1).
I would really appreciate it if someone could help! 
I think I may be making a mistake in saying that $P(X<a+L) = \int_0^\infty F_X(a+l)f_L(l)dl$. It might be would be more proper to write $P(X<a+L) = \int_0^\infty F_X(a+l | L = l)f_L(l)dl$. I don't want to confuse a value of the random variable with the random variable itself so I think conditioning is appropriate with the latter step, but then I don't have the conditional distribution do I?
 A: Your first error is… why should it hold that $$P( X < a + L, Y < a + L) = P( X < a + L) \cdot P( Y < a + L)$$ Yes, $X$ and $Y$ are independent, but on the right hand side there is also an $L$ which also contains $X$ and $Y$!
Maybe it's clearer for you if we write it as $$P( X < a + L, Y < a + L) = P(X - L < a, Y - L < a)$$ And now you claim this equals $$P( X - L < a) P(Y - L < a) = P(X < a + L) P(Y < a + L)$$ but why should be $X-L$ independent of $Y-L$?
And ofc in general it isn't. 
Then you claim that because $X$ and $Y$ have the same distribution it holds that $$P( X < a + L) = P( Y < a + L)$$ Again we write that as $$P( X - L < a) = P( Y - L < a)$$ And the fact simplifies to "$X-L$ and $Y-L$ have the same distribution"… but why should that hold? Ok, here you could argue with some kind of symmetry argument but this does not fix your first mistake.
I guess the easiest way to get the distribution of $A = M - L$ is to consider that $$\min(x,y) = \frac{1}{2}\left(x + y - |x - y|\right) \\ \max(x,y) = \frac{1}{2}(x + y + |x-y|)$$
And we get $A = |X - Y|$
So all you have to do is to calculate the distribution of $|X - Y|$ 
A: Per the comments that I left with the other responder,
A = max(X,Y)-min(X,Y) = |Y-X|, you should know this because one term is X or Y and the other term is Y or X.  You don't need any derivation for that.
The density function of $X$ is $\lambda e^{-\lambda x}$ (for $x \ge 0$), and $0$ elsewhere. There is a similar expression for the density function of $Y$.  By independence, the joint density function of $X$ and $Y$ is
$$\lambda^2 e^{-\lambda (x+y)}$$
in the first quadrant, and $0$ elsewhere.
Let $Z=|Y-X|$. Let us first attack the problem of Z = Y-X and then the Z = X-Y will be the same result as X and Y are both exponentially ditributed with same $\lambda$. We want to find the density function of $Z$. First we will find the cumulative distribution function $F_Z(z)$ of $Z$, that is, the probability that $Z\le z$.
Consider $z$ fixed and positive, and draw the line $y-x=z$.  We want to find the probability that the ordered pair $(X,Y)$ ends up below that line or on it. The only relevant region is in the first quadrant. So let $D$ be the part of the first quadrant that lies below or on the line $y=x+z$. Then
$$P(Z \le z)=\iint_D \lambda^2e^{-\lambda (x+y)}dx\,dy.$$
We will evaluate this integral, by using an iterated integral. First we will integrate with respect to $y$, and then with respect to $x$. Note that $y$ travels from $0$ to $x+z$, and then $x$ travels from $0$ to infinity. Thus
$$P(Z\le x)=\int_0^\infty \lambda e^{-\lambda x}\left(\int_{y=0}^{x+z} \lambda e^{-\lambda y}\,dy\right)dx.$$
The inner integral turns out to be $1-e^{-\lambda(x+z)}$. So now we need to find
$$\int_0^\infty \left(\lambda e^{-\lambda x}-\lambda e^{-\lambda z} e^{-(2\lambda)x}\right)dx.$$
We end up with
$$P(Z \le z)=1-\frac{1}{2}e^{-\lambda z}.$$
for $|Z| = |X-Y|$
Then $P(|Z|<z) = P(Z\lt z) - P(Z\lt -z) = P(Y-X \lt z) - P(-Z\gt z)\tag 1$
$ = P(Y-X\lt z) - P(X-Y\gt z) $
But $P(X-Y\gt z) = 1- P(X-Y\lt z) $
Again $P(X-Y\lt z) = 1-\frac{1}{2}e^{-\lambda z}$
Hence $P(X-Y\gt z) = 1-1+\frac{1}{2}e^{-\lambda z} = \frac{1}{2}e^{-\lambda z}$
Going back to the $(1)$
$P(|Z|<z) = 1-\frac{1}{2}e^{-\lambda z}-\frac{1}{2}e^{-\lambda z} = 1-e^{-\lambda z}$
In other words,
$P(-z\lt Z \lt z) = 2P(Z\lt z)-1$
$P(|Z|\le z) = 2 -e^{-\lambda z}-1 = 1-e^{-\lambda z}$ 
For the density function $f_{|Z|}(z)$ of $|Z|$, differentiate the cumulative distribution function. We get 
$$f_{|Z|}(z)=\lambda e^{-\lambda z} \quad\text{for $z \ge 0$.}$$ which is nothing but $Expo(\lambda)$
A: No derivation is necessary for this problem. Speaking in terms of time (usual example for the exponential), the exponential distribution describes the R.V. time until the next event. The clock can be started at any time. In this case the clock starts when the first event occurs and measures the time until the second event. That time interval is therefore a R.V. that follows $Expo(\lambda)$.
