Hi

If X is a random variable on some probability space (\Omega, \mathcal{F},P),  A is a set in \mathcal{F}, and for every Borel subset B of  \mathbb{R} , we have

\int_{A} I_{B}(X(\omega)) \, dP(\omega) = P(A) \cdot P(X\in B)

then we say that X is independent of A.

Show that if X is independent of an event A then

I = \int_{A} g(X(\omega)) \, dP(\omega) = P(A) \cdot E\left[g(X)\right] .

I tried:

I = P(A) \cdot \int_{\mathbb{R}} g(x) \, d\mu_{X}(x) = P(A) \cdot E\left[g(X)\right] , just from the definition given.

Here \mu_{X}(x) denotes the distribution measure.

Help appreciated