30
$\begingroup$

Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show, $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$ when $X$ has : a) a discrete distribution, b) a continuous distribution.

I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X> t)$. Although how useful integrating that is, I really have no idea.

  • 1
    In the two cases, it's a rewritting of the sum. Start from the RHS, that you can express in the first case as an integral of a sum and in the second as a double integral, then switch them. This is allowed because all the quantities are non-negative.2012-07-19
  • 3
    This question was asked here previously. Check and you will find a more detailed answer. Either here or on CV.2012-07-19
  • 2
    See for example, the answers to [this question](http://math.stackexchange.com/q/64186/15941) which include both formal proofs (by Didier, who has answered your question here) as well as more intuitive approaches to the problem.2012-07-19
  • 2
    As far as usefulness, this can be more numerically stable than differentiating $F$, mulitplying by $t$, and integrating. Actually, most random variables don't have pdfs, so differentiating $F$ may not even be possible.2015-10-26

2 Answers 2

32

For every nonnegative random variable $X$, whether discrete or continuous or a mix of these, $$ X=\int_0^X\mathrm dt=\int_0^{+\infty}\mathbf 1_{X\gt t}\,\mathrm dt=\int_0^{+\infty}\mathbf 1_{X\geqslant t}\,\mathrm dt, $$ hence

$$ \mathrm E(X)=\int_0^{+\infty}\mathrm P(X\gt t)\,\mathrm dt=\int_0^{+\infty}\mathrm P(X\geqslant t)\,\mathrm dt. $$


Likewise, for every $p>0$, $$ X^p=\int_0^Xp\,t^{p-1}\,\mathrm dt=\int_0^{+\infty}\mathbf 1_{X\gt t}\,p\,t^{p-1}\,\mathrm dt=\int_0^{+\infty}\mathbf 1_{X\geqslant t}\,p\,t^{p-1}\,\mathrm dt, $$ hence

$$ \mathrm E(X^p)=\int_0^{+\infty}p\,t^{p-1}\,\mathrm P(X\gt t)\,\mathrm dt=\int_0^{+\infty}p\,t^{p-1}\,\mathrm P(X\geqslant t)\,\mathrm dt. $$

  • 0
    may I ask you how you derive the first equation? The left side is a function from sample space (possibly to $\mathbb{R}$) and the right side is an integral and therefore a number. Am I right?2014-06-02
  • 2
    @Cupitor The left-hand-side, the middle side and the right-hand-side are all random variables, for example the value at $\omega$ of the right-hand-side is $$\int_0^{+\infty}\mathbf 1_{X(\omega)\geqslant t}\,\mathrm dt.$$2014-06-02
  • 0
    Thanks for the reply. But $X(\omega)$ is a real number right? Then if $\textbf{1}$ is characteristic function it should be defined on a set, but $X(\omega)>t$ is a condition.2014-06-02
  • 4
    $U=\mathbf 1_{X\geqslant t}$ is the function defined on $\Omega$ by $U(\omega)=1$ if $X(\omega)\geqslant t$ and $U(\omega)=0$ otherwise.2014-06-03
  • 0
    Thank you. I see. And then the second step follows from changing Lebesgue measure to Probability measure, right?2014-06-03
  • 2
    The second step is to consider the expectation of each side (that is, its integral with respect to $P$).2014-06-03
  • 0
    @Did Can you tell me how to do this formally? I've been trying to understand your argument for hours now. First: What arguments does the function $1_{X>t}$ take? It's a function of $t$ isn't it. I will write this explicitly in the following calculation. By integration I get: $E(X)=\int_{-\infty}^{\infty}X(\omega)P(d\omega)=\int_{-\infty}^\infty\int_0^{\infty}1_{X(\omega)\geq t}(t)dtP(d\omega)=\int_{0}^\infty\int_{-\infty}^{\infty}1_{X(\omega)\geq t}(t)P(d\omega)dt$, where the last step I suppose is Fubini. I know that $\int_{-\infty}^{\infty}1_{X(\omega)\geq t}(\omega)dP(\omega)=P(X>t)$.2017-02-12
  • 0
    If I had to take a guess, I would say that in truth the indicator-function takes both $\omega$ and $t$ as arguments instead of only one of those each, and by this the result follows. Is this correct?2017-02-12
  • 1
    @see Yes, your reading of these formulas and the proof in your first comment are both correct.2017-02-12
11

Copied from Cross Validated / stats.stackexchange:

enter image description here

where $S(t)$ is the survival function equal to $1- F(t)$. The two areas are clearly identical.