# Expectation of non-negative real-valued random variable

in some lecture notes, I stumbled upon the following formula : that if $$X$$ is a non-negative real-valued random variable then :

$$\mathbb{E}[X] = \sum_{n \geq0} \mathbb{P}(X \geq n)$$

I tried looking for proofs on MSE and elsewhere but only found for general cases which involve measure theory.

for this specific discrete case I tried the following :

\begin{align} & \sum_{n \geq0} \mathbb{P}(X \geq n) = \sum_{n \geq0}\sum_{k \geq n}\mathbb{P}(X =k )= \sum_{k \geq 0}\mathbb{P}(X =k ) + \sum_{k \geq 1}\mathbb{P}(X =k ) + \cdots \\ & \end{align}

if you expand each series term by term and align each same term one under the other, you can notice that there's :

one $$\,\mathbb{P}(X =0)$$ term, two $$\,\mathbb{P}(X =1)$$ terms, three $$\,\mathbb{P}(X =2)$$ terms and so on, in general we have $$n+1$$ $$\,\mathbb{P}(X =n)$$ terms

problem is If I apply same reasoning to the usual definition of the expectation then I find only $$n$$ $$\,\mathbb{P}(X =n)$$ terms

is the formula in the lecture notes wrong or is my reasoning wrong ? also I'd like a more formal proof where I can see the importance of the condition of positiveness.

thanks !

The formula is wrong. Th sum on the right has to start with $$n=1$$. Note that If $$X=0$$ then LHS $$=0$$ and RHS $$=1$$. You have got exactly $$\sum nP\{X=n\}$$ because there are $$n$$ terms each equal to $$P\{X=n\}$$ for $$n=0,1,2...$$. This proves the modified formula.
• thing is put this way there's no $P\{X=0\}$ because $n = 0$ while there's one in the 2nd definition I'm trying to prove Nov 11, 2018 at 20:31
• @rapidracim Sorry for noticing that the sum started with $n=0$. Please see my revised answer. Nov 11, 2018 at 23:19