# Different versions of Markov's inequality

I have some doubts regarding some different versions of Markov's inequality.

From Wikipedia's definition of Markov's inequality we have:

If $X$ is a nonnegative random variable and $a>0$, then $\mathbb{P}(X\geq a)\leq\frac{E(X)}{a}$.

How can we use that definition of Markov's inequality to derive a more general one:

Let $Y$ be a real random variable and $f:[0,\infty)\to[0,\infty)$ an increasing function. Then, for all $\epsilon>0$ with $f(\epsilon)>0$, $$\mathbb{P}(|Y|\geq\epsilon)\leq\frac{\mathbb{E}(f\circ|Y|)}{f(\epsilon)}$$

And some of my other questions are:
1. What are the purpose of introducing the function $f$?
2. Why $f$ has to be increasing?
3. How can we interpret $f(\epsilon)$?

Thanks!

$f$ being an increasing function, we have $\{|Y|\geq\epsilon\}=\{f\circ |Y|\geq f(\epsilon)\}$. Thus $P(|Y|\geq\epsilon)=P(f\circ |Y|\geq f(\epsilon))$. Then using the Markov inequality, $f\circ |Y|$ being non-negative: $$P(f\circ |Y|\geq f(\epsilon))\leq\frac{E(f\circ |Y|))}{f(\epsilon)}$$ So we have $$P(|Y|\geq\epsilon)\leq\frac{E(f\circ |Y|))}{f(\epsilon)}$$
The most classic example of this property is the Chebychev inequality, which corresponds to $Y=|X-E(X)|$ and $f(x)=x^2$. We get: $$P(|X-E(X)|\geq\epsilon)\leq \frac{Var(X)}{\epsilon^2}$$
So if we choose wisely the function $f$, we can get interesting inequalities.