Let $(\Omega,\mathcal{F}, \mathbb{P})$ be a probability space, $X : \Omega \rightarrow \mathbb{R}$ a discrete random variable and $g : \mathbb{R} \rightarrow \mathbb{R}$ a random variable.
I can't demonstrate that $E(g(X)) = \underset{t}{\sum} g(t) \mathbb{P}(X = t)$.
Thank you!
Isn't it just the definition of expectation. Because $X$ is a discrete random variable, you will need to sum over all possible values that $X$ can have:
$$E(g(X)) = \sum _{X=t} g(X=t) p(X=t)$$