First off, I am aware of this answer: Show that $E(X)=\int_{0}^{\infty}P(X\ge x)dx$ for non-negative random variable $X$, but I want to know what is missing in my approach. I would calculate as follows $$E(X)=\int_{-\infty}^{\infty}xP(dx)=\int_{-\infty}^{\infty}\int_{0}^{x}dyP(dx)$$

where I use Fubini with $$0<y<x \text{ and}-\infty<x<\infty$$ giving $$0<y<\infty\text{ and } y<x<\infty$$ hence the above expression becomes $$\int_0^{\infty}\int_y^{\infty}P(dx)dy=\int_0^{\infty}P(X>y)dy$$

Now this is the right solution but nowhere did I (explicitly) use that $X$ is non-negative. Could someone point out what I am missing.

  • What is your definition of $\int_0^xdy$ if $x<0$??? It arises in the RHS of your expression for $\mathbb EX$. – drhab Feb 12 '17 at 15:33
  • @drhab Still $x$ I suppose. E.g. for $x=-2$: $\int_0^{-2}dy = -\int_{-2}^0dy=-[y]^0_{-2}=-(0+2)=-2$. – azureai Feb 12 '17 at 15:41
  • 1
    In the second line you are saying to use Fubini with $0<y<x$, but no such $y$ exists if $x<0$. – drhab Feb 12 '17 at 15:47
up vote 1 down vote accepted

Since you didn't assume $E|X|<\infty$ you need non-negativity to switch the order of integration. The version of Fubini for non-negative r.v. is sometimes called Tonelli's theorem.

Check out wikipedia's entry on Fubini's theorem and its counterexamples.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.