Show that given $X$ is an integrable random variable with CDF $F$, then $$E(X)=\int_0^{\infty} (1-F(t)) dt-\int_{-\infty}^0 F(t) dt.$$
I know we have to use Lebesgue-Stieltjes integral here and I don't know how. Here is what I did: By Carathéodory's extension theorem, there is a unique Borel measure $\mu$ which agrees with $F$ on all intervals. $$E(X)=\int_{-\infty}^{\infty} tdF(t)=\int_{-\infty}^{\infty} td\mu(t)=\int_{-\infty}^{0} td\mu(t)+\int_{0}^{\infty} td\mu(t).$$ I think next we are going to use $\mu(a,b]=F(b)-F(a)$ but I am not sure how.
Thanks ahead of time!:)
You have this.
$$\int_0^\infty t\,d\mu(t) = \int_0^\infty \int_0^t ds\,d\mu(t) = \int_0^\infty \int_s^\infty d\mu(t)\, ds = \int_0^\infty (1 - F(s))\, ds. $$
Can you deal similarly with the other half?