# Statistics/Summary/Averages/Geometric Mean

< Statistics‎ | Summary‎ | Averages

### Geometric Mean

The Geometric Mean is calculated by taking the nth root of the product of a set of data.

$\tilde{x}=\sqrt[n\;]{\prod_{i=1}^n x_i}$

For example, if the set of data was:

1,2,3,4,5

The geometric mean would be calculated:

$\sqrt[5]{ 1 \times 2 \times 3 \times 4 \times 5} = \sqrt[5]{120} = 2.61$

Of course, with large n this can be difficult to calculate. Taking advantage of two properties of the logarithm:

$\log(a\cdot b) = \log(a) + \log(b)$

$\log( a^n ) = n \cdot \log( a )$

We find that by taking the logarithmic transformation of the geometric mean, we get:

$\log\left(\sqrt[n]{ x_1 \times x_2 \times x_3 \cdots x_n}\right) = \frac{1}{n} \sum_{i=1}^n\log(x_i)$

Which leads us to the equation for the geometric mean:

$\tilde{x}= \exp \left( \frac{1}{n} \sum_{i=1}^n\log(x_i) \right)$

### When to use the geometric mean

The arithmetic mean is relevant at any time several quantities add together to produce a total. The arithmetic mean answers the question, "if all the quantities had the same value, what would that value have to be in order to achieve the same total?"

In the same way, the geometric mean is relevant any time several quantities multiply together to produce a product. The geometric mean answers the question, "if all the quantities had the same value, what would that value have to be in order to achieve the same product?"

For example, suppose you have an investment which returns 10% the first year, 50% the second year, and 30% the third year. What is its average rate of return? It is not the arithmetic mean, because what these numbers mean is that on the first year your investment was multiplied (not added to) by 1.10, on the second year it was multiplied by 1.50, and the third year it was multiplied by 1.30. The relevant quantity is the geometric mean of these three numbers.

It is known that the geometric mean is always less than or equal to the arithmetic mean (equality holding only when A=B). The proof of this is quite short and follows from the fact that $(\sqrt A-\sqrt B)^2$ is always a non-negative number. This inequality can be surprisingly powerful though and comes up from time to time in the proofs of theorems in calculus. Source.