TITLE: Expected value as integral of survival function
QUESTION [17 upvotes]: Let $T$ be a positive random variable, $S(t)=\operatorname{P}(T\geq t)$.
Prove that $$E[T]=\int^\infty_0 S(t)dt.$$
I have tried this unsuccessfully.

REPLY [5 votes]: Using integration by parts and the fact that $f(t)dt=dF(t)=-d(1-F(t))=-dS(t)$
$$
\begin{align*} E(T) = \int_0^\infty t f_T(t) \, dt &= \int_0^\infty -t\,dS(t) \\ &= \left. -tS(t) \right|_0^\infty - \int_0^\infty S(t) \, d(-t) \\ &= 0 + \int_0^\infty S(t) \, dt \\ &= \int_0^\infty S(t) \, dt. \end{align*}
$$