Given $f\in L^1(X)$, show that for every $\rho>0$ one has:
$\mu({|f|>\rho})\leq \rho^{-1}\int|f|d\mu$.
I think in order to prove this, we use the fact that $\int|f|d\mu= \lim_{\rho\to 0}\sum_{n=1}^\infty\rho\mu(|f|>n\rho)$. Am I correct in assuming that the inequality more or less follows from this? I was also wondering if we could make a stronger/similar statement for $L^2$ functions.
Hint: $$\mu(|f| > \varrho) = \int_{|f|> \varrho} \, d\mu \leq \int_{|f|>\varrho} \frac{|f|}{\varrho} \, d\mu.$$
This inequality is known as Markov's inequality.
Remark: For $f \in L^p(\mu)$, $p \geq 1$, $$\mu(|f|>\varrho) \leq \frac{1}{\varrho^p} \int |f|^p \, d\mu.$$