I'm studying theoretical probability theory. Let $(\Omega,\Sigma,P)$ be a probability space. $X:\Omega\to\Bbb R$ be a random variable. Suppose the probability density function $f$ of $X$ exists.
If the definition of expectation is $\Bbb E[X]:=\int_{\Omega}X\,dP$. I want to prove that $\Bbb E(X)=\int_{\Bbb R}xf(x)\,d\lambda$, where $\lambda$ is the Lebesgue measure in $\Bbb R$.
My attempt:
$$\Bbb E[X]:=\int_{\Omega}X\,dP=\int_{\Omega}\text{id}\circ X\,dP=\int_{X(\Omega)}\text{id}\,dP_X,$$
where the last equality came from Lebesgue change-of-variable formula in abstract settings (i.e, $\Omega$ is not necessarily required to be $\Bbb R^n$; an abstract measure space is fine), and $P_X$ is the push-forward measure of $P$.
Next, by Radon-Nikodym Theorem we know that $P_X(A)=\int_Af\,d\lambda$ for every Borel set $A$ in $\Bbb R$. Then how can I run to the next and final step that
$$\int_{X(\Omega)}\text{id}\,dP_X=\int_{\Bbb R}xf(x)\,d\lambda?$$
I guess it would be quite easy; however, I haven't studied real analysis for a while, so I was not able to figure out. And on the other hand, is my self-attempted proof correct? Could it be more simpler?
Best Answer
As mentioned in the comment, the integral shouldn't be over $X(\Omega)$. The general change of variables theorem tells you \begin{align} \int_{\Omega}X\,dP&=\int_{X^{-1}(\Bbb{R})}(\text{id}_{\Bbb{R}}\circ X)\,dP=\int_{\Bbb{R}}\text{id}_{\Bbb{R}}\,dP_X. \end{align} The final step is a general exercise in measure theory, that you can 'multiply and divide' by $d\lambda$ to write the last integral as $\int_{\Bbb{R}}\text{id}_{\Bbb{R}}\frac{dP_X}{d\lambda}\,d\lambda=\int_{\Bbb{R}}\text{id}_{\Bbb{R}}\cdot f\,d\lambda$. More precisely, here's a guided exercise/statement which I leave to you to fill in the details of (they really are routine).
This theorem provides the justification for the notation $d\nu=f\,d\mu$, because it tells us that in order to calculate $\int_Xg\,d\nu$, we just replace $d\nu=f\,d\mu$ to arrive at the final answer of $\int_Xgf\,d\mu$.