A discrete random variable and simple functions Consider a discrete random variable $X$ on a probability space with measure $P$, having range $A$. Clearly $X=\sum_{x\in A} x\chi_{\{X=x\}}$ where $\chi_S$ is the indicator function on $S$.
I wish to show that $\int X=\sum xP(X=x)$. In the case when $A$ is finite, $X$ is a simple function and by the definition of the Lebesgue integral the result is easy. How do we proceed in the case when $A$ is infinite?

For $X$ non negative this is a consequence of the monotone convergence theorem (Beppo Levi). To see whats happening here let's take $A = \mathbb N$ :
$$
\int X d\mathbb P = \int \sup_{n \geq 0} \sum_{k = 0}^n k\chi_{\{X=k\}}d\mathbb P = \sup_{n \geq 0} \int  \sum_{k = 0}^n k\chi_{\{X=k\}}d\mathbb P=  \sup_{n \geq 0} \sum_{k = 0}^nk\int  \chi_{\{X=k\}}d\mathbb P =  \sum_{k = 0}^\infty k\mathbb P(X=k) .
$$
But when $X$ is not non negative this is not possible because $X$ has no reason to admit an expectation. For instance take $A = \mathbb Z$, $X$ symetric and denote $\mathbb P(X = n) = p_n$. Then $X$ is not non negative so you have to look at $|X|$ to see if the expectation exists :
$$
\int |X|d \mathbb P =  \sum_{k = 0}^\infty 2k p_k
$$
so taking $p_k$ such that $p_k = \frac {c} {1+k^2}$ with $c$ a normalization constant you get that the last sum diverge. In this setting your formula cannot be proven because its compenents does not exist.
