1

Ok, according to some notes I have, the following is true for a random variable $X$ that can only take on positive values, i.e $P(X<0=0)$

$\int_0^{\infty}(1-F_X(x))dx=\int_0^{\infty}P(X>x)dx$

$=\int_0^{\infty}\int_x^{\infty}f_X(y)dydx$

$=\int_0^{\infty}\int_0^{y}dxf_X(y)dy$

$=\int_0^{\infty}yf_X(y)dy=E(X)$

I'm not seeing the steps here clearly. The first line is obvious and the second makes sense to me, as we are using the fact that the probability of a random variable being greater than a given value is just the density evaluated from that value to infinity.

Where I'm lost is why: $=\int_x^{\infty}f_X(y)dy=\int_0^{y}f_X(y)dy$

Also, doesn't the last line equal E(Y) and not E(X)?

How would we extend this to the discrete case, where the pmf is defined only for values of X in the non-negative integers?

Thank you

Justin
  • 1,664
  • 2
  • 17
  • 36
  • See the answers to [this question](http://math.stackexchange.com/q/64186/15941). The proof for the discrete case is, in my opinion, easier for beginners to understand. – Dilip Sarwate Sep 07 '13 at 21:00
  • It's not $$ \int_x^\infty f_X(y)\,dy = \int_0^y f_X(y)\,dy.$$ The order of integration is changed (allowed per Fubini's theorem), you have $$\int_0^\infty \left(\int_x^\infty f_X(y)\,dy \right)\, dx = \int_0^\infty \left(\int_0^ydx \right)\,f_X(y) dy.$$ – Daniel Fischer Sep 07 '13 at 21:03
  • 1
    You are integrating a function of two variables over the region $\{(x,y) \colon x \leq y < \infty, 0 \leq x < \leq \infty\}$ by letting $y$ vary from a fixed $x$ all the way to $\infty$ (inner integral) and then letting $x$ vary from $0$ to $\infty$ (outer integral). An alternative way is to fix $y$ and so $x$ varies from $0$ to $y$ (inner integral) and then let $y$ vary from $0$ to $\infty$ (outer integral). Since the _integrand_ is not a function of $x$ at all, the inner integral just gives $y$. – Dilip Sarwate Sep 07 '13 at 21:08
  • @DilipSarwate, thank you for the explanation. It does make sense now. – Justin Sep 07 '13 at 22:34
  • Even though there's already a [good link](https://math.stackexchange.com/questions/64186) provided by Dilip Sarwate, I’d still like to make the links to the current choice of target posts for [continuous](https://math.stackexchange.com/questions/172841) and [discrete](https://math.stackexchange.com/questions/843845). Please see the meta post for [(abstract) duplicates](https://math.meta.stackexchange.com/a/29382/356647). – Lee David Chung Lin Mar 10 '19 at 21:08

1 Answers1

1

The region of integration for the double integral is $x,y \geq 0$ and $y \geq x$. If you express this integral by first integrating with respect to $y$, then the region of integration for $y$ is $[x, \infty)$. However if you exchange the order of integration and first integrate with respect to $x$, then the region of integration for $x$ is $[0,y]$. The reason why you get $E(X)$ and not something like $E(Y)$ is that $y$ is just a dummy variable of integration, whereas $X$ is the actual random variable that defines $f_X$.

user2566092
  • 25,905
  • 30
  • 63