Mean life as an integral of survival

Let T\ge 0 have survival function R. Show that \mathbb{E} T=\int_0^{\infty} R(t)\,\,\mathrm{d} t, assuming the integral is finite.

Write T=\int_0^T1\,\,\mathrm{d} t=\int_0^\infty\mathbf 1\{t<T\}\,\,\mathrm{d} t. The integrand is non-negative, so expectation and integral may be exchanged (Tonelli’s theorem):

\mathbb{E} T=\int_0^\infty\mathbb{E}\,\mathbf 1\{t<T\}\,\,\mathrm{d} t=\int_0^\infty\mathbb{P}(T>t)\,\,\mathrm{d} t=\int_0^\infty R(t)\,\,\mathrm{d} t.

With a density, the same follows from integration by parts: \int_0^\infty tf(t)\,\,\mathrm{d} t=[-tR(t)]_0^\infty+\int_0^\infty R(t)\,\,\mathrm{d} t, and the boundary term vanishes when the mean is finite.