Making sense of measure-theoretic definition of random variable I have some understanding of measure theory / real analysis, and some understanding of probability theory, but I'm having some trouble putting the two together.
According to Wikipedia:

Let $(\Omega, \mathcal{F}, P)$ be a probability space and $(E, \mathcal{E})$ a measurable space. Then an $(E, \mathcal{E})$-valued random variable is a function $X : \Omega \to \mathcal{E}$ which is $(\mathcal{F}, \mathcal{E})$-measurable.

Now for example, let's take $X$ be a standard Gaussian random variable, $X \sim \mathcal{N}(0, 1)$.


*

*I think $E = \mathbb{R}$ since $X$ takes values in $\mathbb{R}$.

*Also, we should have $\mathcal{E} = \mathscr{B}(\mathbb{R})$ the Borel $\sigma$-field of $\mathbb{R}$.

*But, what should $(\Omega, \mathcal{F}, P)$ be? 


Furthermore, let's try to calculate $\mathbb{E}[X]$ the mean of $X$. By Wikipedia's definition,
$$\mathbb{E}[X] = \int_\Omega X\, dP = \int_\Omega X(\omega)\, P(d\omega).$$
This raises some questions.


*

*How does this relate to the elementary computation:
$$\mathbb{E}[X] = \int_{-\infty}^{\infty} x\cdot f_X(x)\, dx$$
How does $f_X : \mathbb{R} \to \mathbb{R}^{\geq 0}$ relate to the measure-theoretic definition of $X$?

*What is the meaning of $P(d\omega)$? $P$ is a measure so it makes sense to integrate $dP$, but what is $d\omega$?

 A: 
But, what should be $(Ω,F,P)$?

Depends on your application. If want to look at arbitrary random variables, then it is simple arbitrary. If you have a specific example in mind, it is not.

How does this relate to the elementary computation [...]

In this case you assumed that $X \sim \mathcal N[0,1]$. In particular $X$ is a continuous variable. In measure theory we say that the distribution of $X$ is absolutely continuous w.r.t. to Lebesgue measure. The Radon-Nikodym theorem then guarentees the existence of an $f_X$ with the property you have stated, so that we can apply the change of variable formula to make the computation of the expectation easier. Without the change of variable formula, we would have to compute the expectation with the definitions of expectations for indicator functions then simple functions then (?simple integrable then $L_1$ then?) nonnegative functions and then measurable functions.. But, again, this is a particular example, where $X$ is continuous. The measure-theoretic definition of expectation is much more general.

What is the meaning of $P(dω)$?

It doesn't mean anything. It is a notational crutch, like writing $\lim\limits_{n\to \infty} a_n$ instead of $\lim a$. It becomes useful, if you have multiple nested integrals / integrate w.r.t. to product measures.
A: The probability space is abstract (We know, or suppose it exists but we don't care how it looks). By Radom-Nikodym Theorem, if a measure $\nu$ is absolutely continuous with respect to other $\mu$, this is $\forall A\in\mathcal{F},\mu(A)=0\implies\nu(A)=0$, if both are $\sigma$-finite, there is a measurable function $f$ such that $$\forall A\in\mathcal{F},\nu(A)=\int_Af\mathrm{d}\mu $$ Besides you prove that in this case for all measurable function $g$ we have that $$\int g\mathrm{d}\nu=\int fg\mathrm{d}\mu$$ in this case $\nu(\dot{})=\int_{\dot{}}f_X\mathrm{d}x,\mu=\mathrm{d}x=$lebesgue measure, obviously $f=f_X$ and $g$ is the random variable $X$. $P(dw)$ is just notation.
A: You can use the following derivations:
$\int X dP = \int t  dPX^{-1}(dt) = \int t dF = \int t f_{X} dx$ where F is the distribution function for $X$ and $PX^{-1}$ is the pull back measure given by $PX^{-1}(B)=P(X^{-1}(B))$.
