Lehmer mean

From HandWiki
Short description: Mathematic formula for deriving a mean

In mathematics, the Lehmer mean of a tuple x of positive real numbers, named after Derrick Henry Lehmer,[1] is defined as:

Lp(𝐱)=k=1nxkpk=1nxkp1.

The weighted Lehmer mean with respect to a tuple w of positive weights is defined as:

Lp,w(𝐱)=k=1nwkxkpk=1nwkxkp1.

The Lehmer mean is an alternative to power means for interpolating between minimum and maximum via arithmetic mean and harmonic mean.

Properties

The derivative of pLp(𝐱) is non-negative

pLp(𝐱)=(j=1nk=j+1n[xjxk][ln(xj)ln(xk)][xjxk]p1)(k=1nxkp1)2,

thus this function is monotonic and the inequality

pqLp(𝐱)Lq(𝐱)

holds.

The derivative of the weighted Lehmer mean is:

Lp,w(𝐱)p=(wxp1)(wxplnx)(wxp)(wxp1lnx)(wxp1)2

Special cases

  • limpLp(𝐱) is the minimum of the elements of 𝐱.
  • L0(𝐱) is the harmonic mean.
  • L12((x1,x2)) is the geometric mean of the two values x1 and x2.
  • L1(𝐱) is the arithmetic mean.
  • L2(𝐱) is the contraharmonic mean.
  • limpLp(𝐱) is the maximum of the elements of 𝐱.
    Sketch of a proof: Without loss of generality let x1,,xk be the values which equal the maximum. Then Lp(𝐱)=x1k+(xk+1x1)p++(xnx1)pk+(xk+1x1)p1++(xnx1)p1

Applications

Signal processing

Like a power mean, a Lehmer 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 Lehmer mean according to the following Haskell code.

lehmerSmooth :: Floating a => ([a] -> [a]) -> a -> [a] -> [a]
lehmerSmooth smooth p xs =
    zipWith (/)
            (smooth (map (**p) xs))
            (smooth (map (**(p-1)) xs))

Gonzalez and Woods call this a "contraharmonic mean filter" described for varying values of p (however, as above, the contraharmonic mean can refer to the specific case p=2). Their convention is to substitute p with the order of the filter Q:

f(x)=k=1nxkQ+1k=1nxkQ.

Q=0 is the arithmetic mean. Positive Q can reduce pepper noise and negative Q can reduce salt noise.[2]

See also

Notes

  1. ↑ P. S. Bullen. Handbook of means and their inequalities. Springer, 1987.
  2. ↑ Gonzalez, Rafael C.; Woods, Richard E. (2008). "Chapter 5 Image Restoration and Reconstruction". Digital Image Processing (3 ed.). Prentice Hall. ISBN 9780131687288. http://www.imageprocessingplace.com/DIP-3E/dip3e_main_page.htm.