Expectation of Function of Discrete Random Variable

Theorem
Let $X$ be a discrete random variable.

Let $\expect X$ be the expectation of $X$.

Let $g: \R \to \R$ be a real function.

Then:
 * $\ds \expect {g \sqbrk X} = \sum_{x \mathop \in \Omega_X} \map g x \, \map \Pr {X = x}$

whenever the sum is absolutely convergent.

Proof
Let $\Omega_X = \Img X = I$.

Let $Y = g \sqbrk X$.

Thus:
 * $\Omega_Y = \Img Y = g \sqbrk I$

So:

From the definition of expectation, this last sum applies only when the last sum is absolutely convergent.