Generalized mean

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

Definition

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:

\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

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

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

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

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

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

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

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.

Generalized f-mean

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.

Applications

Signal processing

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

External links

This article is issued from Wikipedia - version of the Saturday, November 14, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.