I am trying to study probability and measure theory on my own, and I'm struggling to make the link between the Law of a Probability (distribution), the Radon Nikodym Theorem and the change of variables formula. Below I'll write down my current understanding of the topic; would someone mind filling in the gaps for me? Thanks
We'll begin with a probability space (more generally could have been a measure space but I want to work with probability measures), $(\Omega, \mathcal{F}, \mathbb{P})$ where $\mathcal{F}$ is a $\sigma$-algebra.
We have a random variable, $X$, which maps from this space into the measurable space $(\mathbb{R},B(\mathbb{R}))$, where $B(\mathbb{R})$ is the Borel $\sigma$-algebra on $\mathbb{R}$. By definition, we have that $X^{-1}(B) \in \mathcal{F}$ for all $B \in B(\mathbb{R})$.
We equip the measurable space with the distribution of the random variable, $Q_{X}: B(\mathbb{R}) \rightarrow [0,1]$, which is defined as $Q(B) = \mathbb{P}(X^{-1}(B)) = \mathbb{P}(X \in B) = \mathbb{P}(\{\omega \in \Omega: X(\omega) \in B\})$ for all $B \in B(\mathcal{R})$.
We say that a measure $\nu$ is absolutely continuous with respect to a measure $\mu$, denoted $\nu << \mu$ if $\mu(A) = 0$ implies that $\nu(A) = 0$ for all $A \in \mathcal{F}$. Then the Radon Nikodym theorem tells us that if $\nu$ and $\mu$ are $\sigma$-finite, and $\nu << \mu$, then there exists a positive measurable $g:(\Omega, \mathcal{F}) \rightarrow (\mathbb{R},B(\mathbb{R}))$, such that $\nu(A) = \int_{A} g d\mu$. We call $g$ the density or Radon Nikodym derivative of $\nu$ with respect to $\mu$.
Ok so now I want to put all this theory together to understand the definition of an expectation or integral of a random variable that one would normally be taught in a first year undergraduate probability course. I'll try do this for continuous random variables (I should be able to get the result for the discrete case from that). In such basic probability courses, we are taught that $E(g(X)) = \int_{\mathbb{R}} g(x) Q_{X}dx$, where $Q_X$ is introduced as the PDF, which is just the Law or density described above.
My book defines the expectation of the random variable as $E(X) = \int_{\Omega} X d\mathbb{P}$, or using proper notation, $E(X) = \int_{\Omega} X(\omega) d \mathbb{P}(\omega)$. My question is how do you get from this definition to the one that makes use of the density as given in basic probability courses. Why is it that $E(X) = \int_{\Omega} X d\mathbb{P} = \int_{\mathbb{R}}x Q_X dx$? From what I've seen, I'm meant to use the Radon Nikodym theorem or a change of variables (I don't get this), but I don't understand how. I'm also not entirely sure I understand what $E(X) = \int_{\Omega} X d\mathbb{P}$ means either.
Thank you for the help