I was looking at a solution of a probability exercise and the author of the solution uses the formula $$P(Y \le X)=\int_0^{\infty} P(Y \le X | X=x)f_X(x)dx$$ where $X$, $Y$ are the random variables $f_X$ is the density function of the random variable $X$. From where does this result come from?
2026-03-27 23:37:47.1774654667
On
$P(Y \le X)=\int_0^{\infty} P(Y \le X | X=x)f_X(x)dx$
119 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
conditional probability is special case of conditional expectation(definition of conditional probability is based on conditional expectation ).
define:
$A=\{\omega \in \Omega| Y(\omega) \leq X(\omega)\}$
$p(Y\leq X)= p(A)=E(I_A)=E(E(I_A|X))$
$=E(g(X))$ (by definition of conditional expectation ,$E(I_A|X)$ is a function of $X$)
$=\int g(x) f_X(x) dx=\int E(I_A|X=x) f_X(x) dx=\int p(A|X=x) f_X(x) dx=\int p(Y \leq X|X=x) f_X(x) dx=\int p(Y \leq x|X=x) f_X(x) dx$
so you pass the problem with, $p(X=x)=0$ in $p(Y\leq X |X=x)$. since the defination of conditional expectation is based on projection property and not based on $p(A|B)=\frac{p(A \cap B)}{p(B)}$
This is conditional probability. Remember that $$ \mathbb{P}[A|B] = \frac{\mathbb{P}[A\cap B]}{\mathbb{P}[B]} \iff \mathbb{P}[A\cap B] = \mathbb{P}[A|B]\mathbb{P}[B] $$ but if $X$ is continuous, $\mathbb{P}[X=x]=0$, the correct analog being $$ \lim_{h \to 0^+} \mathbb{P}[x-h\le X \le x+h] = f_X(x). $$