It is tempting to think that in order to find the expected value E(g (X)), one must first find the probability density f g (X) of the new random variable Y = g (X). However, rather than computing E ⁡ ⁡ ( g ( X ) ) = ∫ ∫ − − ∞ ∞ ∞ ∞ y f g ( X ) ( y ) d y , one may find instead E ⁡ ⁡ ( g ( X ) ) = ∫ ∫ − − ∞ ∞ ∞ ∞ g ( x ) f X ( x ) d x .