# Proof of $P(X<Y)$

Assume that $$X$$ is $$Exp(\lambda)$$ distributed and $$Y$$ is $$Exp(\mu)$$, and they are independent. I want to know how I can calculate $$P(X. I don't understand why

$$P(X < Y)=\int_{-\infty}^\infty P(X

where $$f_X$$ is the density of $$X$$.

• This is the law of total probability. Essentially, what you are doing is breaking things down by cases of $X$: For all possible values of $X$, what is the joint probability that $X$ holds that value and that $Y < X$? The only wrinkle is that for continuous distributions of $X$, we can't just do ordinary addition, like we would for discrete distributions; we have to integrate. But otherwise, it's the same basic idea. – Brian Tung Mar 12 at 17:26
• Are you familiar with conditional expectation? – rubikscube09 Mar 12 at 17:46
• I know the law of total probability and it helps to understand, but i don't think it's enough to proof it. And yes i learned something conditional expectation. – Daniel Banov Mar 12 at 17:48
• You can prove that $$P(X < Y)=\int_{0}^\infty \int_{0}^y f_{X,Y}(x,y) dx dy$$ and use that X,Y are independent and so $f_{X,Y}(x,y)=f_X(x)f_Y(y)$, but the easiest way is the law of total probability. – papasmurfete Mar 12 at 20:53

Assuming $$X$$ and $$Y$$ are independent with pdfs $$f_X(x)$$ and $$f_Y(y)$$ we have \begin{align} P\{X where $$F_X(x)$$ is the CDF of $$X$$.