# Weighted geometric mean

In statistics, given a set of data,

${\displaystyle X=\{x_{1},x_{2}\dots ,x_{n}\}}$

and corresponding weights,

${\displaystyle W=\{w_{1},w_{2},\dots ,w_{n}\}}$

the weighted geometric mean is calculated as

${\displaystyle {\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)}$

Note that if all the weights are equal, the weighted geometric mean is the same as the geometric mean.

Weighted versions of other means can also be calculated. Probably the best known weighted mean is the weighted arithmetic mean, usually simply called the weighted mean. Another example of a weighted mean is the weighted harmonic mean.

The second form above illustrates that the logarithm of the geometric mean is the weighted arithmetic mean of the logarithms of the individual values.