Let $(\Omega,\mathcal F,\mathbb P)$ be a probability space, let $(E,\mathcal E)$ be a measurable space, and let $X:(\Omega,\mathcal F)\to(E,\mathcal E)$ be a [random variable](/page/Random%20Variable), meaning an $\mathcal F/\mathcal E$-measurable map. Define the distribution, or pushforward measure, $\mu_X:\mathcal E\to[0,1]$ by
\begin{align*}
\mu_X(A)=\mathbb P(X^{-1}(A))
\end{align*}
for every $A\in\mathcal E$, where $X^{-1}(A)=\{\omega\in\Omega:X(\omega)\in A\}$. Then for every nonnegative $\mathcal E$-measurable function $g:E\to[0,\infty]$,
\begin{align*}
\int_\Omega g(X(\omega))\,d\mathbb P(\omega)=\int_E g(x)\,d\mu_X(x).
\end{align*}