Where a, b, c, . are the values, and n is how many values.
The reciprocals of 1, 2 and 4 are:
11 = 1, 12 = 0.5, 14 = 0.25
Now add them up:
1 + 0.5 + 0.25 = 1.75
Divide by how many:
Average = 1.753
The reciprocal of that average is our answer:
Harmonic Mean = 31.75 = 1.714 (to 3 places)
In some rate type questions the harmonic mean gives the true answer!
Harmonic mean = 2/( 160 + 120 ) = 30 km/h
Check: the 10 km at 60 km/h takes 10 minutes, the 10 km at 20 km/h takes 30 minutes, so the total 20 km takes 40 minutes, which is 30 km per hour
The harmonic mean is also good at handling large outliers.
The arithmetic mean is 2+4+6+1004 = 28
The harmonic mean is 4/( 12 + 14 + 16 + 1100 ) = 4.32 (to 2 places)
But small outliers will make things worse!
We can rearrange the formula above to look like this:
It is not easy to use this way, but it does look more "balanced" (n on one side matched with n 1s on the other, and the mean on one side matched with the values on the other side too).