# expected value of $f(U)$ where $U$ has a uniform distribution on $[0,1]$ and $f$ is a measurable function on $L^1[0,1]$

Let $(\Omega, F , P)$ a probability space. And let $(\mathbb R,B(\mathbb R))$ the real numbers and the borel sets. Let's consider $U: (\Omega, F , P)\to (\mathbb R,B(\mathbb R))$ be a random variable that has uniformly distribution on $[0,1]$, let's consider a mesurable function $f:[0,1] \to \mathbb R$, such that $\int_0^1 |f(x)|dx <\infty$. I want to compute the expected value of the new random variable $f(U): (\Omega, F , P)\to (\mathbb R,B(\mathbb R))$ using the change of variable formula $Ef(U)=\int_{\Omega}f(U(\omega))dP=\int_{\mathbb R}f(x)d\mu$ Where $\mu$ the the measure defined by $\mu(A)=P(U\in A)$

I want to compute that expected value but I don't know how to proceed. I think that the first step is to separate $\mathbb R = (-\infty,0)\cup[0,\infty)$ and since $\mu ((-\infty,0))=0$ then $\int_{\mathbb R}f(x)d\mu=\int_{[0,\infty)}f(x)d\mu$

The second possible step it's to separate $[0,\infty)=[0,1]\cup (1,\infty)$ and use the fact that on $[0,1]$ $\mu$ is the lebesgue measure. But I'm very confused to work on $(1,\infty)$ Please help me!

-

I think you are working a little too hard on this. The statement $U$ is uniformly distributed on $[0,1]$ means $\mu = 1_{[0,1]}d\lambda$ where $\lambda$ is the Lebesgue measure. Then we have $$Ef(U) = \int_\Omega f(U)dP = \int_{\mathbb{R}} f(u) d\mu(u) = \int_\mathbb{R} f(u) 1_{[0,1]}(u)du = \int_0^1 f(u)du.$$
The key point here is justifying the change of measure $$\int_\Omega f(X(\omega))dP(\omega) = \int_{X(\Omega)}f(x)dPX^{-1}(x)$$ which is proved through simple functions and holds for $f\geq0$ measurable or $f\in L^1$.
Also I should point out that it is important for the $L^1$ case, $f \in L^1(PX^{-1})$, in general $\int_0^1|f(x)|dx < \infty$ is not enough, it is in this case since $\mu = 1_{[0,1]}d\lambda$ so the previous statement exactly says $f \in L^1(\mu)$.