# $P(X_1 < X_2 < X_3)$ for Exponential Random Variables

Let $X_1 \sim \exp(\lambda_1)$, $X_2 \sim \exp(\lambda_2)$ and $X_3 \sim \exp(\lambda_3)$ be independent random variables, where the exponential density I'm using is $$f_X(x) = \frac{1}{\lambda}e^{-x/\lambda}$$

I'm trying to calculate $P(X_1 < X_2 < X_3)$ but am stuck. So far, I've rewritten this as $$P(X_1 < X_2 < X_3) = P(X_1 < X_2 \cap X_2 < X_3) = P(Y_1 < 0 \cap Y_2 < 0) \tag{*}$$ where $Y_1 = X_1 - X_2$ and $Y_2 = X_2 - X_3$. I've also worked out the marginal distributions for $Y_1$ and $Y_2$. Here's the pdf for $Y_1$: $$f_{Y_1}(y) = \begin{cases} \dfrac{e^{-y/\lambda_1}}{\lambda_1 + \lambda_2}, \qquad y > 0 \\[6pt] \dfrac{e^{y/\lambda_2}}{\lambda_1 + \lambda_2}, \qquad y \leq 0 \end{cases}$$

But, I need the joint pdf of $(Y_1, Y_2)$ to calculate $(*)$ since the two are not independent. I can write the vector $(Y_1, Y_2)$ as $$\begin{pmatrix} Y_1 \\ Y_2 \end{pmatrix} = \begin{pmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \end{pmatrix} \begin{pmatrix} X_1 \\ X_2 \\ X_3 \end{pmatrix}$$ but this doesn't seem to help me work out the joint distribution as it does for linear combinations of normals.

• Introducing dependence is a bad idea, use instead $$P(X_1<x)=1-e^{-x/\lambda_1}\qquad P(X_3>x)=e^{-x/\lambda_3}$$ hence $$P(X_1<X_2<X_3)=E((1-e^{-X_2/\lambda_1})e^{-X_2/\lambda_3})$$ Can you finish this?
– Did
Commented Oct 10, 2016 at 19:47
• @Did Is the $E$ on purpose? Commented Oct 10, 2016 at 19:49
• @OFRBG Tell me... Of course it is.
– Did
Commented Oct 10, 2016 at 19:51
• @Did Cool, I guess $(1 - e^{-X_2/\lambda_1}) = P(X_1 < X_2 \mid X_2)$?
– bcf
Commented Oct 10, 2016 at 19:51
• Indeed.  
– Did
Commented Oct 10, 2016 at 19:52

The probability density of an exponential random variable with parameter $$\lambda$$ is $$\lambda e^{-\lambda x}$$ which is equal to $$\lambda$$ at $$0$$. It means that the probability that it will be less than $$\delta$$ is equal to $$\lambda \delta$$ for $$\delta \rightarrow 0$$. So if we have $$n$$ independent exponential random variables with parameters $$\lambda_i$$ the probability that any of them will be less than $$\delta$$ is equal to $$\lambda_i\delta$$ for $$\delta \rightarrow 0$$. Now, the probability that two of them are less than $$\delta$$ is significantly smaller than any of the $$\lambda_i\delta$$ for $$\delta \rightarrow 0$$, thus the probability that the $$i$$-th variable will be smaller than $$\delta$$ conditioned on the event that one of them is approaches: $$\frac{\lambda_i\delta}{\lambda_1\delta+\lambda_2\delta+\dots+\lambda_n\delta}=\frac{\lambda_i}{\lambda_1+\lambda_2+\dots+\lambda_n}$$ as $$\delta \rightarrow 0$$. Therefore it is also the probability that the $$i$$-th variable will be the smallest one. Now, because of the memoryless property, all other variables are still independent and distributed exactly the same as at the beginning conditioned on the fact that $$i$$-th variable will be the smallest and, in fact, after conditioning any number of variables of being the smallest/greatest in any order the (joint) distribution of the remaining variables will remain the same. So the probability that the variables will appear in order $$1$$, $$2$$, $$\dots$$, $$n$$ is equal to: $$\frac{\lambda_1\lambda_2\dots\lambda_n}{(\lambda_1+\lambda_2+\dots+\lambda_n)(\lambda_2+\lambda_3+\dots+\lambda_n)(\lambda_{n-1}+\lambda_n)\lambda_n}$$ So in your case the answer is: $$\frac{\lambda_1\lambda_2\lambda_3}{(\lambda_1+\lambda_2+\lambda_3)(\lambda_2+\lambda_3)\lambda_3}=\frac{\lambda_1\lambda_2}{(\lambda_1+\lambda_2+\lambda_3)(\lambda_2+\lambda_3)}$$

• As my answer below shows, the result here is only correct if the pdf is expressed as $f_X(x)=\lambda e^{-\lambda x}$ rather than the $\frac{1}{\lambda} e^{-x/\lambda}$ definition used in the OP. (That said, the former definition is the standard one.) Commented Jan 6, 2021 at 13:21

$$\newcommand{\E}{\operatorname{E}}$$Suppose the distribution of $$X$$ is $$e^{-x/\lambda} (dx/\lambda)$$ for $$x\ge0.$$ Then you have these two lemmas:

• If $$x\ge0$$, then $$\Pr(X>x) = e^{-x/\lambda}.$$
• If $$0\le x_1\le x_2$$ then $$\Pr(X>x_2\mid X> x_1) = \Pr(X>x_2\ge x_1) = e^{-(x_2-x_1)/\lambda}.$$

Then we have \begin{align} & \Pr(X_1 And then \begin{align} \Pr(X_1 < X_2 < X_3) & = \E(\Pr(X_1 < X_2 < X_3 \mid X_1)) \\[6pt] & = \E( \cdots \end{align}

(ok, I'm going to finish this later, but maybe this is enough for the original poster to finish this $$\text{off } \ldots)$$

• Conditioning on $X_2$, not $X_1$, is simpler, as I explain in my comment.
– Did
Commented Oct 10, 2016 at 21:01
• Perhaps..... ok, I'll try it both ways. You get Beta distributions. $\qquad$ Commented Oct 10, 2016 at 21:23
• What is Beta and relevant to solve this?
– Did
Commented Oct 10, 2016 at 21:24
• @Did : I'll come back to this later$\ldots\qquad$ Commented Oct 10, 2016 at 21:26
• @MichaelHardy just a friendly reminder Commented Dec 16, 2019 at 1:27

To simplify notation, I'll use the parameters $$a_k:=1/\lambda_k$$ to express the exponential densities. Since the r.v.s are independent, their joint pdf is simply the product of the individual pdfs. Hence we obtain the relevant probability by integrating over the region $$x\leq y\leq z$$:

$$P(X_1 (Note that $$x\geq 0$$ by the nature of the exponential pdf.) We now compute these integrals inside-out: \begin{align} \int_{x_1=0}^{x_2}f_{X_1}(x_1)\,dx_1&=\int_0^{x_2}a_1 e^{-a_1 x_1}\,dx_1\\&=1-e^{-a_1 x_2},\\\\ \int_{x_2=0}^{x_3}f_{X_2}(x_2)(1-e^{-a_1 x_2})\,dx_2 &=\int_{x_2=0}^{x_3}a_2 e^{-a_2 x_2/\lambda_2}(1-e^{-a_1 x_2})\,dx_1\\ &=1-e^{-a_2 x_3}-\frac{a_2}{a_1+a_2}\left(1-e^{-(a_1+a_2)x_3}\right),\\\\ \int_{x_3=0}^{\infty }f_{X_3}(x_3)\Big[1-e^{-a_2 x_3}-&\frac{a_2}{a_1+a_2}\left(1-e^{-(a_1+a_2)x_3}\right)\Big]\,dx_3\\&=\int_{x_3=0}^{\infty }a_3 e^{-a_3 x_3}\Big[1-e^{-a_2 x_3}-\frac{a_2}{a_1+a_2}\left(1-e^{-(a_1+a_2)x_3}\right)\Big]\,dx_3\\ &=1-\frac{a_3}{a_2+a_3}-\frac{a_2}{a_1+a_2}\left(1-\frac{a_3}{a_1+a_2+a_3}\right)\\ &=\frac{a_2}{a_2+a_3}-\frac{a_2 }{a_1+a_2+a_3}\\ &=\frac{a_1 a_2}{(a_2+a_3)(a_1+a_2+a_3)} \end{align}

Returning to the original notation, we have $$P(X_1