Tail-sum formula for expectation (source code)

= Tail-sum formula for expectation

For a nonnegative <random variable> $X$, <Tonelli theorem> gives
$$
\mathbb E[X]=\int_0^\infty\mathbb P(X>t)\,dt.
$$
Consequently, for each $a>0$, $\mathbb E[X]=\infty$ exactly when $\sum_{n\geq1}\mathbb P(X>an)=\infty$; compare the integral on successive intervals of length $a$.