1

I am being asked to prove the following: $$E[X] = \int_0^{\infty}xf_x(x)dx = \int_0^{\infty}(1-F_x(x))dx$$

for a distribution defined on $x\ge0$. Although I can find several related questions on math stack exchange, they all involve concepts Riemann-Stieltjes integrals which were never discussed in this course; there must be an easier way to solve the problem. Therefore, I attempted to solve the problem using simple calculus and came up with this:

$$E[X] = \int_0^{\infty}xf_x(x)dx =[x\int f_x(x)dx-\int\int f_x(x)dxdx]_{x=0}^{x=\infty} = [xF_x(x)-\int F_x(x)dx]_{x=0}^{x=\infty} = \lim_{x\to\infty}xF_x(x) - \lim_{x\to0}xF_x(x) - \int_0^{\infty}F_x(x)dx = \lim_{x\to\infty}xF_x(x) -\int_0^{\infty}F_x(x)dx$$

So if the above statement is true, then doesn't that imply that we are trying to show that because $\lim_{x\to\infty}(F_x(x))=1$ then $\int_0^{\infty}1dx = \lim_{x\to\infty}(xF_x(x))$? Is it simply enough to state that $$\int_0^{\infty}1dx = \lim_{x\to\infty}x - \lim_{x\to0}x = \lim_{x\to\infty}x = (\lim_{x\to\infty}x)(\lim_{x\to\infty}F_x(x)) = \lim_{x\to\infty}(xF_x(x))$$

I am concerned because it feels like I am equating two clearly infinite terms which sounds problematic in a formal proof. Is there another way to do this?

StubbornAtom
  • 17,052
  • 1
    Neither $\int_0^\infty 1$ nor $\lim_{x\to\infty} x F_X(x)$ are defined for a CDF $F_X$ (or they are both $\infty$ if you want). You need to use Fubini, as done by me in the german Wikipedia – Maximilian Janisch Mar 22 '20 at 17:18
  • I guess what I'm asking is if that is a fundamental issue or just a notation issue? At what stage do I go from making a true statement to a false one? Am I not allowed to break up an integral which converges into two integrals that don't and then convert them back into one which does through integration by parts? Because it seems like there may be many cases where the $uv$ term and $-\int udv$ terms in integration by parts will not converge by themselves, depending on the bounds of your definite integral, but the sum itself will. – Kaz Takari Mar 22 '20 at 17:48
  • It is not a notation issue. You are never allowed to break up a converging integral into two divergent ones. That is like trying to solve the $P=NP$ problem by saying "well, it is true if $N=1$". Quite simply, when you are writing down a difference of two divergent integrals you are writing down something that has no meaning (just like $\infty-\infty$ has no meaning) and thus is completely invalid in a formal proof w – Maximilian Janisch Mar 22 '20 at 18:01
  • By the way I worked hard on finding this example of an obviously wrong result arising from that strategy: (wrong steps marked in red) $$1=\int_1^\infty\frac1{x^2},\mathrm dx\color{red}=\int_1^\infty \frac{x^2+1}{x^2},\mathrm dx - \int_1^\infty 1,\mathrm dx=\int_1^\infty \frac{x^2+1}{x^2},\mathrm dx -\int_2^\infty 1 ,\mathrm dy\color{red}=\int_1^2 \frac{x^2+1}{x^2},\mathrm dx +\int_2^\infty \frac{1}{x^2}=\frac32+\frac12=2$$ (I used the substitution $y=x-1$) – Maximilian Janisch Mar 22 '20 at 18:12
  • Then could you post a summary in English of the Fubini strategy? I see that we could end up with a double integral through integration by parts which would make the Fubini theorem potentially applicable, but I don't see how to do so without using integration by parts which necessarily splits the integral into two divergent terms. – Kaz Takari Mar 22 '20 at 18:14
  • For any $p>0$ and $X\in L^p(\Omega,P)$ we have $$\operatorname E(X^p)=\int_\Omega X(\omega)^p,\mathrm dP(\omega) = \int_\Omega\int_0^\infty p x^{p-1} [x\le X(\omega)],\mathrm dx,\mathrm dP(\omega) = \int_0^\infty\int_\Omega px^{p-1}[x\le X(\omega)] ,\mathrm dP(\omega),\mathrm dx=p\int_0^\infty x^{p-1}P\big({\omega\in\Omega\mid x\le X(\omega)\big),\mathrm dx$$ Your case is $p=1$ then the right-hand side reduces to $$\int_0^\infty P(X>x),\mathrm dx=\int_0^\infty 1-F_X(x),\mathrm dx$$ – Maximilian Janisch Mar 22 '20 at 18:16
  • In particular, this approach works also if $X$ has no density. However, you should note that I am thus using the measure theoretic definition of the expected value – Maximilian Janisch Mar 22 '20 at 18:18
  • I'm sorry, I'm still quite confused, particularly with regards to your counterexample. One step not marked in red equates $\int_1^{\infty}1dx$ and $\int_2^{\infty}1dy$ which seems wrong all by itself, since it is exactly equating two limits each of which individually equate to infinity after evaluation. In my example, I never have to actually evaluate any limit which results in infinity, and then substitute that limit for another limit which also evaluates for infinity; there are simply limits which, if they were to be evaluated, would evaluate to infinity. – Kaz Takari Mar 22 '20 at 18:32
  • In other words, isn't it wrong to say $\lim_{x\to\infty}x = \lim_{x\to\infty}x^2$, but not that, say, $\lim_{x\to\infty}(x/x^2) = (\lim_{x\to\infty}x)/ (\lim_{x\to\infty}x^2)$ – Kaz Takari Mar 22 '20 at 18:35
  • This and the countless linked posts ought to have what you are looking for. You are assuming $X$ is absolutely continuous. – StubbornAtom Mar 22 '20 at 19:51
  • @KazTakari The step not marked in red is using the substitution $y=x-1$. It seems to me that you are currently stringing words together to sentences that don't have meaning. For example, what does "I never have to actually evaluate any limit which results in infinity" mean? A limit is independent of the name with which you write it down i.e. it is independent of "evaluation". So it seems to me the sentence has no meaning. Similarly, I don't know what you mean by "there are simply limits which, if they were to be evaluated, would evaluate to infinity". How can a limit change by "evaluation" ? – Maximilian Janisch Mar 23 '20 at 12:04
  • And yes, it is completely meaningless to write down $\frac{\lim_{x\to\infty} x}{\lim_{x\to\infty} x^2}$ just like $\frac{\infty}{\infty}$ has no definition (unless you give it one). You can only divide (non-zero) numbers by each other, not "infinity/infinity". So: Writing $$\lim_{x\to\infty}\frac{x}{x^2}$$ is completely fine but writing $$\frac{\lim_{x\to\infty} x}{\lim_{x\to\infty} x^2}$$ is meaningless – Maximilian Janisch Mar 23 '20 at 12:10

1 Answers1

1

Let $S(x)=1-F(x)$. Integration by parts yields $$ EX=\int_0^\infty xf_{X}(x)\, dx=-xS(x)\big|_{0}^{\infty}+\int_0^\infty S(x)\, dx=\int_{0}^\infty S(x)\, dx $$ since $\frac{d}{dx}(-S(x))=f(x)$ and $\lim_{x\to \infty} xP(X>x)=0$ (if $EX<\infty$ can be justified using the dominated convergence theorem).