In mathematics, the harmonic mean is a kind of average, one of the Pythagorean means. It is sometimes used for ratios and rates such as speeds, and is normally used for positive arguments only. The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the numbers, that is, the generalized f-mean with f(x)=1x. For example, the harmonic mean of 1, 4, and 4 is (1−1+4−1+4−13)−1=311+14+14=364=332=2.
Definition The harmonic mean H of the positive real numbers x1,x2,…,xn isH(x1,x2,…,xn)=n1x1+1x2+⋯+1xn=n∑i=1n1xi.It is the reciprocal of the arithmetic mean of the reciprocals, and vice versa:H(x1,x2,…,xn)=1A(1x1,1x2,…,1xn),A(x1,x2,…,xn)=1H(1x1,1x2,…,1xn),where the arithmetic mean is A(x1,x2,…,xn)=1n∑i=1nxi. The harmonic mean is a Schur-concave function. It is greater than or equal to the minimum of its arguments: for positive arguments, min(x1,…,xn)≤H(x1,…,xn)≤nmin(x1,…,xn). Indeed, if m=min(x1,…,xn), then ∑i=1n1/xi≤n/m, while ∑i=1n1/xi≥1/m, which gives the two inequalities from the definition above. Thus, the harmonic mean cannot be made arbitrarily large by changing some values to bigger ones while having at least one value unchanged. The harmonic mean is also concave for positive arguments, an even stronger property than Schur-concavity.
Relationship with other means
For all positive data sets containing at least one pair of nonequal values, the harmonic mean is always the least of the three Pythagorean 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 data set are equal, the three means are always equal.) It is the special case M−1 of the power mean: H(x1,x2,…,xn)=M−1(x1,x2,…,xn)=nx1−1+x2−1+⋯+xn−1Since 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. In the speed example below, for instance, finding the average speed based on equal amounts of distance, the arithmetic mean of 40 is incorrect. Since the arithmetic mean is always greater than or equal to the harmonic mean, this necessarily means 40 is larger than the correct answer. The harmonic mean is related to the other Pythagorean means, as seen in the equation below. This can be seen by interpreting the denominator to be the arithmetic mean of the product of numbers n times but each time omitting the j-th term. That is, for the first term, we multiply all n numbers except the first; for the second, we multiply all n numbers except 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 n-th harmonic mean is related to the n-th geometric and arithmetic means. The general formula is H(x1,…,xn)=(G(x1,…,xn))nA(x2x3⋯xn,x1x3⋯xn,…,x1x2⋯xn−1)=(G(x1,…,xn))nA(1x1∏i=1nxi,1x2∏i=1nxi,…,1xn∏i=1nxi).If a set of non-identical numbers is subjected to a mean-preserving spread — that is, two or more elements of the set are "spread apart" from each other while leaving the arithmetic mean unchanged — then the harmonic mean always decreases.
Harmonic mean of two or three numbers
Two numbers
For the special case of just two numbers, x1 and x2, the harmonic mean can be written as: H=2x1x2x1+x2 or 1H=(1/x1)+(1/x2)2. (Note that the harmonic mean is undefined if x1+x2=0, i.e. x1=−x2.) In this special case, the harmonic mean is related to the arithmetic mean A=x1+x22 and the geometric mean G=x1x2, by H=G2A=G(GA). Since GA≤1 by the inequality of arithmetic and geometric means, this shows for the n = 2 case that H ≤ G (a property that in fact holds for all n). It also follows that G=AH, meaning the two numbers' geometric mean equals the geometric mean of their arithmetic and harmonic means.
Three numbers For the special case of three numbers, x1, x2 and x3, the harmonic mean can be written as: H=3x1x2x3x1x2+x1x3+x2x3. Three positive numbers H, G, and A are respectively the harmonic, geometric, and arithmetic means of three positive numbers if and only if the following inequality holds A3G3+G3H3+1≤34(1+AH)2.
Weighted harmonic mean If a set of weights w1, ..., wn is associated to the data set x1, ..., xn, the weighted harmonic mean is defined by H=∑i=1nwi∑i=1nwixi=(∑i=1nwixi−1∑i=1nwi)−1. The unweighted harmonic mean can be regarded as the special case where all of the weights are equal.
Examples
In analytic number theory
Prime number theory The prime number theorem states that the number of primes less than or equal to n is asymptotically equal to the harmonic mean of the first n natural numbers.
In physics
… excerpt ends here. Continue reading the full article.





