I guess this is a trivial problem. I was reading about expected value on wiki and I came across a notation of an integral I don't understand. There is a statement that a general case of expected value has this form:
$$E[X]=\int_{\Omega} X(\omega)\,dP(\omega)$$
with a comment that this is a Lebesgue integral. I was taught to calculate integrals or multi integrals with respect to a number of variables, not functions. When I see the term $dP(\omega)$, I am confused!
I know an expected value can also be expressed in this form
$$E[X] = \int_{X} x\,p(x)\,dx$$
because it is simply a weighted sum / integral of a random variable over probabilities associated with its realizations.
How to understand an integral when it is calculated with respect to a function?