Weighted geometric mean

In statistics, the weighted geometric mean is a generalization of the geometric mean using the weighted arithmetic mean.

Given a sample $$x=(x_1,x_2\dots,x_n)$$ and weights $$w=(w_1, w_2,\dots,w_n)$$, it is calculated as:


 * $$ \bar{x} = \left(\prod_{i=1}^n x_i^{w_i}\right)^{1 / \sum_{i=1}^n w_i} = \quad \exp \left( \frac{\sum_{i=1}^n w_i \ln x_i}{\sum_{i=1}^n w_i \quad} \right) $$

The second form above illustrates that the logarithm of the geometric mean is the weighted arithmetic mean of the logarithms of the individual values. If all the weights are equal, the weighted geometric mean simplifies to the ordinary unweighted geometric mean.