1

If we have expectation $E[X] = \sum_{i=1}^{\infty}(i\times Pr\{X=i\})$, where $i \in \mathbb{N}$. Can you please explain how is it equal to $E[X] = \sum_{i=1}^{\infty}( Pr\{X \ge i \}))$?

I see that $$ Pr\left[ X\ge i \right] =1-Pr\left[ X<i \right] $$ $$ Pr\left[ X<i \right] =\frac{1}{N}\times \frac{2}{N}\cdots \frac{i-1}{N} $$ $$ Pr\left[ X\ge i \right] =1-\frac{1}{N}\times \frac{2}{N}\cdots \frac{i-1}{N} $$ $$ =1-\frac{\left( i-1 \right) !}{N} $$ $$ =\frac{N-\left( i-1 \right) !}{N} $$ $$ \sum_{i=1}^{\infty}{\left( i\times Pr\{X=i\} \right)}=i\times \frac{i}{N}\ne \sum_{i=1}^{\infty}{\left( Pr\{X\ge i\} \right)}=\frac{N-\left( i-1 \right) !}{N} $$

So, can you please correct if I am wrong? I am not able to get to formula that $E[X] = \sum_{i=1}^{\infty}(i\times Pr\{X=i\})$, where $i \in \mathbb{N}$ is equal to $E[X] = \sum_{i=1}^{\infty}( Pr\{X \ge i \}))$?.

robjohn
  • 345,667
Avv
  • 1,159

1 Answers1

5

$$ \begin{align} \sum_{i=1}^\infty Pr[X\ge i] &=\sum_{i=1}^\infty\sum_{j=i}^\infty Pr[X=j]\tag1\\ &=\sum_{j=1}^\infty\sum_{i=i}^j Pr[X=j]\tag2\\ &=\sum_{j=1}^\infty j Pr[X=j]\tag3 \end{align} $$ Explanation:
$(1)$: write $Pr[X\ge i]$ as the sum of $Pr[X=j]$ for $j\ge i$
$(2)$: switch order of summation, keeping $j\ge i$
$(3)$: evaluate the inner sum

robjohn
  • 345,667
  • Very clear answer. Thank you. – Avv Sep 02 '21 at 15:34
  • So, changing order of sum was based on your observation of the fact that sequences are $p(x_1), \cdots,$. Second sequence, $p(x_2), \cdots,$. Third sequence, $p(x_3), \cdots,$ please? – Avv Sep 02 '21 at 18:00
  • 1
    No. The changing of the order of summation is simply that. All terms in the sum are positive, so we are allowed to change the order of summation, even in an infinite sum. – robjohn Sep 02 '21 at 22:09