To be specific, suppose $X_1$ and $X_2$ are independent exponential random variables with parameters $\lambda_1$ and $\lambda_2$; what is $P(X_1 = X_2)$?
According to section 5.2.3 of the book "Introduction to Probability Models" by Sheldon M.Ross (the 10th edition), $P(X_1 < X_2) = \frac{\lambda_1}{\lambda_1 + \lambda_2}$. Symmetrically, $P(X_1 > X_2) = \frac{\lambda_2}{\lambda_1 + \lambda_2}$.
$$P(X_1 < X_2) = \int_{0}^{\infty} P(X_1 < X_2 \mid X_1 = x) \lambda_1 e^{-\lambda_1 x}dx \\ = \int_{0}^{\infty} P(x < X_2) \lambda_1 e^{-\lambda_1 x}dx \\ = \int_{0}^{\infty} e^{-\lambda_2 x} \lambda_1 e^{-\lambda_1 x}dx \\ = \int_{0}^{\infty} \lambda_1 e^{-(\lambda_1 + \lambda_2) x}dx = \frac{\lambda_1}{\lambda_1 + \lambda_2}.$$
My Problems:
- Can I now conclude that $P(X_1 = X_2) = 1 - P(X_1 < X_2) - P(X_1 > X_2) = 0$?
- I am confused about the argument because of the fact that the probability that a continuous random variable will take on any particular value is zero. Is it reasonable to calculate the probability that the two variables simultaneously take on the same particular value?
- If so, how to calculate $P(X_1 = X_2)$ directly, in the same way used in the calculation of $P(X_1 < X_2)$? Furthermore, can this calculation be applied to all continuous random variables?
It can be confusing to think of an event such as $\{X_1=X_2\}$, since both sides are random; perhaps it will be easier to think about it a little differently.
Instead of considering the event that $X_1=X_2$, let's consider the (clearly equivalent) event that $X_1-X_2=0$. Note that $X_1-X_2$ is just another random variable -- and, in particular, since $X_1$ and $X_2$ both have densities, and are independent, it is not hard to show that $X_1-X_2$ also has a density.
We can compute that density, $f_{X_1-X_2}$, explicitly by considering cases:
If $x\geq0$, then $$ f_{X_1-X_2}(x)=\int_x^{\infty}f_{X_1}(t)\cdot f_{X_2}(t-x)\,dt=\frac{\lambda_1\lambda_2e^{-\lambda_1x}}{\lambda_1+\lambda_2}, $$ while for $x<0$ we have $$ f_{X_1-X_2}(x)=\int_{-\infty}^{x}f_{X_1}(x-t)\cdot f_{X_2}(-t)\,dt=\frac{\lambda_1\lambda_2e^{\lambda_2x}}{\lambda_1+\lambda_2}. $$
where $f_{X_1}$ and $f_{X_2}$ are the densities for $X_1$ and $X_2$, respectively.
But, since $X_1-X_2$ has a density, it is a continuous random variable -- and so the probability that it takes any particular value is $0$.