Generalized mean

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In mathematics, generalized means are a family of functions for aggregating sets of numbers, that include as special cases the Pythagorean means (arithmetic, geometric, and harmonic means). The generalized mean is also known as power mean or Hölder mean (named after Otto Hölder).


If p is a non-zero real number, and x_1,\dots,x_n are positive real numbers, then the generalized mean or power mean with exponent p of these positive real numbers is:

M_p(x_1,\dots,x_n) = \left( \frac{1}{n} \sum_{i=1}^n x_i^p \right)^{\frac{1}{p}} .

Note the relationship to the p-norm. For p = 0 we assume that it's equal to the geometric mean (which is, in fact, the limit of means with exponents approaching zero, as proved below for the general case):

M_0(x_1, \dots, x_n) = \sqrt[n]{\prod_{i=1}^n x_i}

Furthermore, for a sequence of positive weights wi with sum \sum w_i = 1 we define the weighted power mean as:

  M_p(x_1,\dots,x_n) &= \left(\sum_{i=1}^n w_i x_i^p \right)^{\frac{1}{p}} \\
  M_0(x_1,\dots,x_n) &= \prod_{i=1}^n x_i^{w_i}

The unweighted means correspond to setting all wi = 1/n. For exponents equal to positive or negative infinity the means are maximum and minimum, respectively, regardless of weights (and they are actually the limit points for exponents approaching the respective extremes, as proved below):

  M_{ \infty}(x_1, \dots, x_n) &= \max(x_1, \dots, x_n) \\
  M_{-\infty}(x_1, \dots, x_n) &= \min(x_1, \dots, x_n)


  • The generalized mean is a symmetric function of its arguments -- permuting the arguments of a generalized mean does not change its value.
  • Like most means, the generalized mean is a homogeneous function of its arguments x1, ..., xn. That is, if b is a positive real number, then the generalized mean with exponent p of the numbers b\cdot x_1,\dots, b\cdot x_n is equal to b times the generalized mean of the numbers x1, …, xn.
  • Like the quasi-arithmetic means, the computation of the mean can be split into computations of equal sized sub-blocks.
M_p(x_1, \dots, x_{n \cdot k}) = M_p(M_p(x_1, \dots, x_{k}), M_p(x_{k + 1}, \dots, x_{2 \cdot k}), \dots, M_p(x_{(n - 1) \cdot k + 1}, \dots, x_{n \cdot k}))

Generalized mean inequality[edit]

In general,

if p < q, then M_p(x_1,\dots,x_n) \le M_q(x_1,\dots,x_n)

and the two means are equal if and only if x1 = x2 = ... = xn.

The inequality is true for real values of p and q, as well as positive and negative infinity values.

It follows from the fact that, for all real p,

\frac{\partial}{\partial p}M_p(x_1, \dots, x_n) \geq 0

which can be proved using Jensen's inequality.

In particular, for p in {−1, 0, 1}, the generalized mean inequality implies the Pythagorean means inequality as well as the inequality of arithmetic and geometric means.

Special cases[edit]

A visual depiction of some of the specified cases for n=2 with a = x_1=M_{+\infty}, b = x_2=M_{-\infty}, harmonic mean H = M_{-1} = \frac{2}{\frac1a + \frac1b}, geometric mean G = M_0 = \sqrt{a\cdot b}, arithmetic mean A = M_1 = \frac{a+b}{2} and quadratic mean Q = M_2 = \sqrt{\frac{a^2+b^2}{2}}.
M_{-\infty}(x_1,\dots,x_n) = \lim_{p\to-\infty} M_p(x_1,\dots,x_n) = \min \{x_1,\dots,x_n\} minimum
M_{-1}(x_1,\dots,x_n) = \frac{n}{\frac{1}{x_1}+\dots+\frac{1}{x_n}} harmonic mean
M_0(x_1,\dots,x_n) = \lim_{p\to0} M_p(x_1,\dots,x_n) = \sqrt[n]{x_1\cdot\dots\cdot x_n} geometric mean
M_1(x_1,\dots,x_n) = \frac{x_1 + \dots + x_n}{n} arithmetic mean
M_2(x_1,\dots,x_n) = \sqrt{\frac{x_1^2 + \dots + x_n^2}{n}} quadratic mean
M_3(x_1,\dots,x_n) = \sqrt[3]{\frac{x_1^3 + \dots + x_n^3}{n}} cubic mean
M_{+\infty}(x_1,\dots,x_n) = \lim_{p\to\infty} M_p(x_1,\dots,x_n) = \max \{x_1,\dots,x_n\} maximum

Proof of power means inequality[edit]

