Nothing Special   »   [go: up one dir, main page]

Geometric mean: Difference between revisions

Content deleted Content added
m lk Ratio scale
Sheddow (talk | contribs)
Taking the geometric mean of negative numbers might not make sense in general, so this formula could probably be removed
Line 60:
additionally, if negative values of the <math>a_i</math> are allowed,
: <math>\left( \prod_{i=1}^n a_i \right)^\frac{1}{n} = \left(\left(-1\right)^m\right)^\frac{1}{n} \exp\left[\frac{1}{n}\sum_{i=1}^n \ln \left|a_i\right| \right],</math>
where {{math|''m''}} is the number of negative numbers.{{Dubious|reason=This formula returns a complex number when m is odd, and it is unclear if the geometric mean of negative numbers even makes sense}}
where {{math|''m''}} is the number of negative numbers. Please take note that this formula can produce POSITIVE geometric mean value for a set of ALL NEGATIVE numbers, so this formula is not reliable. A single negative value, eg -1, on a set of n numbers, where n is an odd number, will negate the calculated geometric mean regardless of how huge the range of positive values are, which does not make sense. It does not make sense that the formula's usefulness depends on the number of input values, ie n and m, and will not work when m is odd and n is even.
 
This is sometimes called the '''log-average''' (not to be confused with the [[logarithmic average]]). It is simply computing the [[arithmetic mean]] of the logarithm-transformed values of <math>a_i</math> (i.e., the arithmetic mean on the log scale) and then using the exponentiation to return the computation to the original scale, i.e., it is the [[generalised f-mean]] with <math>f(x) = \log x</math>. For example, the geometric mean of 2 and 8 can be calculated as the following, where <math>b</math> is any base of a [[logarithm]] (commonly 2, [[e (mathematical constant)|<math>e</math>]] or 10):