# Show that $E(X) = \sum^{\infty}_{n=0} P(X > n)$

Show that, if X takes non negtive integet values: $$E(X) = \sum^{\infty}_{n=0} P(X > n)$$

The solution is: E(X) \! \begin{aligned}[t] & = \sum^{\infty}_{m=0} m * P(X = m) \\ & = \sum^{\infty}_{m=0} \underbrace{\sum^{m-1}_{n=0}}_{1} P(X = m) \\ & = \sum^{\infty}_{m=0} \underbrace{\sum^{\infty}_{m=n+1}}_{2} P(X = m) \\ & = \sum^{\infty}_{n=0} P(X > n) \end{aligned}

I do not get the mathematical passage that the author is making with the summation that I'm underlying.

Edit: In the meanwhile, I propose another solution: \begin{align*} E(X)&=\sum_{n=1}^\infty nP(X=n)\\ &=P(X=1) + 2P(X=2)+3P(X=3)+\dots\\ &=\left(P(X=1)+P(X=2)+P(X=3)+\dots\right)+(P(X=2)+P(X=3)+\dots)+(P(X=3)+\dots)+\dots\\ &=P(X\geq 1) + P(X\geq2)+P(X\geq3)+\dots\\ &=\sum^{\infty}_{n=1}P(X\geq n)\\ \end{align*} Is that correct?

• I think you have a few typos in the above, so as written it doesn't make much sense, but the principle is that both sums are over the set $\{0 \le n < m < \infty\}$.
– Adam
Jan 23 at 18:44
• So (a) there shouldn't be an $m$ term on the second and third lines, and (b) the third line should sum over $\sum_{n=0}^\infty \sum_{m=n+1}^\infty$. Hopefully with those edits it should make more sense?
– Adam
Jan 23 at 18:47
• @Ricter in the RHS of second and third equalities the factor $m$ is not correct, it can't be there as it is replaced by the second sum Jan 23 at 18:47
• Yes, you're correct. There were two "m" too much. I got rid of them now. Jan 23 at 18:49

## 1 Answer

The solution that you propose can be written in summation form this way: $$E(X) = \sum_{m=1}^\infty m P(X=m) \stackrel{(1)}=\sum_{m=1}^\infty \sum_{n=1}^m P(X=m) \stackrel{(2)}=\sum_{n=1}^\infty \sum_{m=n}^\infty P(X=m) \stackrel{(3)}=\sum_{n=1}^\infty P(X\ge n)$$ Step (1) is representing $$mP(X=m)$$ as the sum of $$m$$ copies of $$P(X=m)$$. This is what's happening in the first passage that you underlined.

Step (2) is an interchange of summation. On the LHS of the $$\stackrel{(2)}=$$, the inner sum is over $$n$$ and the outer sum is over $$m$$. On the RHS of the $$\stackrel{(2)}=$$, the inner sum is over $$m$$ and the outer sum is over $$n$$. When we change the order of summation we must ensure that we end up visiting all possible pairs of $$(m,n)$$: $$(1,1)$$, $$(2,1)$$, $$(2,2)$$, $$(3,1)$$, $$(3,2)$$, $$(3,3)$$, $$(4,1)$$, $$(4,2)$$, $$(4,3)$$, $$(4,4)$$, and so on. (To see that this is true, plot these pairs as points in the $$m-n$$ plane. The left sum is visiting these pairs one column at a time; the right sum is visiting these pairs one row at a time.) This explains the second passage that you underlined, which is also performing an interchange of summation.

Step (3) is the same as in your solution. And of course $$\sum_{n=1}^\infty P(X\ge n)$$ is the same as $$\sum_{n=0}^\infty P(X> n)$$.

Viewed this way, your proposed solution looks a lot like the official solution. But the official solution has typographical problems with its indices. Retaining the form of the official solution, one way to correct the problems is to write $$E(X) = \sum_{m=0}^\infty m P(X=m) \stackrel{(1)}=\sum_{m=\color{red} {1}}^\infty \sum_{n=0}^{m-1} P(X=m) \stackrel{(2)}=\sum_{\color{red}{n}=0}^\infty \sum_{m=n+1}^\infty P(X=m) \stackrel{(3)}=\sum_{n=0}^\infty P(X> n)$$ But you should agree that the steps in your proposed solution are really the same as in the (corrected) official solution; it's just a difference in notation.

• Really really clear. What do you think about the second solution that I wrote? Thank you! Jan 24 at 8:50
• @Ricter Your second solution looks great. It's the summation solution, expanded out. Jan 24 at 17:21