In mathematics, the harmonic mean (sometimes called the subcontrary mean) is one of several kinds of average. Typically, it is appropriate for situations when the average of rates is desired.

The harmonic mean H of the positive real numbersx1, x2, ..., xn > 0 is defined to be

Equivalently, the harmonic mean is the reciprocal of the arithmetic mean of the reciprocals. From the third formula in the above equation it is more apparent that the harmonic mean is related to the arithmetic and geometric means.

Contents

Relationship with other means

The harmonic mean is one of the three Pythagorean means. For all positive data sets containing at least one pair of nonequal values, the harmonic mean is always the least of the three means, while the arithmetic mean is always the greatest of the three and the geometric mean is always in between. (If all values in a nonempty dataset are equal, the three means are always equal to one another; e.g. the harmonic, geometric, and arithmetic means of {2, 2, 2} are all 2.)

Since the harmonic mean of a list of numbers tends strongly toward the least elements of the list, it tends (compared to the arithmetic mean) to mitigate the impact of large outliers and aggravate the impact of small ones.

The arithmetic mean is often mistakenly used in places calling for the harmonic mean.[1] In the speed example below for instance the arithmetic mean 50 is incorrect, and too big.

The harmonic mean is related to the other Pythagorean means, as seen in the third formula in the above equation. This is noticed if we interpret the denominator to be the arithmetic mean of the product of numbers n times but each time we omit the jth term. That is, for the first term we multiply all n numbers but omit the first, for the second we multiply all n numbers but omit the second and so on. The numerator, excluding the n, which goes with the arithmetic mean, is the geometric mean to the power n. Thus the nth harmonic mean is related to the nth geometric and arithmetic means.

Weighted harmonic mean

If a set of weightsw1, ..., wn is associated to the dataset x1, ..., xn, the weighted harmonic mean is defined by