2

Let $X$ be a real variable that has expectation (we don't know if it's discrete or continuous). Let F be the CDF of X. I need to prove the following equality: $$E(X)=\int_0^{+\infty}(1-F(x))dx -\int_{-\infty}^0F(x)dx.$$

I have used that $E(X)=E(X^+)-E(X-)$, where $X^{+}=\max(0,X)$ and $X^{-}=\max(0,-X)$.

I have already proved that $$E(X^+)=\int_{0}^\infty (1-F(x)) dx,$$ so what's left to be proved is $$E(X^-)=-\int_{-\infty}^0 F(x)dx. $$


My attempt:

As $X^-\geq0$, it is known that $E(X^-)=\int_{0}^\infty (1-F_{X^-}(x))dx$.

I have proved that $F_{X^{-}}(x)=1-F(-x^{-})=1-P(X<-x)$ for $x \geq0$ and $F_{X^{-}}(x)=0$ for $x<0$.

So we have that $$E(X^-)=\int_{0}^\infty (1-F_{X^-}(x))dx=\int_{0}^\infty F(-x^{-})dx.$$

How can I prove that $$\int_{0}^\infty F(-x)dx=\int_{0}^\infty F(-x^{-})dx \left(\int_{0}^\infty P(X\leq-x)dx=\int_{0}^\infty P(X<-x)dx \right)$$ is true?

