Suppose we have three independent exponential random variables $A$, $B$ and $C$ with respective parameters $1$, $2$ and $3$.

Calculate $P(A<B<C)$.

The hint says this problem could be solved with calculus and without calculus. I am really curious how to approach it with different methods.

  • 2
    $\begingroup$ As an aside, here's another probability question answered with the same formula: math.stackexchange.com/questions/4220/… $\endgroup$ – user940 Nov 12 '11 at 0:19
  • 3
    $\begingroup$ There are two conventional parametrizations of the exponential distribution. Which one do you have in mind? Do you mean $B$ has an exponential distribution with rate $2$ and therefore expectation $1/2$, or do you mean $B$ has an exponential distribution with expectation $2$? In the former case the density is $f(x) = 2e^{-2x}$ for $x>0$; in the latter it is $(1/2)e^{-x/2}$ for $x>0$. $\endgroup$ – Michael Hardy Nov 12 '11 at 3:40

It is rather well known that $$P(A<B)=\frac{\lambda_a}{\lambda_a+\lambda_b}.$$

You should also know the fact that $$\min(A,B)\sim \mathcal E(\lambda_a+\lambda_b),$$ think about the first arrival time of the addition of two Poisson processes, for example.

From there, you could decompose the event $\{A<B<C\}$ into the intersection of the two independent events $$\{A<\min(B,C)\}$$ and $$\{B<C\}$$ to get an intuition of the result.

  • $\begingroup$ this is quite clever. $\endgroup$ – geraldgreen Nov 16 '11 at 17:02

This can be done from first principles using minimal Calculus (just differentiation and integration of monomials). By one definition, when $X$ has an Exponential distribution with parameter $\lambda\gt 0$, $\Pr(X\le x) = 1 - \exp(-\lambda x)$. Therefore, for any $0\lt x\le 1$,

$$\Pr(\exp(-X)\lt x) = \Pr(X \gt -\log(x)) = \exp(\lambda\log(x)) = x^\lambda.$$

By differentiation we find the probability density of $\exp(-X)$ is $\lambda x^{\lambda-1}\ dx$. The solution is now obtained by integrating the joint density of $(A,B,C)$ over the event $A\lt B\lt C$ via this transformation:

$$\eqalign{ \Pr(A \lt B \lt C) &= \Pr(\exp(-C)\lt \exp(-B)\lt \exp(-A)) \\ &= \int_0^1 da \int_0^a 2b\ db\int_0^b 3c^2\ dc \\ &= \int_0^1 da \int_0^a 2b\ b^3\ db\\ &= \frac{2}{5}\int_0^1 a^5\ da \\ &= \frac{1}{15}. }$$


Here is how to solve it without much calculus. Remember that for exponential variable $X$ with parameter $\lambda$, $\mathbb{P}(X > x) = \exp(-\lambda x)$ for $x \ge 0$.

We will make use of the following result, that relies on memoryless property of exponential distribution, i.e. $\mathbb{E}(f(X-a) ; X > a) = \mathbb{E}(f(X))$: $$ \begin{eqnarray} \mathbb{E}( \mathbf{1}_{X > a} \exp(-\mu X)) &=& \mathbb{E}(\exp(-\mu X); X > a) \mathbb{P}(X > a) \\ &=& \exp(-\mu a) \cdot \mathbb{E}(\exp(-\mu (X-a)); X > a) \cdot \exp(-\lambda a) \\ &=& \exp(-(\mu+\lambda) a) \cdot \mathbb{E}(\exp(-\mu X) ) \\ &=& \exp(-(\mu+\lambda) a) \cdot \frac{\lambda}{\lambda+\mu} \end{eqnarray} $$

Now, use conditioning: $$ \begin{eqnarray} \mathbb{P}(C > B > A) &=& \mathbb{E}_A( \mathbb{E}_B( \mathbf{1}_{B>a} \mathbb{P}(C > b ; B=b, A=a) ; A=a)) \\ &=& \mathbb{E}_A( \mathbb{E}_B( \mathbf{1}_{B>a} \exp(-\lambda_c b) ; A=a)) \\ &=& \mathbb{E}_A( \frac{\lambda_b}{\lambda_b+\lambda_c} \exp(-a(\lambda_b+\lambda_c) ) \\ &=& \frac{\lambda_b}{\lambda_b+\lambda_c} \cdot \frac{\lambda_a}{\lambda_a + \lambda_b+\lambda_c} \end{eqnarray} $$

With $\lambda_a=1$, $\lambda_b = 2$, $\lambda_c=3$, the answer comes to $\frac{1}{15}$.

  • $\begingroup$ nice use of memorylessness. $\endgroup$ – geraldgreen Nov 11 '11 at 20:47

The naive way would be to use conditional probability:

$\mathrm P(A<B<C) = \int_0^\infty \mathrm P(A < B < x) f_C(x) \mathrm d x = \int_0^\infty \int_0^x \mathrm P(A<y) f_B(y) f_C(x) \mathrm d y \mathrm d x$.


I have written a program to test the probabilities for three independent exponential random variables A, B and C with respective parameters λa = 1, λb = 2, λc = 3. Here are the results:

P (A < B < C) = 0.3275
P (A < C < B) = 0.2181
P (B < A < C) = 0.2047
P (B < C < A) = 0.0681
P (C < A < B) = 0.1211
P (C < B < A) = 0.0603

P (A < B < C) is not 1/15.

Here is the source code of the program:

Random Rand = new Random(2015);

public Double GetExponential(Double mean)
    return -mean * Math.Log(Rand.NextDouble());

var totalCase = 0;
for (int i = 0; i < 1000000; ++i)
    var p1 = GetExponential(1);
    var p2 = GetExponential(2);
    var p3 = GetExponential(3);

    if (p1 < p2 && p2 < p3)
Console.WriteLine(totalCase / 1000000.0);
  • $\begingroup$ Care to include the source code of your program? $\endgroup$ – Jose Arnaldo Bebita-Dris Oct 5 '15 at 17:15
  • $\begingroup$ Most likely GetExponential uses $1/\lambda$ (mean) as a parameter while you are passing $\lambda$ (rate) instead. $\endgroup$ – A.S. Oct 5 '15 at 18:28

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.