# Proving formula for math expectation

In a book I met a formula for math. expectation of a random variable $$\xi$$ with distribution function $$F(x)$$:

$$M{\xi}=-\int_{-\infty}^{0}F(x)dx+\int_{0}^{\infty}(1-F(x))dx$$

I wonder how do I prove it?

My attempt follows:

$$M\xi\equiv\int_{-\infty}^{\infty}xdF(x)=\lim_{a\to-\infty}^{b\to\infty}\int_{a}^{b}xdF(x)$$

Integrating in parts, I obtain

$$\int_{a}^{b}xdF(x)=(xF(x))\rvert_{a}^{b}-\int_{a}^{b}F(x)dx=bF(b)-aF(a)-\int_{a}^{0}F(x)dx-\int_{0}^{b}F(x)dx=bF(b)-aF(a)-\int_{a}^{0}F(x)dx+\int_{0}^{b}(1-F(x))dx-b=[-\int_{a}^{0}F(x)dx+\int_{0}^{b}(1-F(x))dx]+b(F(b)-1)-aF(a).$$

Passing to the limit, I get

$$M\xi=-\int_{-\infty}^{0}F(x)dx+\int_{0}^{\infty}(1-F(x))dx-\lim_{a\to-\infty}aF(a)+\lim_{b\to\infty}b(F(b)-1)$$

So in order to prove the initial statement, I need to prove that for arbitrary distribution function $$F$$

$$lim_{a\to-\infty}aF(a)=0$$

and

$$lim_{b\to\infty}b(F(b)-1)=0$$

however I have no idea how to prove it and moreover I doubt that it's true.

• I guess the last 2 assumptions should be true if the expected value is finite. – kludg Mar 24 at 17:34

If the expectation is finite then both limits $$\lim\limits_{a\to-\infty}\int_{-\infty}^a x\,dF(x) \text{ and } \lim\limits_{b\to\infty}\int_b^{\infty} x\,dF(x)$$ are zero. Then $$0=\lim\limits_{a\to-\infty}\int_{-\infty}^a x\,dF(x) \leq \lim\limits_{a\to-\infty}a \int_{-\infty}^a dF(x) =\lim\limits_{a\to-\infty} aF(a)\leq 0.$$ And $$0=\lim\limits_{b\to\infty}\int_b^{\infty} x\,dF(x) \geq \lim\limits_{b\to\infty}b \int_b^{\infty} dF(x) =\lim\limits_{b\to\infty} b(1-F(b))\geq 0.$$