0

Let $X$ be a real-valued random variable with the cdf $F_X$. I need to show that $$ E(X)=\int_0^\infty (1-F_X(x))dx-\int_{-\infty}^0 F_X(x)dx $$

1 Answers1

2

Hint:

You can write $X=X^+-X^-$ where $X^+=\max(0,X)$ and $X^-=\max(0,-X)$.

Then $X^+$ and $X^-$ are both nonnegative random variables and it is well known that for any nonnegative random variable $Y$ we have $\mathbb EY=\int 1-F_Y(y)dy$.

For a proof of that see here for instance.

drhab
  • 151,093