Skip to main content
1 of 2
Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229

For any random variable (r.v.) $X$, you can write $X=X_+-X_-$, where $X_+:=\max(0,X)$ and $X_-:=\max(0,-X)$. Then you can write $$X_+=\int_0^\infty I\{X>x\}dx,\quad X_-=\int_0^\infty I\{-X>x\}dx,$$ and hence $$X=\int_0^\infty (I\{X>x\}-I\{-X>x\})dx,$$ where $I\{\cdot\}$ is the indicator function.

Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229