[Math] Arithmetic mean vs Harmonic mean

means

I am reading about Arithmetic mean and Harmonic mean. From wikipedia
I got this comparision about them:

In certain situations, especially many situations involving rates and ratios, the harmonic mean provides the truest average. For instance, if a vehicle travels a certain distance at a speed x (e.g., 60 kilometres per hour –
km
/
h
) and then the same distance again at a speed y (e.g., 40
km
/
h
), then its average speed is the harmonic mean of x and y (48
km
/
h
), and its total travel time is the same as if it had traveled the whole distance at that average speed. However, if the vehicle travels for a certain amount of time at a speed x and then the same amount of time at a speed y, then its average speed is the arithmetic mean of x and y, which in the above example is 50 kilometres per hour. The same principle applies to more than two segments: given a series of sub-trips at different speeds, if each sub-trip covers the same distance, then the average speed is the harmonic mean of all the sub-trip speeds; and if each sub-trip takes the same amount of time, then the average speed is the arithmetic mean of all the sub-trip speeds.

                    distance      time    velocity    remark
1st section           d/2          t1       60               
2nd section           d/2          t2       40
1st + 2nd section      d        (t1+t2)      v        use harmonic mean to calculate v

1st section            d1         t/2       60               
2nd section            d2         t/2       40
1st + 2nd section    d1+d2         t         v        use arithmetic mean to calculate v

How distance and time are pushing us to compute harmonic mean and arithmetic mean respectively for computing "average v" in this case?

Best Answer

What's going on is that you can define how fast a vehicle is moving either in terms of km per hour or in hours per km (speed or inverse-speed).

Now in this case the correct one to use is hours per km, because it is the number of km that is constant and the number of hours that changes: in both segments it covers the same distance. So you should average the inverse-speeds of the segments to get the overall inverse-speed - doing this and converting back into speed is exactly the harmonic mean.

If the vehicle spends the same time on each segment, speed is the right measure to use, and you should just average the speeds in the normal manner.