# A contradiction when calculating the expected value of a discrete random variable

Let $f_x = \mathrm{Pr}\{X = x\}$ be a probability mass function. The cumulative distribution function of $X$ is then defined as $F_x = \mathrm{Pr}\{X \le x\} = \sum_{z=0}^{x} f_z$.

Therefore, the probability mass function can be written in terms of the cumulative distribution function as $f_x = F_x - F_{x-1} ~\forall x \in \mathbb{N}$.

The expected value of $X$ is also defined as $\mathbb{E}[X] = \sum_{x=1}^{\infty} x \, f_x$. Expanding this equation using the previous statements, we get:

\begin{align} \mathbb{E}[X] & = \sum_{x=1}^\infty x \cdot ( F_x - F_{x-1} ) \\ & = \sum_{x=1}^\infty x \, F_x - \sum_{x=1}^{\infty} x \, F_{x-1} \\ & = \sum_{x=1}^\infty x \, F_x - \sum_{x=1}^{\infty} (x-1) \, F_{x-1} - \sum_{x=1}^\infty F_{x-1} \\ & = \sum_{x=1}^\infty x \, F_x - \sum_{x=0}^{\infty} x \, F_x - \sum_{x=0}^\infty F_x \\ & = \sum_{x=1}^\infty x \, F_x - \sum_{x=1}^{\infty} x \, F_x - \sum_{x=0}^\infty F_x \\ & = -\sum_{x=0}^\infty F_x. \end{align}

The last term is the negative of sum of non-negative terms and thus, is negative. Therefore, it turns out that the expected value of random variable $X \ge 0$ is negative, that is a contradiction. Just wondering which of the derivations above is the source of the problem?

-

Note that $\sum xF_x$ and $\sum xF_{x-1}$ are divergent series. As soon as you introduce them into the mix, all hope is lost.