Expected value: proof of one property

I was asked to prove that the expected value of a continuous random variable $$\xi$$ having distrubition function F(x) and probability density function p(x) is equal to:

$$M\xi=\int_{-\infty}^{+\infty} x \cdot p(x)\,dx =\int_{-\infty}^{+\infty} \left(1 - F(x) \right) \,dx$$

(In this case it is better $$\textbf{not}$$ to use Lebesgue measure and Borel algebra! But I will look for the proofs with Lebesgue too.)

My attempt is to apply integration by parts, but I have problem.

$$M\xi =\int_{-\infty}^{+\infty} xp(x)\,dx = \left( x\cdot F_{\xi}(x) \right) \biggr|^{+\infty}_{-\infty} - \int_{-\infty}^{+\infty} F_{\xi}(x)\,dx =...$$

But It is incorrect because $$\left( x\cdot F_{\xi}(x) \right) \biggr|^{+\infty}_{-\infty} = x\biggr|^{+\infty}_{-\infty}$$. It doesn't converge. This is why I can't talk about equations, because it doesn't exist.

I have no idea how to do it correctly.

Sorry for broken grammar and broken terms, if it is unreadable.

• Hint: $$F(x) = \int\limits_{-\infty}^x p(y) \,dy$$and $$\int\limits_{-\infty}^{+\infty}p(x)\,dx=1$$ Apr 19, 2016 at 23:19
• @Fimpellizieri Oh my god, I am doing wrong things, thank a bunch, I will try to correct them!
– user324463
Apr 19, 2016 at 23:21
• Made a slight correction on the hint (integration variable $dy$ should not have been $x$ in $F(x)$). Glad to help! Apr 19, 2016 at 23:22

When $X$ is a strictly non-negative (absolutely )continuous random variable then: $$\int_0^\infty x~F_X'(x)\operatorname d x ~=~ \int_0^\infty 1-F_X(x)\operatorname d x$$

Hint: use $\displaystyle~s ~=~ \int_0^s \operatorname d t~$ , $~\displaystyle 1-F_X(t)~=~\int_t^\infty F'_X(s)\operatorname d s$ , and Fubini's theorem.

Also recall that the token of integration can be alpha-replaced. $\int\limits_a^b g(x)\operatorname d x = \int\limits_a^b g(s)\operatorname d s = \int\limits_a^b g(t)\operatorname d t$.

To begin:

\begin{align}\int_0^\infty s~F'_X(s)\operatorname d s ~=~& \int_0^\infty \int_0^s F'_X(s)\operatorname d t\operatorname d s \\ \ddots~& \end{align}

Hint 2: For random variables that may be negative $$\mathsf E(X) = \int_0^{+\infty} x~F'_X(x)\operatorname d x - \int_{-\infty}^0 (-x)~F'_X(x)\operatorname d x$$

• $\int_{0}^{+\infty} \left(1 - F(z) \right) \,dz =\\ =\int_{0}^{+\infty} \left( \int_{0}^{+\infty} p(y) \,dy - \int_{0}^{z} p(y) \,dy \right) \,dz = \int_{0}^{+\infty} \int_{0}^{+\infty} p(y) \,dy \,dz- \int_{0}^{+\infty} \int_{0}^{z} p(y) \,dy \,dz$
– user324463
Apr 20, 2016 at 0:18
• Then I can use Fubini only for the first integral... And still don't have the sense to change dy and dz in the first. Still I couldn't use it if I will sum integrals to make $\int_{0}^{+\infty} \left( \int_{z}^{+\infty} p(y) \,dy \right) \,dz$
– user324463
Apr 20, 2016 at 0:19
• @Dida it is: \begin{align}\int_0^\infty 1-F(z)\operatorname d z ~=~& \int_0^\infty \int_z^\infty f(y)\operatorname d y\operatorname d z \\[1ex] =~& \int_0^\infty \int_0^y f(y)\operatorname d z \operatorname d y\end{align} Apr 20, 2016 at 1:11