Generalized mean

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

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

Definition[edit]

If p is a non-zero real number, we can define the generalised mean or power mean with exponent p of the positive real numbers x_1,\dots,x_n as:

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:

\begin{align}
  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}
\end{align}

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):

\begin{align}
  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)
\end{align}

Properties[edit]

  • 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.
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, a.k.a. root mean square
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:

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

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

\begin{align}
          \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} \\
  
\end{align}

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

\begin{align}
  \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) \\
\end{align}

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:

\begin{align}
     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
\end{align}

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:

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

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

Integer powers[edit]

While the proof given above holds for all powers, we may give a proof relying on induction when the power is an integer without aid from the tools of calculus. We prove the power means inequality for powers which are positive integers (the same inequality follows for negative integers by applying the inequality to reciprocals of the original numbers). Let x_{1},\dots,x_{n} be positive real numbers, w_{1},\dots,w_{n} be non-negative weights that add up to one, and let k be a positive integer. First note that by the Cauchy-Schwarz inequality,


  \frac{\sum_{i=1}^{n}w_{i}x_{i}^{k}}{\sum_{i=1}^{n}w_{i}x_{i}^{k-1}}\leq
  \frac{\sum_{i=1}^{n}w_{i}x_{i}^{k+1}}{\sum_{i=1}^{n}w_{i}x_{i}^{k}},

with equality if and only if all the x_{i}'s are equal. The expression on the left hand side is known as the weighted Lehmer mean and is denoted by L_{k,w}(x). Thus the above inequality can be written as L_{k,w}(x)\leq L_{k+1,w}(x).

Our aim is to show


  \left(\sum_{i=1}^{n}w_{i}x_{i}^{k}\right)^\frac{1}{k}
  \leq \left(\sum_{i=1}^{n}w_{i}x_{i}^{k+1}\right)^\frac{1}{k+1}.

Note that for k=1 this inequality follows easily from Cauchy-Schwarz since


  \left(\sum_{i=1}^{n}w_{i}x_{i}\right)^{2}
  \leq \left(\sum_{i=1}^{n}w_{i}\right)\left(\sum_{i=1}^{n}w_{i}x_{i}^{2}\right).

Now suppose the inequality is true for a particular k. Thus


  \left(\sum_{i=1}^{n}w_{i}x_{i}^{k}\right)^\frac{1}{k}
  \leq \left(\sum_{i=1}^{n}w_{i}x_{i}^{k+1}\right)^\frac{1}{k+1}.

Raising both sides to the k(k+1)th power and simplifying results in


  \sum_{i=1}^{n}w_{i}x_{i}^{k}\leq
  \left(\frac{\sum_{i=1}^{n}w_{i}x_{i}^{k+1}}
  {\sum_{i=1}^{n}w_{i}x_{i}^{k}}\right)^{k}.

Multiplying both sides by L_{k+1,w}(x) we get


  \sum_{i=1}^{n}w_{i}x_{i}^{k+1}\leq
  \left(\frac{\sum_{i=1}^{n}w_{i}x_{i}^{k+1}}
  {\sum_{i=1}^{n}w_{i}x_{i}^{k}}\right)^{k+1}.

Now using the fact that

L_{k+1,w}(x)\leq L_{k+2,w}(x)

we get


  \sum_{i=1}^{n}w_{i}x_{i}^{k+1}\leq
  \left(\frac{\sum_{i=1}^{n}w_{i}x_{i}^{k+2}}
  {\sum_{i=1}^{n}w_{i}x_{i}^{k+1}}\right)^{k+1},

which can be simplified to get the power means inequality for k+1, i.e.,


  \left(\sum_{i=1}^{n}w_{i}x_{i}^{k+1}\right)^\frac{1}{k+1}
  \leq \left(\sum_{i=1}^{n}w_{i}x_{i}^{k+2}\right)^\frac{1}{k+2}.

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)

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

Applications[edit]

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 you 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]