Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Geometric mean
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==={{anchor|Log-average}}Formulation using logarithms ===<!--"Log-average" redirects here--> The geometric mean can also be expressed as the exponential of the arithmetic mean of logarithms.<ref>{{cite book |title=Statistics: An Introduction using R |first=Michael J. |last=Crawley |publisher=John Wiley & Sons Ltd. |year=2005 |isbn=9780470022986 }}</ref> By using [[logarithmic identities]] to transform the formula, the multiplications can be expressed as a sum and the power as a multiplication: When <math>a_1, a_2, \dots, a_n > 0</math> : <math>\biggl( \prod_{i=1}^n a_i \biggr)^\frac{1}{n} = \exp\biggl(\frac{1}{n} \sum_{i=1}^n \ln a_i\biggr),</math> since <math>\textstyle \vphantom\Big| \ln \sqrt[n]{a_1a_2\cdots a_n \vphantom{t}} = \frac1n\ln(a_1a_2\cdots a_n) = \frac1n(\ln a_1 + \ln a_2 + \cdots + \ln a_n). </math> This is sometimes called the '''log-average''' (not to be confused with the [[logarithmic average]]). It is simply the [[arithmetic mean]] of the logarithm-transformed values of <math>a_i</math> (i.e., the arithmetic mean on the log scale), using the exponentiation to return to the original scale, i.e., it is the [[generalised f-mean|generalized f-mean]] with <math>f(x) = \log x</math>. A logarithm of any base can be used in place of the natural logarithm. For example, the geometric mean of {{tmath|1}}, {{tmath|2}}, {{tmath|8}}, and {{tmath|16}} can be calculated using logarithms base 2: :<math>\sqrt[4]{1 \cdot 2 \cdot 8 \cdot 16} = 2^{(\log_2\! 1 \,+\, \log_2\!2 \,+\, \log_2\!8 \,+\, \log_2\!16)/4} = 2^{(0 \,+\, 1 \,+\, 3 \,+\, 4)/4} = 2^2 = 4.</math> Related to the above, it can be seen that for a given sample of points <math>a_1, \ldots, a_n</math>, the geometric mean is the minimizer of :<math>f(a) = \sum_{i=1}^n (\log a_i - \log a )^2 = \sum_{i=1}^n \left(\log \frac{a_i}{a} \right)^2</math>, whereas the arithmetic mean is the minimizer of :<math>f(a) = \sum_{i=1}^n (a_i - a)^2</math>. Thus, the geometric mean provides a summary of the samples whose exponent best matches the exponents of the samples (in the least squares sense). In computer implementations, naïvely multiplying many numbers together can cause [[arithmetic overflow]] or [[arithmetic underflow|underflow]]. Calculating the geometric mean using logarithms is one way to avoid this problem.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)