# Weighted harmonic mean vs weighted geometric mean [duplicate]

Possible Duplicate:
Weighted geometric mean vs Weighted mean

I searched for the differences between WHM and WGM. When to use each of them? when not?

## 1 Answer

Both mean functions are so-called generalized mean: f_s = ( (x1^s + ... + xn^s)/n )^(1/s). For harmonic mean s=-1.0; for geometric mean s=0.0; In general, for smaller s values, the generalized mean will move closer to smaller values in {x1,...,xn}. Thus, the harmonic mean will give you a mean value that biases more towards smaller values. Notice that if s is -infinite or +infinite, the generalized mean will give the minimum or maximum value in your values.

• What if one of the values is zero ? – M.M Sep 28 '12 at 18:35
• @Mohammed: if they are not all positive, you should consider whether either a geometric or a harmonic mean is meaningful – Henry Sep 28 '12 at 20:00
• If your data is not all positive you can shift you data to positive range (ie. adding certain constants), then shift back after the mean operator. Actually, even all your data are positive you can consider shifting your data to appropriate range for what ever your purpose. – James LI Sep 28 '12 at 23:08