#jsDisabledContent { display:none; } My Account | Register | Help

# Generalized mean

Article Id: WHEBN0000013143
Reproduction Date:

 Title: Generalized mean Author: World Heritage Encyclopedia Language: English Subject: Collection: Publisher: World Heritage Encyclopedia Publication Date:

### Generalized mean

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

## Contents

• Definition 1
• Properties 2
• Generalized mean inequality 2.1
• Special cases 3
• Proof of power means inequality 4
• Equivalence of inequalities between means of opposite signs 4.1
• Geometric mean 4.2
• Inequality between any two power means 4.3
• Generalized f-mean 5
• Applications 6
• Signal processing 6.1

## Definition

If p is a non-zero real number, we can define the generalized 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

• 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

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

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

Simulium appGeometric 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

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

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