1

I couldn't find an answer to this, so I thought I would share the proof I came up with here. It turns out, this formula holds for all continuous random variables $X$ where $X \geq 0$.

  • 1
    This holds for all random variables $X\geq0$ that have a finite first moment – Mittens Apr 06 '22 at 20:36
  • @OliverDiaz I know. I asked it this way because this is what I searched for initially and thought people may eventually have the same question. – Davis Parks Apr 07 '22 at 21:16
  • @DavidParks: this question (the general one that is) has been addressed many times at MSE. A quick search for Fun ini's theorem plus distribution will show you some instances. That is why I marked it as duplicate. There is nothing wrong with duplicates. It is just better to let people do some search for questions before posting them. Otherwise dupes become too much to handle. – Mittens Apr 07 '22 at 21:25

1 Answers1

1

The traditional formula for expected value is $$E[X] = \int\limits_{-\infty}^{\infty}f(x)xdx.$$ where $f(x)$ is the density function for $X$. Assuming that $X \geq 0$, it follows that $$E[X] = \int\limits_{0}^{\infty}f(x)xdx.$$ From here, we can use differentiation by parts to get \begin{align*} E[X] & = \lim\limits_{t \to \infty}\int\limits_{0}^{t}f(x)xdx\\ & = \lim\limits_{t \to \infty}xF(x)\Big\rvert_{0}^{t} - \int\limits_{0}^{t}F(x)dx\\ & = \lim\limits_{t \to \infty}tF(t) - \int\limits_{0}^{t}F(x)dx & \text{since $F(0) = 0$}\\ & = \lim\limits_{t \to \infty}F(t)\int\limits_{0}^{t}1 - \int\limits_{0}^{t}F(x)dx & \text{since $\int\limits_{0}^{t}1 = t$}\\ & = \lim\limits_{t \to \infty}\int\limits_{0}^{t}F(t)(1-F(x))dx\\ & = \lim\limits_{t \to \infty}\int\limits_{0}^{t}F(t) \cdot P(X>x)dx\\ & = \int\limits_{0}^{\infty}P(X>x)dx & \text{since $\lim\limits_{t\to\infty}F(t) = 1$}. \end{align*}

  • 2
    Isn't the traditional formula $\mathsf EX=\int_{-\infty}^\infty x f(x),\mathrm dx$? Why the $f^\prime$? Do you mean to put $F^\prime$ with $F$ being the cdf? – Aaron Hendrickson Apr 06 '22 at 20:37
  • @AaronHendrickson Yep, that was a typo that I accidentally copied to each line. Thanks for pointing it out! – Davis Parks Apr 07 '22 at 21:15