Lehmer mean

Mathematic formula for deriving a mean

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

L p ( x ) = k = 1 n x k p k = 1 n x k p 1 . {\displaystyle L_{p}(\mathbf {x} )={\frac {\sum _{k=1}^{n}x_{k}^{p}}{\sum _{k=1}^{n}x_{k}^{p-1}}}.}

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

L p , w ( x ) = k = 1 n w k x k p k = 1 n w k x k p 1 . {\displaystyle L_{p,w}(\mathbf {x} )={\frac {\sum _{k=1}^{n}w_{k}\cdot x_{k}^{p}}{\sum _{k=1}^{n}w_{k}\cdot x_{k}^{p-1}}}.}

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 p L p ( x ) {\displaystyle p\mapsto L_{p}(\mathbf {x} )} is non-negative

p L p ( x ) = ( j = 1 n k = j + 1 n [ x j x k ] [ ln ( x j ) ln ( x k ) ] [ x j x k ] p 1 ) ( k = 1 n x k p 1 ) 2 , {\displaystyle {\frac {\partial }{\partial p}}L_{p}(\mathbf {x} )={\frac {\left(\sum _{j=1}^{n}\sum _{k=j+1}^{n}\left[x_{j}-x_{k}\right]\cdot \left[\ln(x_{j})-\ln(x_{k})\right]\cdot \left[x_{j}\cdot x_{k}\right]^{p-1}\right)}{\left(\sum _{k=1}^{n}x_{k}^{p-1}\right)^{2}}},}

thus this function is monotonic and the inequality

p q L p ( x ) L q ( x ) {\displaystyle p\leq q\Longrightarrow L_{p}(\mathbf {x} )\leq L_{q}(\mathbf {x} )}

holds.

The derivative of the weighted Lehmer mean is:

L p , w ( x ) p = ( w x p 1 ) ( w x p ln x ) ( w x p ) ( w x p 1 ln x ) ( w x p 1 ) 2 {\displaystyle {\frac {\partial L_{p,w}(\mathbf {x} )}{\partial p}}={\frac {(\sum wx^{p-1})(\sum wx^{p}\ln {x})-(\sum wx^{p})(\sum wx^{p-1}\ln {x})}{(\sum wx^{p-1})^{2}}}}

Special cases

  • lim p L p ( x ) {\displaystyle \lim _{p\to -\infty }L_{p}(\mathbf {x} )} is the minimum of the elements of x {\displaystyle \mathbf {x} } .
  • L 0 ( x ) {\displaystyle L_{0}(\mathbf {x} )} is the harmonic mean.
  • L 1 2 ( ( x 1 , x 2 ) ) {\displaystyle L_{\frac {1}{2}}\left((x_{1},x_{2})\right)} is the geometric mean of the two values x 1 {\displaystyle x_{1}} and x 2 {\displaystyle x_{2}} .
  • L 1 ( x ) {\displaystyle L_{1}(\mathbf {x} )} is the arithmetic mean.
  • L 2 ( x ) {\displaystyle L_{2}(\mathbf {x} )} is the contraharmonic mean.
  • lim p L p ( x ) {\displaystyle \lim _{p\to \infty }L_{p}(\mathbf {x} )} is the maximum of the elements of x {\displaystyle \mathbf {x} } .
    Sketch of a proof: Without loss of generality let x 1 , , x k {\displaystyle x_{1},\dots ,x_{k}} be the values which equal the maximum. Then L p ( x ) = x 1 k + ( x k + 1 x 1 ) p + + ( x n x 1 ) p k + ( x k + 1 x 1 ) p 1 + + ( x n x 1 ) p 1 {\displaystyle L_{p}(\mathbf {x} )=x_{1}\cdot {\frac {k+\left({\frac {x_{k+1}}{x_{1}}}\right)^{p}+\cdots +\left({\frac {x_{n}}{x_{1}}}\right)^{p}}{k+\left({\frac {x_{k+1}}{x_{1}}}\right)^{p-1}+\cdots +\left({\frac {x_{n}}{x_{1}}}\right)^{p-1}}}}

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 {\displaystyle p} and emphasizes big signal values for big p {\displaystyle 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))
  • For big p {\displaystyle p} it can serve an envelope detector on a rectified signal.
  • For small p {\displaystyle p} it can serve an baseline detector on a mass spectrum.

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 {\displaystyle p=2} ). Their convention is to substitute p with the order of the filter Q:

f ( x ) = k = 1 n x k Q + 1 k = 1 n x k Q . {\displaystyle f(x)={\frac {\sum _{k=1}^{n}x_{k}^{Q+1}}{\sum _{k=1}^{n}x_{k}^{Q}}}.}

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.

External links

  • Lehmer Mean at MathWorld
  • v
  • t
  • e
Continuous data
Center
Dispersion
Shape
Count data
Summary tables
Dependence
Graphics
Study design
Survey methodology
Controlled experiments
Adaptive designs
Observational studies
Statistical theory
Frequentist inference
Point estimation
Interval estimation
Testing hypotheses
Parametric tests
Specific tests
  • Z-test (normal)
  • Student's t-test
  • F-test
Goodness of fit
Rank statistics
Bayesian inference
Correlation
Regression analysis
Linear regression
Non-standard predictors
Generalized linear model
Partition of variance
Categorical
Multivariate
Time-series
General
Specific tests
Time domain
Frequency domain
Survival
Survival function
Hazard function
Test
Biostatistics
Engineering statistics
Social statistics
Spatial statistics
  • Category
  • icon Mathematics portal
  • Commons
  • WikiProject