Possibly a basic question, but I could not find anything online. Suppose we have a bounded metric space $(X,d)$ with a Borel probability measure $\mu$. If we have an integrable function $f:X\to \mathbb{N}$, can we relate the decay of $\mu(f>n)$ to the integrability of $f$?
For example, if $\mu(f>n)=O(n^{-\alpha})$ for some $\alpha>0$, can we say $f\in L^2(X)$ (or even $L^p$ for $p>2$)? (I would imagine certain conditions would be required on $\alpha$ here).
Similarly, if $\mu(f>n)=O(e^{-cn})$ for some $c>0$ or $\mu(f>n)=O(e^{-cn^b})$ for $c>0$, $0<b<1$, can we say that $f\in L^p$ for all $p>1$?
(I believe the terms above are polynomial decay, exponential decay, and stretched exponential decay - correct me if I am mistaken).
For non-negative real random variables $Y$ we have $EY=\int_0^\infty P(Y>t)dt$, which you could apply to $Y=|f|^p$. So in your first example, where $\mu(f>n)=O(n^{-a})$ you can check if $\sum_n n^{-a/p}<\infty$, and so on.