Given two exponentially distributed random variables $ X_1 $ and $X_2$ (assuming rates $\lambda_1$ and $\lambda_2$ respectively), determine the probability that one is smaller than the other.

So basically, I need to find $P(X_1<X_2)$ which is equivalent to $P(X_2 = x)$ AND $P(X_1 < X_2)$ which can be written as $P(X_1 < X_2 | X_2 = x)\times P(X_2 = x)$.

In reality $P(X_1 < X_2 | X_2 = x) = 1 - e^{-\lambda_1x} $ while $P(X_2 = x) = \lambda_2e^{-\lambda_2x}$.

My professor went a step further and said that:

$P(X_1 < X_2) = \int_0^{\infty}P(X_1 < X_2 | X_2 = x)P(X_2 = x)dx = \int_0^{\infty}(1 - e^{-\lambda_1x})\lambda_2e^{-\lambda_2x}dx $

Questions:

  1. Is writing $P(X_1 < X_2 | X_2 = x)P(X_2 = x)$ instead of $P(X_1 < X_2)P(X_2 = x)$ really necessary when we're assuming that the random variables are independent?
  2. More importantly, why do we have to integrate the product at all? and why from 0 to $\infty$?

Thanks for your help!

  • 3
    I sincerely hope that your professor did not write monstrosities such as $P(X_2=x)=\lambda_2e^{-\lambda_2x}$. – Did Feb 24 '14 at 17:01
  • @Did such things are, alas, all too common: math.stackexchange.com/questions/675252/… – gt6989b Feb 24 '14 at 17:09
  • @gt6989b Aaaargh... $\langle$ Faints $\rangle$. – Did Feb 24 '14 at 18:50
up vote 2 down vote accepted

Since your question (1) does not rely on any particular distribution, to make the notation valid, let's assume both $X_1, X_2$ are discrete. Now, both need to be tied to the same $x$ somehow, so you can write $$ \mathbb{P}[X_1<x] \cdot \mathbb{P}[X_2=x] $$ instead and it will work ok. Although the original form clearly shows where you are coming from, whereas in this second one, that requires one skipped step...

For the second one, he really should integrate over all possible values of $x$, but since $X_2$ is exponential, $\mathbb{P}[X_2 < 0] = 0$ so you are safe restricting to the non-negatives.

EDIT To address the question in the comments, why is the integral needed. Basically, if the variables are discrete, $\mathbb{P}[X_1 < X_2]$ when $X_2 = x$ and $X_1 < x$ for any value of $x$, so you want to sum all of them. In other words, $$ \mathbb{P}[X_1 < X_2] = \sum_{x = -\infty}^\infty \mathbb{P}[X_1 < x] \mathbb{P}[X_2 = x] = \sum_{x = -\infty}^\infty F_1(x) f_2(x), $$ which for continuous random variables becomes $$ \int_{x = -\infty}^\infty F_1(x) f_2(x) dx $$

  • perfect. i understand what you're saying however I'm still not entirely certain why we need the integral. can you explain it in layman's terms please? – user131191 Feb 24 '14 at 17:41
  • @user131191 please see the edit – gt6989b Feb 24 '14 at 18:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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