We have $$ \mathbf{E}[g(X)] \stackrel{\text{df}}{=} \int_{\Omega} g(X) ~ \mathrm{d}{P} = \int_{\Bbb{R}^{k}} g ~ \mathrm{d}{P_{X}}, $$ where $ X: \Omega \to \Bbb{R}^{k} $ is a continuous random vector with pdf $ f_{X}: \Bbb{R}^{k} \to \Bbb{R} $ and $ g: \Bbb{R}^{k} \to \Bbb{R} $ is any function such that $ \mathbf{E}[g(X)] $ exists. Additionally, we know that $$ \mathbf{E}[g(X)] = \int_{\Omega} g ~ \mathrm{d}{P_{X}} = \int_{\Bbb{R}^{k}} g f_{X} ~ \mathrm{d}{\mu}, $$ where $ \mu $ is the Lebesgue measure on $ \Bbb{R}^{k} $.
My question is on the following step: $$ \mathbf{E}[g(X)] = \int_{\Bbb{R}^{k}} g f_{X} ~ \mathrm{d}{\mu} = \int_{\Bbb{R}} \cdots \int_{\Bbb{R}} g(x_{1},\ldots,x_{k}) {f_{X}}(x_{1},\ldots,x_{k}) ~ \mathrm{d}{x_{1}} \cdots \mathrm{d}{x_{k}}, $$ where the second equality follows because here the Lebesgue integral is equal to the Riemann integral. I don’t see why this is so.
The only time I know for sure that the integrals are equal is when we are talking about a (bounded) Riemann-integrable function on a bounded domain in $ \Bbb{R}^{k} $. Here, we don’t have such a domain, but I guess that since we know that the function $ g $ is such that $ \mathbf{E}[g(X)] $ exists, perhaps that lets us know that the Lebesgue and Riemann integrals are equal?
Thanks.
The Lebesgue integral and the proper Riemann integral always coincide provided the latter exists. Additionally, the Lebesgue integral and the improper Riemann integral also coincide provided they both exist. This follows from the monotone convergence theorem: given $f$ satisfying the conditions and an increasing sequence of compact sets $K_n$ whose union is the whole space, you have
$$\int_{\bigcup_{n=1}^\infty K_n} f^+ d \mu = \lim_{n \to \infty} \int_{K_n} f^+ d \mu$$
and the same for $f^-$, because of the monotone convergence theorem. But you also have equality with the proper Riemann integrals. So the integrals for $f^+$ and $f^-$ separately agree. Now you subtract and you get the equality.
Note that both conditions are separately necessary. That is because it is possible for the improper Riemann integral to exist only in the sense of conditional convergence, whereas the Lebesgue integral can only exist in the sense of absolute convergence.