# Distribution function and $L^p$ spaces.

I saw the result below without a proof and I would like to see it.

Result: Let $g$ a nonnegative and measurable function in $\Omega$ and $\mu_{g}$ its distribuction function, i.e., $$\mu_{g}(t)= |\{x\in \Omega : g(x)>t\}|, t>0.$$ Let $\eta>0$ and $M>1$ be constants. Then, for $0<p<\infty,$ $$g \in L^{p}(\Omega) \Leftrightarrow \sum_{k\ge 1} M^{pk} \mu_{g}(\eta M^k) = S < \infty.$$

-

A consequence of Fubini's theorem for non-negative functions is that for any $p>0$, $$\int_{\Omega}g(x)^pdx=\int_0^{+\infty}p\mu_g(t)t^{p-1}dt=\sum_{k=0}^{+\infty}\int_{\eta M^k}^{\eta M^{k+1}}p\mu_g(t)t^{p-1}dt.$$ Let $a_k:=\int_{\eta M^k}^{\eta M^{k+1}}p\mu_g(t)t^{p-1}dt$. Consider the case $p\geq 1$. Since $\mu_g$ is decreasing and $t\mapsto t^{p-1}$ is increasing, we have $$\mu_g(\eta M^{k+1})\eta M^k(M-1)\eta^p (M^k)^{p-1}\leq a_k\leq \mu_g(\eta M^k)(M-1)M^k\eta^{p-1}(M^{k+1})^{p-1},$$ hence $$C_1\mu_g(\eta M^{k+1})M^{(k+1)p}\leq a_k\leq C_2\mu_g(\eta M^k)M^{kp}.$$ This gives the wanted equivalence.
When $p<1$, a similar argument applies.