# I want to show $E(X)=\sum_{n=1}^\infty P(X\ge n)$

Let $$X:\Omega \to \mathbb N$$ be a random variable on probability space $$(\Omega,\mathcal B,P)$$ .show that $$E(X)=\sum_{n=1}^\infty P(X\ge n).$$

my definition from $$E(X)$$ is equal $$E(X)=\int_\Omega X \, dP.$$

Thanks.

• Hmmm, maybe you want to add that $X\geq 0$ ... no?
– Stat
Nov 13, 2013 at 10:47
• @Stat:no, $P(X \ge 0) = 1$. $X$ is natural. Consider $X$ always equal to 2. $E(X) = 2 = P(X\ge 1) + P(X\ge 2)$. Nov 13, 2013 at 10:50
• oops, didn't see $N$!
– Stat
Nov 13, 2013 at 10:55
• The statement is (slightly) incorrect: because $\mathbb{N}$ includes $0$, the summation must begin at $0$ instead of $1$.
– whuber
Nov 13, 2013 at 15:01
• @whuber No, the sum must start at $n=1$ (try the case when $P[X=42]=1$).
– Did
Nov 13, 2013 at 20:04

Definition of $$E(X)$$ for discrete $$X$$ is $$E(X) = \sum_i x_i \cdot P(X = x_i)$$.

$$P( X \ge i ) = P( X = i ) + P( X = i + 1 ) + \cdots$$

So

\begin{align} & \sum_i P( X \ge i ) = P( X \ge 1 ) + P( X \ge 2 ) + \cdots \\[8pt] = {} & P( X = 1 ) + P( X = 2 ) + P( X = 3 ) + \cdots + P(X = 2 ) + P( X = 3 ) + \cdots \end{align}

(we rearange the terms in the last expression)

\begin{align} & = 1 \cdot P( X = 1 ) + 2 \cdot P( X = 2 ) + 3 \cdot P( X = 3 ) + \cdots \\[8pt] & = \sum_i i \cdot P( X = i ) \end{align}

q.e.d.

• You are supposed to provide helpful hints for the self-study tags not the full answer. It is better not to solve their assignments :)
– Stat
Nov 13, 2013 at 11:14
• Don't you need to explain why can you re-order the sum? that would be important if you are looking for a rigourous demonstration. Nov 13, 2013 at 13:24
• @January.in the question $X$ is random variable dont mention $X$ is discrete or Continuous. Nov 13, 2013 at 18:26
• Pual, yes you did indicate $X$ is discrete in the very first line: "discrete" (in its broadest possible sense) means there is a countable subset of the variable's range for which it has probability $1$; and because $\mathbb{N}$ is countable, your $X$ must be discrete.
– whuber
Nov 13, 2013 at 20:14
• @whuber.I agree and got it .and thank you from all. Nov 14, 2013 at 6:27

I like January's answer. May I suggest a way to write down the series so that the eye catches the rearrangement more easily (this is the way I like to write it on the blackboard)? $$\begin{eqnarray} \sum_{k=1}^\infty P(X\geq k) &=& \quad P(X\geq 1) \quad=\quad P(X=1)&+&P(X=2)&+&P(X=3) &+& \;\dots\\ &+& \quad P(X\geq 2) &+& P(X=2) &+&P(X=3)&+& \;\dots \\ \\ &+& \quad P(X\geq 3) && &+& P(X=3)&+& \;\dots \\ \\ &+& \quad\quad\;\; \dots && &&&+& \;\dots\\ \end{eqnarray}$$ (The rearrangement is mathematically sound because this is a series of positive terms.)

• Do you assume X is discrete?
– BCLC
Nov 26, 2015 at 22:49
• @BCLC, the formula works only when X can take positive integers. Indeed, for, say, standard uniform distribution it gives 1 whereas the answer is 1/2. Or, even in discrete case let's consider two point distribution $P(X = 1/4) = P(X = 1/2) = 1/2$: the formula gives 0, whereas mean value is 3/8. Nov 27, 2015 at 10:03

I think the standard way of doing this is by writing

$$X =\sum_{n=1}^\infty \mathbf{1}(X\ge n)$$

$$E(X) =E\left(\sum_{n=1}^\infty \mathbf{1}(X\ge n)\right)$$

and then reverse order of expectation and sum (by Tonelli's theorem)

• Interesting. Is it correct to say that this does NOT assume $X$ is discrete? :O
– BCLC
Dec 9, 2015 at 20:51
• @BCLC The first line is only true if X is a natural number, so it is not correct.... Dec 10, 2015 at 6:59

One of the other excellent answers here (from seanv507) has noted that this expectation rule actually follows from a stronger result that expresses the underlying random variable as an infinite sum of indicator variables. It is possible to prove a more general result, and this can be used to get the expectation rule in the question. If $$X: \Omega \rightarrow \mathbb{N}$$ (so its support is no wider than the natural numbers) then it can be shown (proof below) that:

$$X = \sum_{n=1}^{\max(X,m)} \mathbb{I}(X \geqslant n) \quad \quad \quad \text{for all } m \in \mathbb{N}.$$

Taking $$m \rightarrow \infty$$ then gives the useful result:

$$X = \sum_{n=1}^{\infty} \mathbb{I}(X \geqslant n).$$

It is worth noting that this result is stronger than the expectation rule in the question, since it gives a decomposition for the underlying random variable, and not just its moment. As noted in the other answer, taking expectations of both sides of this equation, and applying Tonelli's theorem (to swap the order of the sum and expectation operators), gives the expectation rule in the question. This is a standard expectation rule that is used when dealing with non-negative random variables.

The above result can be proved fairly simply. Begin by observing that:

$$X = \underbrace{1+1+ \cdots +1}_{ X \text{ times}} + \underbrace{0+0+ \cdots +0}_{ \text{countable times}}.$$

For any $$m \in \mathbb{N}$$ we therefore have:

\begin{aligned} X &= \underbrace{1+1+ \cdots +1}_{ X \text{ times}} + \underbrace{0+0+ \cdots +0}_{ \max(0,m-X) \text{ times}} \\[6pt] &= \sum_{n=1}^X \mathbb{I}(X \geqslant n) + \sum_{n=1}^{\max(0,m-X)} \mathbb{I}(X \geqslant X+ n) \\[6pt] &= \sum_{n=1}^X \mathbb{I}(X \geqslant n) + \sum_{n=X+1}^{\max(X,m)} \mathbb{I}(X \geqslant n) \\[6pt] &= \sum_{n=1}^{\max(X,m)} \mathbb{I}(X \geqslant n) . \\[6pt] \end{aligned}.