Drive 120 kilometres out at 60 km/h and the same 120 back at 40 km/h. The obvious average is 50. The real one is 48, and the reason is that speeds are a rate, and rates do not average the way quantities do.
average speed = total distance ÷ total time
The outward leg takes 2 hours and the return takes 3. That is 240 kilometres in 5 hours, and the average speed calculator gives 48.00 km/h. A genuine 50 km/h average over 240 kilometres would have taken 4.80 hours, or 4 hours 48 minutes, which is twelve minutes less than the trip took.
Why the slow leg wins
The two legs cover equal distance but not equal time. You spend 3 hours at 40 km/h and only 2 at 60, so the slow speed gets 60 per cent of the weighting in any honest average. The arithmetic mean treats them as equals, and they are not equals.
This is what a harmonic mean is for. When the quantity being averaged is a rate measured over a fixed amount of its denominator, the correct average is the total over the total rather than the mean of the parts.
The effect always drags downward, and it gets worse as the two speeds diverge. Equal legs at 60 and 40 give 48. At 90 and 10 the arithmetic mean says 50 and the real figure is 18, because the slow leg now dominates the clock almost entirely.
The same shape in other units
Fuel economy quoted in miles per gallon has exactly this problem, which is why averaging the mpg of two cars in a fleet gives the wrong fleet figure, and why litres per 100 kilometres behaves better: it inverts the rate so that the denominator is distance, which is the thing held fixed.
Prices behave this way too. Buying $100 of something every month rather than a fixed number of units gives you a harmonic mean of the price, which is slightly below the arithmetic mean, and that gap is the entire mathematical basis for the claim that regular fixed-value investing beats buying a fixed quantity.
When the arithmetic mean is right
If you drive for one hour at 60 and one hour at 40, the average really is 50, because now the equal amounts are of time rather than distance. The rule is to check what is being held constant: equal times make the arithmetic mean correct, and equal distances make it wrong.
That is the part worth carrying away, because the two problems are told in almost identical words and have different answers. The safest approach is to not average rates at all, and instead to add up the distances, add up the times, and divide once at the end.
For the related reason that going faster saves less than expected, there is why speeding saves less time than you think, and mean against median covers the other common way an average misrepresents what it summarises.