We will prove weighted power means inequality, for the purpose of the proof we will assume the following without loss of generality:

  w_i \in [0; 1] \\
  \sum_{i=1}^nw_i = 1

Proof for unweighted power means is easily obtained by substituting wi = 1/n.

Equivalence of inequalities between means of opposite signs[edit]

Suppose an average between power means with exponents p and q holds:

\sqrt[p]{\sum_{i=1}^nw_ix_i^p}\geq \sqrt[q]{\sum_{i=1}^nw_ix_i^q}

applying this, then:

\sqrt[p]{\sum_{i=1}^n\frac{w_i}{x_i^p}}\geq \sqrt[q]{\sum_{i=1}^n\frac{w_i}{x_i^q}}

We raise both sides to the power of −1 (strictly decreasing function in positive reals):

\sqrt[-p]{\sum_{i=1}^nw_ix_i^{-p}}=\sqrt[p]{\frac{1}{\sum_{i=1}^nw_i\frac{1}{x_i^p}}}\leq \sqrt[q]{\frac{1}{\sum_{i=1}^nw_i\frac{1}{x_i^q}}}=\sqrt[-q]{\sum_{i=1}^nw_ix_i^{-q}}

We get the inequality for means with exponents −p and −q, and we can use the same reasoning backwards, thus proving the inequalities to be equivalent, which will be used in some of the later proofs.

Geometric mean[edit]

For any q > 0, and non-negative weights summing to 1, the following inequality holds

          \sqrt[-q]{\sum_{i=1}^nw_ix_i^{-q}} &\leq\prod_{i=1}^nx_i^{w_i} &\leq \sqrt[q]{\sum_{i=1}^nw_ix_i^q} \\

The proof is as follows. From Jensen's inequality, making use of the fact the logarithmic function is concave:

  \log \left(\prod_{i=1}^nx_i^{w_i} \right) = \sum_{i=1}^nw_i\log(x_i) &\leq \log\left( \sum_{i=1}^nw_ix_i \right) \\

By applying the exponential function to both sides and observing that as a strictly increasing function it preserves the sign of the inequality, we get

\prod_{i=1}^nx_i^{w_i} \leq \sum_{i=1}^nw_ix_i

and taking qth powers of the xi, we are done for the inequality with positive q, and the case for negatives is identical.

Inequality between any two power means[edit]

We are to prove that for any p < q the following inequality holds:

\sqrt[p]{\sum_{i=1}^nw_ix_i^p}\leq \sqrt[q]{\sum_{i=1}^nw_ix_i^q}

if p is negative, and q is positive, the inequality is equivalent to the one proved above:

\sqrt[p]{\sum_{i=1}^nw_ix_i^p}\leq \prod_{i=1}^nx_i^{w_i} \leq\sqrt[q]{\sum_{i=1}^nw_ix_i^q}

The proof for positive p and q is as follows: Define the following function: f : R+R+ f(x)=x^{\frac{q}{p}}. f is a power function, so it does have a second derivative:

f''(x) = \left(\frac{q}{p} \right) \left( \frac{q}{p}-1 \right)x^{\frac{q}{p}-2}

which is strictly positive within the domain of f, since q > p, so we know f is convex.

Using this, and the Jensen's inequality we get:

     f \left( \sum_{i=1}^nw_ix_i^p \right) &\leq \sum_{i=1}^nw_if(x_i^p) \\
  \sqrt[\frac{p}{q}]{\sum_{i=1}^nw_ix_i^p} &\leq \sum_{i=1}^nw_ix_i^q

after raising both side to the power of 1/q (an increasing function, since 1/q is positive) we get the inequality which was to be proven:


Using the previously shown equivalence we can prove the inequality for negative p and q by substituting them with, respectively, −q and −p, QED.

Generalized f-mean[edit]

Main article: Generalized ƒ-mean

The power mean could be generalized further to the generalized f-mean:

 M_f(x_1,\dots,x_n) = f^{-1} \left({\frac{1}{n}\cdot\sum_{i=1}^n{f(x_i)}}\right)

This covers the geometric mean without using a limit with f(x) = log(x). The power mean is obtained for f(x) = xp.


Signal processing[edit]

A power mean serves a non-linear moving average which is shifted towards small signal values for small p and emphasizes big signal values for big p. Given an efficient implementation of a moving arithmetic mean called smooth one can implement a moving power mean according to the following Haskell code.

 powerSmooth :: Floating a => ([a] -> [a]) -> a -> [a] -> [a]
 powerSmooth smooth p = map (** recip p) . smooth . map (**p)

See also[edit]

External links[edit]