Contraharmonic Mean
Contraharmonic mean

		I’ve mentioned the harmonic mean multiple times here, most recently last week. The harmonic mean pops up in many contexts.
The contraharmonic mean is a variation on the harmonic mean that comes up occasionally, though not as often as its better known sibling.
Definition
The contraharmonic mean of two positive numbers a and b is

and more generally, the contraharmonic mean of a sequence of positive numbers is the sum of their squares over their sum.
Why the name?
What is “contra” about the contraharmonic mean? The harmonic mean and contraharmonic mean have a sort of reciprocal relationship. The ratio

equals a/b when m is the harmonic mean and it equals b/a when m is the contraharmonic mean.
Geometric visualization
Construct a trapezoid with two vertical sides, one of length a and another of length b. The vertical slice through the intersection of the diagonals, the dashed blue line in the diagram below, has length equal to the harmonic mean of a and b.

The vertical slice midway between the two vertical sides, the solid red line in the diagram, has length equal to the arithmetic mean of a and b.
The vertical slice on the opposite side of the red line, as from the red line on one side as the blue line is on the other, the dash-dot green line above, has length equal to the contraharmonic mean of a and b.
Connection to statistics
The contraharmonic mean of a list of numbers is the ratio of the sum of the squares to the sum. If we divide the numerator and denominator by the number of terms n we see this is the ratio of the second moment to the first moment, i.e. the mean of the squared values divided the mean of the values.
This smells like the ratio of variance to mean, known as the index of dispersion D, except variance is the second central moment rather than the second moment. The second moment equals variance plus the square of the mean, and so

and

			