Function of Discrete Random Variable

Theorem
Let $X$ be a discrete random variable on the probability space $\left({\Omega, \Sigma, \Pr}\right)$.

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

Then $Y = g \left({X}\right)$, defined as:
 * $\forall \omega \in \Omega: Y \left({\omega}\right) = g \left({X \left({\omega}\right)}\right)$

is also a discrete random variable.

Proof
As $\operatorname{Im} \left({X}\right)$ is countable, then so is $\operatorname{Im} \left({g \left({X}\right)}\right)$.

Now consider $g^{-1} \left({Y}\right)$.

We have that:
 * $\forall x \in \R: X^{-1} \left({x}\right) \in \Sigma$

We also have that:
 * $\displaystyle \forall y \in \R: g^{-1} \left({y}\right) = \bigcup_{x: g \left({x}\right) = y} \left\{{x}\right\}$

But $\Sigma$ is a sigma-algebra and therefore closed for unions.

Thus:
 * $\forall y \in \R: X^{-1} \left({g^{-1} \left({y}\right)}\right) \in \Sigma$

Hence the result.