Assume a random variable $X$ on probability space $\Omega$, taking values in $\mathbb{R}$ with some known distribution $F(dX)$. Assume also a function of the random variable, $g(X)$. Does then the following relation hold true?: $$ \int_\Omega g(X) dP = \int_\Omega g(X)F(dX) = \int_\mathbb{R}g(x)F(dx) $$
I know that the expectation of a random variable can be defined in a similar fashion $$ E(X) = \int_\Omega X dP = \int_\mathbb{R}xF(dx) $$ but I am not sure whether this translates to the case with a function of $X$, $g(X)$.