Let $(\Omega,\mathcal{A},P)$ be a probabilty space, $(\mathbb{R},\mathcal{B})$ a measurable space and $X\colon \Omega\to\mathbb{R}$ a random variable. The expected value of $X$ is defined as the Lebesgue integral \begin{align} \mathbb{E}_P(X):=\int_{\Omega}X\,\mathrm{d}P \end{align} and by the change of variables formula it holds \begin{align} \int_{\Omega}X\,\mathrm{d}P=\int_{\mathbb{R}}x\,\mathrm{d}P_{X} \end{align} where $P_X:=P\circ X^{-1}$ is the distribution (push forward, image measure, $\ldots$) of $X$ with respect to $P$. If $X$ has a probabilty density function $f=\frac{\mathrm{d}P_X}{\mathrm{d}\lambda}$, we can write \begin{align} \int_{\mathbb{R}}x\,\mathrm{d}P_{X}=\int_{\mathbb{R}}x\cdot f(x)\;\mathrm{d}\lambda(x) \end{align}
Questions:
- Is the last integral on the right side a Riemann or Lebesgue integral? We plugged in the formula the density function of a normal distribution and calulated it as a Riemann integral!
- What is the reason for that we can evaluate the integral as a Riemann integral?
I'll answer both questions by saying that this is a property of the Lebesgue integral : if $f : \mathbb R \rightarrow \mathbb R$ is so that $|f|$ is Riemann-integrable, then it is Lebesgue-integrable and its Lebesgue-integral in regards to the $\lambda$ Lebesgue measure is equal to its Riemann-integral. In that case, both integrals can be just called "the integral". In other words :
$\int_{\mathbb R}f(x)d\lambda(x) = \int_{\mathbb R}f(x)dx$