For a nonempty finite list of real numbers , the arithmetic mean isIt is the weighted mean with equal weights, giving each observation equal influence. For , the sum is and the arithmetic mean is . Replacing every value by retains the same total. The residuals sum to zero, so the mean is also the balancing point of these equally weighted observations.
The arithmetic mean minimizes the sum of squared deviations by the weighted mean minimizes squared deviations identity with all weights one. A large input can consequently have a substantial effect: replacing by changes the mean to , while the median remains . The choice of summary depends on what aspect of the data matters.
The harmonic mean of a nonempty finite list of positive real numbers is the multiplicative inverse of the arithmetic mean of their inverses:For two inputs, . Replacing each input by preserves the sum of inverses, making it useful when a fixed amount divided by a rate determines a cost or duration. This positive-input definition avoids division by zero; negative inputs need not retain the usual averaging or ordering properties. [ref]
https://dlmf.nist.gov/1.2.iv. NIST Digital Library of Mathematical Functions, §1.2(iv), equation 1.2.19: harmonic mean
.Travel two legs of equal length at positive speeds , with no stops. Their travel times are and , so the average speed isFor two legs at and , the times are two hours and one hour. The average speed is . The same speeds maintained for one hour each instead cover in two hours, giving the arithmetic mean . A slower equal-distance leg occupies more time, so the data being averaged must include what is held equal. This is total distance traveled divided by elapsed time; a return journey can have zero average velocity while keeping a positive average speed. [ref]
https://undergroundmathematics.org/introducing-calculus/average-speed/averages. University of Cambridge, Underground Mathematics: equal-distance and equal-time speed averages
.The arithmetic-geometric mean inequality applied to the inverses gives ; together with it yields the comparison in geometric mean. For two inputs the arithmetic–harmonic gap has the exact formFor and the gap is five. With one positive input held fixed and another approaching zero, the harmonic mean approaches zero too: a very slow fixed-distance leg dominates the travel time. Unequal leg lengths instead require a weighted harmonic mean.
For positive real numbers and nonnegative weights with , the weighted harmonic mean isEqual weights give the harmonic mean, while a zero weight excludes that input. For travel at positive constant speeds over positive leg lengths , the weights are fractions of total distance:For at and at , the weights are , elapsed time is hours, and the average speed is . Weighting the speeds by their time fractions instead gives the same result as a weighted arithmetic mean: . The two weight systems describe the same journey in different coordinates and must not be interchanged. [ref].
