# Why does $\mathbb{E}[X] = \sum^\infty_{r=0}\mathbb{P}(X > r)$? [duplicate]

Why does $\mathbb{E}[X] = \sum^\infty_{r=0}\mathbb{P}(X > r)$?

I understand if it was $\mathbb{E}[X] = \sum^\infty_{r=0}r\cdot\mathbb{P}(X = r)$, but for this I don't understand why.

## marked as duplicate by wolfies, user223391, Jack, drhab, SashaMay 24 '16 at 21:13

• Google tail sum formula. – Em. May 24 '16 at 15:34
• @probablyme Thanks for the name, but the proofs were too complicated for me. – user341994 May 24 '16 at 15:42
• @Surb Can you please give a complete proof? I can't understand how to get to $E[X]$ from there. I've tried $P(X > r) = \sum^\infty_{k=r+1}P(X=k) = \sum^\infty_{k=r+1}P(X=0) - \sum^\infty_{k=r}P(X=0)$ but I can't figure out how to get a $k$ in front... – user341994 May 24 '16 at 15:44
• @user341994: I completed my answer. – Surb May 24 '16 at 15:56
• math.stackexchange.com/q/1795529/9464 – Jack May 24 '16 at 16:02

Because, $$P\{X>r\}=\sum_{k=r+1}^\infty P\{X=k\}.$$ under the assumption that $P\{X\in \mathbb N\}=1$.

Therefore, $$\sum_{r=0}^\infty P\{X>r\}=\sum_{r=0}^\infty \sum_{k=r+1}^\infty p\{X=k\}=\sum_{k=1}^\infty \sum_{r=0}^{k-1}p\{X=k\}=\sum_{k=1}kp\{X=k\}=\mathbb E[X].$$
This only holds if $P(X \in \mathbb{N})=1$, a fact we use on the 3rd equality:
$\sum^{\infty}_{n=0}P(X > n)=\sum^{\infty}_{n=0}E[1_{X>n}]=E[\sum^{\infty}_{n=0}1_{X>n}]= E[\sum^{X-1}_{n=0}1_{X>n}]=E[\sum^{X-1}_{n=0}1]=E[X]$
The second equation is due to Fubini, as $\sum$ is an integral with respect to the counting measure.