Let $(X,\mu)$ be a measure space and $f:X \to \mathbb{R}$ an integrable function. Does the following always hold?
$$\int_{X}f\,d\mu=\int_{\mathbb{R}}\mu(f^{-1}(t))\,dt$$
Let $(X,\mu)$ be a measure space and $f:X \to \mathbb{R}$ an integrable function. Does the following always hold?
$$\int_{X}f\,d\mu=\int_{\mathbb{R}}\mu(f^{-1}(t))\,dt$$
On
No. For example $X=[0,1]$ with Lebesgue measure $m$ and $f:[0,1]\to\mathbb{R}$, $f(x)=x$. Then, $$\int_{[0,1]}fdm=\frac{1}{2}$$ but $f^{-1}(t)$ consists of a single point so $m(f^{-1}(t))=0$ and hence $$\int_{\mathbb{R}}m(f^{-1}(t))dt=0.$$ More generally, if $f$ is one-to-one and $\mu=m$ you will have $\int_{\mathbb{R}}\mu(f^{-1}(t))dt=0$ no matter what $f$ is.
No. The equality is not true, but we have the following proposition:
Proposition(Distribution formula) Let $(X,\mathcal{B},\mu)$ be a $\sigma$-finite measure space, and let $f:X\to [0,+\infty]$ be measurable, then $$\int_X f(x)\,d\mu(x)=\int_{[0,+\infty]}\mu(\{x\in X:f(x)\geq \lambda\})\,d\lambda.$$