# Basic question related to cdf and pdf of random variables

If there are two independent random variables $X$ and $Y$ (there can have only non-negative values) with corresponding pdfs and cdfs as $f_X(x), f_Y(y)$, $F_X(x),F_Y(y)$ respectively. Then in what case the following formula is correct $$\int_0^{\infty}f_Y(y)F_X(y)dy=0$$ This question is raised from a previous question Compute the CDF of $\left[\log_2(1+X)-\log_2(1+Y)\right]^+$ . Thanks in advance.

You're asking when is $$E[F_X(Y) ] = 0$$

Since $F_X$ is a nonnegative function, we need that $F_X(Y) = 0$ almost surely, that is, that $Y <x^*$ almost surely, where $$x^* = \inf\{ x: F_X(x) > 0\}$$

Note that the independence assumption is irrelevant since $X$ appears only through its CDF $F_X$.

• Thank you for your answer. Can you comment on this problem math.stackexchange.com/questions/1908174/… . I have problem when I try to solve it using the CDF of the random variable however by using CCDF it is very easy. Many thanks in advance. – Frank Moses Sep 1 '16 at 7:25
• This answer is incorrect. Indeed the integral is $E(F_X(Y))$ hence it is zero if and only if $F_X(Y)=0$ almost surely, that is, $Y<x^*$ almost surely, where $x^*=\inf\{x\mid F_X(x)>0\}$, that is, $P(Y'\leqslant X')=1$ for every realization $X'$ of $X$ and $Y'$ of $Y$. This is asking strictly more than the property that $P(Y\leqslant X)=1$, for example, $X$ uniform on $(0,2)$ and $Y=X-1$ are such that $P(Y\leqslant X)=1$ but $E(F_X(Y))=\frac14$. (Note to the OP: Accepting answers on the spot has the undesired consequence that less users view the page and can check it.) – Did Sep 1 '16 at 15:57
• @Did Oh, of course, you're right. Thank you for checking this! I had thought of what you said and then concluded that what I wrote was the same, which clearly it isn't :-) – Ant Sep 1 '16 at 19:35
• Indeed, and the condition [$Y<x^*$ almost surely] is necessary, not only [$Y\leqslant x^*$ almost surely] as you wrote. – Did Sep 1 '16 at 20:08