I want to proof the formulas for the expected Value of discrete and absolutely continuos Random Variables $\mathbb{E}[X]=\sum_{i=1}^\infty x_ip_i$ and $\mathbb{E}[X]=\int_\mathbb{R}xf_X(x)dx$ by using the general definition : $\mathbb{E}[X]=\int_\mathbb{R}Xd\mathbb{P}$ where X is a nonegative RV.
My actual goal is to find a formula to calculate the expected Value for a mixed RV and therefore i am trying to understand how to proof the formulas for the not mixed case.
EDIT: these are the proofs i found so far:
discrete case:
the discrete RV $C$ can be written as a simple function: $C(\omega)=\sum_{i=1}^{\mathbb{N}} c_i \mathbb{I}_{A_i}(\omega)$ where $c_i$ is the realisation of $C$ and $A_i$ is a Partition of $\mathbb{\Omega}$.
By definition of integration of a simple function:
$\mathbb{E}[C]=\int_\Omega Cd\mathbb{P}=\sum_{i=1}^\mathbb{N}c_i\mathbb{P}(A_i)=\sum_{i=1}^\mathbb{N}c_i\mathbb{P}(C=c_i)$.
absolutely continuous case:
define the pushforward measure $P_X:\mathbb{R}\rightarrow\mathbb{R}, P_X(B):=\mathbb{P}(X^{-1}(B))$ and another RV $Z:\mathbb{R}\rightarrow\mathbb{R},Z(x):=x$ on $(\mathbb{R},\mathcal{A},P_X)$.Then by using the change of variable Theorem in the second step:
$\mathbb{E}[X]=\int_\mathbb{R}Z(X(x))d\mathbb{P}(x)=\int_\mathbb{R}xdP_X=\int_\mathbb{R}xf_X(x)dx$
where $f_X$ denotes the density of $X$.
I would appreciate any thoughts about the proofs.
Let $\{x_i\}$ be the countable set of values that a discrete r.v. $X$ can take. Then $A_i$ = $X^{-1}(x_i)$ are disjoint and we have:
$\mathbb{E}[X]=\int_\Omega XdP=\int_{A_1} XdP + \int_{A_2} XdP + \cdots=\sum_{i=1}^{\infty} x_iP(A_i)= \sum_{i=1}^{\infty} x_ip_i$