the geometric mean
You ran a program on a new machine and it was 2 times faster on one test, 8 times faster on another. What is its 'typical' speedup? Your instinct says average them: (2 plus 8) over 2 is 5. But that ordinary average is the wrong tool for ratios, and it can flip the winner. The right tool for averaging speedup ratios is the geometric mean — and seeing why is one of the sharpest lessons in honest measurement.
The geometric mean of n numbers is the nth root of their product, not the sum divided by n. For two speedups of 2 and 8 it is the square root of (2 times 8), which is the square root of 16, which is 4 — not 5. The reason this is correct for ratios is symmetry: a speedup of 2 and a slowdown of 1/2 should cancel to 1, and the geometric mean of 2 and 1/2 is the square root of 1, which is 1 — exactly right, whereas the ordinary mean gives 1.25, wrongly claiming a net gain. Equivalently, the geometric mean is the average done in log-space: take the log of each ratio, average those, then exponentiate.
This is why SPEC and other benchmark suites summarize their per-program ratios with the geometric mean: it gives the same overall ranking no matter which machine you pick as the reference, so it cannot be tilted by choosing a convenient baseline. The arithmetic mean of ratios does not have that property and can be gamed. The honest caveat: the geometric mean is the right summary for normalized ratios, but it is not the right way to combine raw run times when programs run for very different durations — for total time you must add the actual seconds (weighting by how long each program runs), not average their ratios.
Two speedups, 2x and 8x. Arithmetic mean = (2+8)/2 = 5. Geometric mean = sqrt(2 x 8) = sqrt(16) = 4. Check the symmetry test: for speedups 2 and 1/2, geomean = sqrt(2 x 0.5) = sqrt(1) = 1 (correctly 'no net change'), while the arithmetic mean wrongly gives (2+0.5)/2 = 1.25.
For ratios, the geometric mean respects symmetry and is reference-independent; the arithmetic mean is not.
Use the geometric mean for normalized ratios, never the arithmetic mean. But to summarize actual run times (real seconds), add the times — do not average ratios — because a long program should count more than a short one.