TITLE: Darth Vader Rule: what is the reason for its name, and a formal proof?
QUESTION [8 upvotes]: I often hear the term "Darth Vader Rule" when calculating the expected value using the survival function and taking the integral where it is defined.
I am not quite sure why it is called that (is it customary?) and I would also like to know a formal proof of it.  I tried to look around, but I have a feeling that the name of this rule is not official and I cannot seem to find it right away.

REPLY [3 votes]: On a formal proof:
There are many proofs of this rule on math.SE.  Duplicate requests for proof are redirected here.  Intuition on this rule can be found in this post. IMO the slickest proof argues as follows:

Claim: Let $X$ be a nonnegative random variable. Then
$$
E[X]=\int_0^\infty P(X>t).
$$
Proof: Write $X$ as the integral of the constant $1$ from $0$ to $X$:
$$
X = \int_0^X1\,dt=\int_0^\infty H(t)dt
$$
where
$$H(t) = \begin{cases}1&\text{if $t<X$}\\ 0&\text{otherwise}\end{cases}$$
To compute the expectation of $X$, interchange the order of expectation and integration (Fubini-Tonelli):
$$
E[X] = E\left[\int_0^\infty H(t)dt\right]\stackrel{\text{Fubini}}=\int_0^\infty E[H(t)]dt$$
But for each $t>0$, $H(t)$ is a zero-one random variable, so its expectation is the probability that it equals $1$:$$ E[H(t)] = P(H(t)=1) = P(t<X) = P(X>t).$$

The same argument proves the alternative form $E[X]=\int_0^\infty P(X\ge t)$.