Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This question already has an answer here:

Let $X$ be a random variable that takes non-negative integer values. Show that, $$E[X] = \sum^{\infty}_{k=1}P(X \geq k)$$

I'm having trouble following the solution. Could someone help clarify some steps? Thanks.

By definition, $$P(X \geq k) = \sum^{\infty}_{i=k}p_{X}(i)$$

Therefore, we substitute to get $$\sum^{\infty}_{k=1}P(X \geq k) = \sum_{k=1}^{\infty}\sum_{i=k}^{\infty}p_{X}(i)$$

Now here is where I'm confused. $$\sum_{k=1}^{\infty}\sum_{i=k}^{\infty}p_{X}(i) = \sum_{i=1}^{\infty}\sum_{k=1}^{i}p_{X}(i) = \sum^{\infty}_{i=1}ip_{X}(i)$$

I don't understand how we are manipulating the summations in the first equality and how we derive $ip_{X}(i)$ in the second equality.

share|improve this question

marked as duplicate by Arthur Fischer Jun 25 at 14:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Put $P(X\ge k)=P(X=k)+P(X=k+1)+\cdots$ as the $k$'th row of an infinite matrix, padded at the start with $k-1$ zeroes. Now sum over the columns. –  David Mitra Jun 24 at 17:03
    
As in the first answer here. –  David Mitra Jun 24 at 17:10
1  
This is a recurring question here, but it's hard to find it because the titles vary so much. –  Michael Hardy Jun 24 at 17:18

2 Answers 2

up vote 4 down vote accepted

\begin{array} & & 0P(X=0) & + & 1P(X=1) & + & 2 P(X=2) & + & 3P(X=3) & + & \cdots \\[18pt] = & & & P(X=1) & + & P(X=2) & + & P(X=3) & + & \cdots \\ & & & & + & P(X=2) & + & P(X=3) & + & \cdots \\ & & & & & & + & P(X=3) & + & \cdots\\ & & & & & & & & + & \cdots \end{array}

The sum in the first row is $P(X>0)$; that in the second row is $P(X>1)$; that in the third row is $P(X>2)$, and so on.

The equality of $$ \sum_{k=1}^\infty \sum_{i=k}^\infty \cdots = \sum_{i=1}^\infty \sum_{k=1}^i \cdots $$ can be seen by observing that both are the sum over the set $$ \{ (k,i) : 1\le k \le i \}. $$

The next equality involves a sum of the form $\displaystyle\sum_{k=1}^i a$ where $a$ does not change as $k$ goes from $1$ to $i$, so it is $$ \underbrace{a+a+a+\cdots+a}_{i\text{ terms}} = ai. $$

share|improve this answer

Perhaps you can show the pointwise identity $$ X=\sum_{k=1}^X1=\sum_{k=1}^\infty\mathbf 1_{X\geqslant k} $$ and use linearity of expectation.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.