Takes the reciprocal of the mean of the reciprocals, n ÷ Σ(1/x). It is the right average for rates: driving out at 40 km/h and back at 60 km/h gives an average speed of 48 km/h, not 50.
The harmonic mean averages the reciprocals of the values and then takes the reciprocal of that result.
It is the right average for rates — quantities of the form "so much per unit", such as speed or fuel economy.
You drive out at 40 km/h and return along the same road at 60 km/h. The average speed is not 50 km/h.
The average speed is 48 km/h. Check it with a 120 km leg: the trip out takes 3 hours, the return 2 hours, so 240 km in 5 hours, and .
You spend more time at the slower speed, which is why the answer falls below the naive 50.