Harmonic Mean
Equal-distance average speed, F1-score, parallel resistance, and HM ≤ GM ≤ AM.
To see the pattern behind the harmonic mean, write two positive numbers as
Same numerator, different denominators: both fractions have on top, while and are the denominators. Any positive can be written this way: choose , then set and .
Keep the shared numerator and average the denominators:
Since and , this is exactly the reciprocal of the arithmetic mean of the reciprocals:
Driving there and back
Drive a distance at speed , then return the same distance at speed . Same numerator, different denominators: the two speeds are and . Both legs cover the same distance , but take different times. Average speed is total distance divided by total time:
For example, drive 60 km out at 30 km/h and 60 km back at 60 km/h. The legs take 2 hours and 1 hour, so the average speed is km/h, not km/h. You spend more time at the slower speed. The arithmetic mean would apply to equal times, not equal distances.
The upside-down trick. Arithmetic averaging works when the rates refer to equal amounts of their denominator: km/h for equal times. Here the equal quantity is distance, so flip the rates to h/km (time per distance), average arithmetically, then flip back. At 30 and 60 km/h, each kilometre takes 2 and 1 minutes respectively. Their arithmetic mean is 1.5 min/km; turning that upside down gives km/h. The harmonic mean is just an arithmetic mean upside down: reciprocate, average, reciprocate.
F1-score
Precision and recall measure a classifier’s positive predictions:
where TP, FP, and FN count true positives, false positives, and false negatives. Same numerator, different denominators: both ratios count the same true positives. Precision divides by all predicted positives; recall divides by all actual positives.
Their harmonic mean is the F1-score:
For example, with 30 true positives, 10 false positives, and 30 false negatives, and . Thus , below the arithmetic mean : a high precision cannot fully make up for a low recall, or vice versa.
The shared numerator makes the upside-down trick explicit: average , then reciprocate. F1 gives precision and recall equal weight. This is a choice of metric, not a rule that every pair of ratios with a shared numerator must be averaged harmonically.
The reciprocal derivation assumes . If either is zero, F1 is zero whenever ; if all three counts are zero, the score is undefined unless a convention is specified.
Parallel resistance
Two positive resistances and connected in parallel have the same voltage across them. By Ohm’s law,
Same numerator, different denominators: both ratios have the same voltage on top, but the branch currents and differ.
The currents add, so the equivalent resistance is
The equivalent resistance is half the harmonic mean, not the harmonic mean itself:
Dividing the shared voltage by the average branch current gives ; dividing it by the total current gives .
For example, put 6 Ω and 3 Ω resistors in parallel across 12 V. The branch currents are 2 A and 4 A, so Ω, while their harmonic mean is Ω.
Harmonic, geometric, and arithmetic means
For , let and . Then
Short proof of AM–GM. Since a square is nonnegative,
Also, , giving the full chain. Equality in either inequality holds exactly when .
Geometric proof (Thales and similar triangles). Draw a semicircle with diameter . Choose on the diameter with and , and let the perpendicular through meet the semicircle at .
Let be the centre. By Thales’ theorem, . The right triangles and are similar, so
This height cannot exceed the semicircle’s radius , hence . Equality holds exactly when is the centre, that is, .