# How to show $\int_{-\infty}^{\infty}f_{X}\left(x\right)\left(P\left(X<x\right)-P\left(X>x\right)\right)dx =0$

For a continuous random variable X , intuition tells me that $$\int_{-\infty}^{\infty}f_{X}\left(x\right)P\left(X<x\right)dx=\frac{1}{2}$$ and more weakly that $$\int_{-\infty}^{\infty}f_{X}\left(x\right)P\left(X<x\right)dx=\int_{-\infty}^{\infty}f_{X}\left(x\right)P\left(X>x\right)dx$$ However, I can't figure out a way to rigorously justify this. Using the fact that $$f_{X}\left(x\right)dx=dF_{X}\left(x\right)$$ works, but I don't want to use that line of thinking because it doesn't match the intuitive reason I think this is true. Any ideas on how to manipulate the integrals to find the equalities?

• The result is immediate upon substituting $y=P(X\lt x)$, whence $dy=f_X(x)dx$. You will then need to evaluate $\int_0^1 y dy$.
– whuber
May 20, 2016 at 1:46
• Your suggestion is the strategy I mentioned I did not want to use, as it does not correspond to intuition. It works, of course. What I'm curious about is whether there is a way to manipulate the right side of the equation to get the left side. I'm think about things like switching around the integration limits, multiplying quantities by -1, etc. My intuition gave me the answers because of informal reasoning based on the shapes of the functions. May 20, 2016 at 2:36
• It looks like we have different intuitions. Regardless, the substitution method is rigorous.
– whuber
May 20, 2016 at 3:01
• It looks like my wording was unclear. I had a rigorous way to get the answer (your way), but it doesn't correspond to my intuition. It's just something I could mathematically justify. The first equation I wrote seemed intuitively true because in it, we consider the probability of falling below a cutoff, for every cutoff, weighted by how likely the cutoff is. May 20, 2016 at 3:17
• It would be a useful intuition to develop: this substitution is known as the Probability integral transform. It reduces many complex questions to ones about uniform distributions. For instance, it is the point of departure for the study of copulas.
– whuber
May 20, 2016 at 12:31

Let $F(x)=P(X\leq x)=P(X<x)$ since $X$ is continuous.
Let $I:=\int_{-\infty}^\infty f(x)F(x)dx.$ Then integration by parts gives:
$$I=F(x)^2|_{-\infty}^\infty-I=1-0-I=1-I.$$
Rearranging for $I$ gives your result.
• @Biomath: You're ultimately calculating $E[F(X)]$, which doesn't really have that much intuition. Notice that in the above integration, the $1/2$ is more of an artifact of probability measures having area 1. Where the area 2, the answer would be 1. May 20, 2016 at 3:10
• I didn't even notice I was calculating $E[F(X)]$. That helps a little. May 20, 2016 at 3:29