Why is $ \left( \frac1n \sum_{i=1}^n x_i^{p+1} \right) \geq \left( \frac1n \sum_{i=1}^n x_i \right)^{p+1} $ true? Let us suppose that $0 \leq p \leq 1$. All variables are assumed to be non-negative.

The function $x \mapsto x^{p+1}$ is strictly convex upwards, so $$ \left( \frac1n \sum_{i=1}^n x_i^{p+1} \right) \geq \left( \frac1n \sum_{i=1}^n x_i \right)^{p+1} $$ with equality iff the $x_i$ are
  all equal; while $x \mapsto x^p$ is convex downwards, so $$ \left( \frac1n \sum_{i=1}^n x_i^p \right) \leq \left( \frac1n \sum_{i=1}^n x_i \right)^p $$ with equality if the $x_i$ are all equal.

I am not really sure why this is the case. Can anyone explain this more? I try to follow from the definition of convex/concave functions, but it's not working out.

Check out Jensen's inequality. For a convex function $f$ we have
$$f\left(\frac{x_1 + \dots + x_n}{n}\right) \le \frac{f(x_1) + \dots + f(x_n)}{n}$$
and the inequality sign is reversed for concave functions.
