Intro Video

Saturday, August 22, 2020

Alternative to the Arithmetic, Geometric, and Harmonic Means

Given n observations x1, ..., xn, the generalized mean (also called power mean) is defined as 

The case p = 1 corresponds to the traditional arithmetic mean, while p = 0 yields the geometric mean, and p = -1 yields the harmonic mean. See here for details. This metric is favored by statisticians. It is a particular case of the quasi-arithmetic mean

Here I introduce another kind of mean called exponential mean, also based on a parameter p, that may have an appeal to data scientists and machine learning professionals. It is also a special case of the quasi-arithmetic mean. Though the concept is basic, there is very little if any literature about it. It is related to the LogSumExp and the Log semiring. It is defined as follows:

Here the logarithm is in base p, with p positive. When p tends to 0, mp is the minimum of the observations. When p tends to 1, it yields the classic arithmetic mean, and as p tends to infinity, it yields the maximum of the observations. 

I tested both means (exponential and power means) for various values of p ranging between 0 and 2. See above chart, where the X-axis represents the parameter p, and the Y-axis represents the mean. The test data set consists of 10 numbers randomly chosen between 0 and 1, with an average value of 0.53. Note that if p = 1, then mp = Mp = 0.53 is the standard arithmetic mean. 

The blue curve in the above chart is very well approximated by a logarithm function, except when p is very close to zero or p is extremely large. The red curve is well approximated by a second-degree polynomial. Convergence to the maximum of the observations (equal to 0.89 here), as p tends to infinity, occurs much faster with the power mean than with the exponential mean. Note that the minimum is 0.07, and the exponential mean will start approaching that value only when p is extremely close to zero.

Finally, the central limit theorem applies both to the power and exponential means, when the number n of observations becomes larger and larger.

from Featured Blog Posts - Data Science Central
via Gabe's MusingsGabe's Musings