(I don't know how to do it because $X$ can be discrete or continuous.)

a12456
  • 159

1 Answers1

2

The answers in the linked question uses the Stieltjes integral wrt $dF(x)$ which I want to avoid and stick to Lebesgue Integral and Properties of expectation. That is why I am posting this as an alternative way. What you really need is two steps:-

Lemma:- For a non-negative random variable $X$ . We have $$\Bbb{E}[X]=\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt$$.

This is due to Tonelli's Theorem

$$\Bbb{E}[X]=\Bbb{E}[\int_{0}^{\infty}\,\mathbf{1}_{[0,X(\omega)]}dt]=\Bbb{E}[\int_{0}^{\infty}(\mathbf{1}_{\{0\leq t\leq X(\omega)\}})\,dt]$$

$$=\int_{0}^{\infty}\Bbb{E}[\mathbf{1}_{\{0\leq t\leq X(\omega)\}}]\,dt = \int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt$$.

This tells you that :-

$$\Bbb{E}[X^{+}]=\int_{0}^{\infty}\Bbb{P}(X^{+}\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt=\int_{0}^{\infty}(1-F(t))\,dt$$

and $$\Bbb{E}[X^{-}]=\int_{0}^{\infty}\Bbb{P}(X^{-}\geq t)\,dt = \int_{0}^{\infty}\Bbb{P}(-X\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X\leq - t)\,dt=\int_{0}^{\infty}F(-t)\,dt$$ . Change variables to $t=-z$ to get

$$\Bbb{E}[X^{-}]=\int_{-\infty}^{0} F(z)\,dz$$

You have the expressions for $\Bbb{E}[X^{+}]$ and $\Bbb{E}[X^{-}]$ and as $X=X^{+}-X^{-}$, you have by Linearity of Expectation

$$\Bbb{E}[X]=\int_{0}^{\infty}(1-F(t))\,dt-\int_{-\infty}^{0} F(t)\,dt$$

EDIT: The op seems to be confused about how we can say $\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt= \int_{0}^{\infty}\Bbb{P}(X> t)\,dt$. To clairfy we claim that $\displaystyle\int_{\Bbb{R}}\Bbb{P}(X=t)\,dt = 0$. Which in particular implies that $\displaystyle\int_{0}^{\infty}\Bbb{P}(X=t)\,dt=0$ as $\Bbb{P}(X=t)$ is a non-negative function of $t$. This would show that $\displaystyle\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X> t)\,dt$ and $\displaystyle\int_{0}^{\infty}\Bbb{P}(X\leq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X< t)\,dt.\\\\$

We have $$\int_{\Bbb{R}}\Bbb{P}(X=t)\,dt=\int_{\Bbb{R}}\Bbb{E}(\mathbf{1}_{X=t})\,dt=\Bbb{E}(\int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt)$$ . The above is possible again thanks to Tonelli.

Now when we write $ \int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt$ we mean this as a function of $t$ for fixed $\omega\in\Omega$. (Recall here how we evaluate double integrals by solving iterated integrals).

This is the same as $\int_{\Bbb{R}}\mathbf{1}_{\{X(\omega)\}}dt$ which is the integral of the indicator of the singleton set $\{X(\omega)\}$. But this is just $\lambda(\{X(\omega)\})=0$ as the Lebesgue Measure of a singleton is $0$.

This gives us $$\Bbb{E}(\int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt)=\Bbb{E}(0)=0$$

  • What I know is that for $X\geq0$, $E(X)=\int_0^{+\infty}(1-F(x))dx=\int_0^{+\infty}P(X>x)dx$. How can I prove that $\int_0^{+\infty}P(X>x)dx=\int_0^{+\infty}P(X\geq x)dx$? This is, in fact, what I don't understand. @Mr.GandalfSauron – a12456 May 18 '22 at 12:28
  • The integral $\int_{\Bbb{R}}P(X=x)dx=0$ . This is because $\int_{\Bbb{R}}P(X=x),dx=\int_{\Bbb{R}}E(\mathbf{1}{X(\omega)=x})=E(\int{\Bbb{R}}\mathbf{1}_{X(\omega)=x}),dx=E[\lambda( x: x=X(\omega))] = E(0) =0$ . Here $\lambda$ denotes the Lebesgue measure on $\Bbb{R}$. This is because for any fixed $\omega\in \Omega$ , $X(\omega)$ is just a fixed real number. Note that you are integrating the function $P(X=x)$ and not the random variable $X$ over the set in which it is $x$. Intuitively the integral over a point is $0$. – Mr.Gandalf Sauron May 18 '22 at 13:15
  • I don't understand the way you integrate $\int_{\mathbb{R}}1_{X=x} dx$. $1_{X=x}$ is a function of $\omega \in \Omega$, so how can I interpret its integral respect to $x$? – a12456 May 18 '22 at 14:44
  • When we are viewing $E(\mathbf{1}{X=x})$ then we are fixing $x$ and viewing it as a function of $\omega$. When we are calculating $\int\Bbb{R}\mathbf{1}_{X=x}$ we are fixing omega and viewing it as a function of $x$(. Expectation is just integral wrt Probability measure. We are applying Fubini's Theorem here. Recall how you evaluate double integrals . You try to do them by solving the iterated integrals. So when integrating wrt $dy$ you treat $x$ as a constant. We are essentially doing the same. Except here both the notations for the function is the same. – Mr.Gandalf Sauron May 18 '22 at 15:32
  • When we say $\int_{\Bbb{R}}\mathbf{1}{X=x}$ , then the function $\mathbf{1}{X=x}$ is just the indicator of the singleton ${X(\omega)}\subset\Bbb{R}$ for a fixed $\omega\in\Omega$. i.e . we can even write this as $\mathbf{1}_{{X(\omega)}}$. So it's integral wrt Lebesgue Measure is just the measure of the singleton set which is $0$ under the Lebesgue Measure on $\Bbb{R}$. – Mr.Gandalf Sauron May 18 '22 at 15:37
  • @a12456 I have edited and included the above details . – Mr.Gandalf Sauron May 18 '22 at 15:50
  • I think I have understood your procedure. Is it because the following is true? $E\left(\int_0^{\infty}(1_{X=t})dt\right)=E\left((\int_0^{\infty}\int_{{\omega\in\Omega: X(\omega)=t}}1d\omega dt\right)=E\left((\int_{\omega\in\Omega}\int_{{t\in[0,+\infty): X(\omega)=t}}1dtd\omega\right)$ – a12456 May 22 '22 at 16:00
  • 1
    @a12456 Expectation is by itself an integral. It's the integral wrt Probability measure. Integral of the indicator of a set gives the measure of that set. So $\int_{0}^{\infty}\mathbf{1}{X=t},dt = \lambda({t\in[0,\infty): X(\omega)=t})= 0 $ . So $E(0)=0$. For example when we write $\int{0}^{1}\int_{0}^{1}xy,dx dy = \int_{0}^{1}\frac{y}{2},dy$ we mean that for each fixed $y$,the integral of the function over the set ${y}\times [0,1]$ is equal to $\frac{y}{2}$ and then we integrate this result wrt to $y$ . This is precisely Fubini's theorem that let's you evaluate in an iterated manner – Mr.Gandalf Sauron May 22 '22 at 16:11
  • 1
    @a12456 You are involving an extra integral which is not there. $E(\mathbf{1}{{\omega:X(\omega)=t}})=\int{\Omega}\mathbf{1}_{{\omega:X(\omega)=t}},d\Bbb{P}$ – Mr.Gandalf Sauron May 22 '22 at 16:13
  • 1
    Thanks. I understand it now. – a12456 May 22 '22 at 16:17
  • Glad I could help!. – Mr.Gandalf Sauron May 22 '22 at 16:17