If a random variable on a probability measure space has a density , then is the general expectation of the r.v. equal to the density expectation?

33 Views Asked by At

Let $(M,P,\mathcal F)$ be a probability measure space and $X:M\to\mathbb R$ be a random variable i.e. measurable function and $f:\mathbb R \to \mathbb R$ be a bounded Riemann integrable function such that $P(X^{-1}(-\infty , a])=\int _{-\infty}^a f(x) dx$ ; if $f$ is continuous on some interval $I$ and $f=0$ outside that interval $I$ , then is it true that $\int_M X dP=\int_I xf(x) dx$ ( where the later integral is the usual Riemann integral) ?