What is Harmonic mean?
The reciprocal of the mean of reciprocals, used to average rates over equal amounts of work.
Japanese name: 調和平均
The reciprocal of the mean of reciprocals, used to average rates over equal amounts of work.
Japanese name: 調和平均
The harmonic mean is obtained by taking the reciprocal of each value, averaging the reciprocals arithmetically and taking the reciprocal once more. For n values, n is divided by the sum of the reciprocals. The harmonic mean of 40 and 60 is 2 ÷ (1/40 + 1/60) = 48. It is smaller than the arithmetic mean of 50 and is pulled toward the smaller value. For positive values, the harmonic mean is no greater than the geometric mean, which is no greater than the arithmetic mean.
Suppose the same route is driven at 60 km/h on the way out and 40 km/h on the way back. If one way is 120 km, the outward trip takes 2 hours and the return takes 3 hours. The round trip of 240 km took 5 hours, so the overall average is 48 km/h. This equals the harmonic mean of the two speeds. The slower leg occupies more of the time, so the average leans toward the slower speed. In computing, the average of programs with the same instruction count run at different MIPS rates is found in the same way.
The plain harmonic mean applies when the same amount of work is done at each rate. When the amounts differ, a harmonic mean weighted by the amount of work is used. If instead the same length of time is spent at each rate, the arithmetic mean is the correct average. Whichever mean is used, checking that it matches total work divided by total time guards against mistakes. To combine run times themselves, the arithmetic mean or the sum is used.
Answer: C. About 667 MIPS
With I instructions each, the times are and , totaling . Executing 2I instructions in that time gives an average rate ofMIPS. The slower program takes longer, pulling the average toward the slower rate. When averaging rates over equal amounts of work, use the harmonic mean, not the arithmetic mean.
Because it does not account correctly for the longer time taken by the slower work. Running the same number of instructions at 1000 MIPS and at 500 MIPS gives an average of about 667 MIPS, not 750 MIPS.
When the values are spread widely. For 10 and 1000 the arithmetic mean is 505, but the harmonic mean is about 19.8. A single extremely slow piece of work strongly governs the overall average rate.
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.