Expectation Functional in Lebesgue and Riemann Terms – Looking for a clarification Here there is a really central problem I am having self-studying probability theory, that concerns the relation between the definition of expectation in Lebesgue terms and in Riemann terms. I will truly appreciate any feedback because I feel this is really at the very core of the all theory.
Summing up, I have basically two problems (that are closed link):

*

*I really don't see why the following two expressions
$$ \mathbb{E}(X) :=\int_\Omega X d P  \hspace{2cm}(L)$$
and
$$ \mathbb{E}(X) := \int_{-\infty}^{\infty} t f(t) dt \hspace{2cm}(R)$$
are equivalent.
[Of course, here I am referring to the case of $X$ continuous r.v.]


*I am not able to let coexist the idea that the Lebesgue Integral gives us
a. a number that is the area under a certain curve, and
b. that basically the same number represents the average value that is taken by this curve.
Is there somebody who can enlighten me?
I would say that the second question is really the first, but disguised.
As always, any feedback is most welcome.
Thank you for your time.
 A: For question $1$, $(L)$ is the basic definition of mathematical expectation, which is always valid. However, $(R)$ holds only if $X$ has a density $f$ with respect to the Lebesgue measure, under which $(L)$ and $(R)$ both gives $E(X)$. So the statement $(L)$ and $(R)$ are equivalent is generally not true --- they are equivalent only if $X$ has a density (in other words, $X$ is absolutely continuous).
For question $2$, although your question was not rigorously stated, I will try to answer it. When you said "a number that is the area under a certain curve", I guess you tried to interpret the expression $\int f(x) dx$, where the "curve" you referred can be quite arbitrary. On the other hand, when you said "the average value that is taken by this curve", what you tried to interpret probably is the expression $\int xf(x) dx$, where the "curve" you referred here, $f$, is best interpreted as the density of a random variable. So a short answer to your question is, these two statements refer to two different things, which of course cannot coexist.
A: *

*(L) is the definition. (R) is not always true.


Let $X$ be a $(\mathbb R, \mathscr B (\mathbb R))$-valued random variable on a probability space $(\Omega, \mathscr F, \mathbb P)$. Its law is given by $\mathcal L_X(B) = P(X \in B)$ where $B \in \mathscr B (\mathbb R)$
By change of variable theorem we have the Lebesgue integral:
$$E[X] = \int_{\mathbb R} t d\mathcal L_X(t)$$
If $\mathbb P$ is Lebesgue measure, we have the Stieltjes integral:
$$E[X] = \int_{\mathbb R} t dF_X(t)$$
If $X$ is absolutely continuous, it has a pdf and then we have the Riemann integral:
$$E[X] = \int_{\mathbb R} t f_X(t) dt$$


*The way the Riemann integral is defined is through areas of rectangles that approximate an area under a curve.


The way the Lebesgue integral is defined is through the standard machine: indicator functions, simple functions, nonnegative functions and then integrable functions.
It's not always supposed to give an area under a curve because the integrands of Lebesgue integrals are not necessarily continuous. I wouldn't say the Lebesgue integral is supposed to assign an area under a curve. It seems more like a way to assign a general 'measure' rather than merely an 'area'
Say for example we have $$E[X] = \int_{\Omega} X dP$$
where $X$ is a discrete random variable. It wouldn't make sense to compute the 'area' under $X$ because it would just be zero right? However, it could make sense to compute the 'measure' under $X$. Try to look back at your notes or look online as to why we have Lebesgue integration in the first place.
