How do you work this out?: There’s two (different) distances and two average speeds of two parts of a journey. How do you get the average of the whole journey?

Example data:
part 1: distance 17.9 miles, average speed 18.6 mph
part 2: distance 28.1 miles, average speed 17 mph
(I can also get the travelling time of each part if that’s necessary but I’m hoping that’s enough?)

This may well be easy but I can’t get my head round it right now. Thanks.

Mittineague, no I meant, must I use the travelling times.

But re-reading, I get it now, sorry. I work out the travelling times from the average time and distance. The travelling times aren’t needed as further input but can be worked out. I thought, to start with, TechnoBear was saying the travelling times are needed to be supplied.

Let’s have an example - I drive 100 miles at 100mph (which takes 1 hour), and 1 mile at 50mph (which takes 0.02 hour) … the total journey is 101 miles in 1.02 hours, which is 99mph.

But if you just add the averages and divide by 2, I get an average of 75mph. The reason for this difference is that the two numbers are not equally weighted. The ‘100mph’ element is much more important than the ‘50mph’ element, because it apples to 100 times the distance. But the calculation you suggested treats the two equally.

But the calculation you suggested treats the two equally.

No, I know you can’t add the two averages together. The issue I was talking about is working out the answer I’m after just from the two distances and the two averages – rather than having to supply as input, from an external source, the times of the two journeys. And that’s what TechnoBearLife’s solution does. I misread/misunderstood it to start with. I thought he was saying the times of the journey should be supplied. But they can be worked out from the supplied info (the two distances and the two averages). So that’s great.