# Using harmonic means to average rates

Suppose a car travels at 60 km per hour (km/hr) from point A to point B and at 40 km per hour going from B to A going over exactly the same route. We wish to find the average speed over the course of the entire journey from A back to A.

You might think the answer is 50 km/hr (=60+40/2) but in fact this is untrue because it fails to take into account that the car spends longer going at the slower speed which in this case means the car spends 1.5 times longer at 40 km/hr than at 60 km/hr. The average is therefore 0.6 x 40 + 0.4 x 60 = 48 km/hr.

In fact it turns that the average speed is equal to the harmonic mean. In the above example the harmonic mean = $$\frac{2}{\frac{1}{60} +\frac{1}{40}} = 48$$ So, the harmonic mean is more accurate than the arithmetic mean in averaging speeds.

Similarly, in analysis of variance, it is often the case that we wish to regard two groups as *equally* important in our analysis. Often by sheer bad luck or poor sampling we end up with two groups of unequal sizes. The arithmetic mean gives more weight to the higher sized group. The Harmonic mean tries to redress the balance and give equal weight to the smaller sample sizes.