# Which average to use? (RMS vs. AM vs. GM vs. HM)

The generalized mean (power mean) with exponent $p$ of $n$ numbers $x_1, x_2, \ldots, x_n$ is defined as

$$\bar x = (\frac{1}{n} \sum x_i^p)^{1/p}.$$

This is equivalent to the harmonic mean, arithmetic mean, and root mean square for $p = -1$, $p = 1$, and $p = 2$, respectively. Also its limit at $p = 0$ is equal to the geometric mean.

When should the different means be used? I know harmonic mean is useful when averaging speeds and the plain arithmetic mean is certainly used most often, but I've never seen any uses explained for the geometric mean or root mean square. (Although standard deviation is the root mean square of the deviations from the arithmetic mean for a list of numbers.)

-
(Couldn't decide whether or not this is appropriate for this site; vote to close at will.) – Ben Alpert Jul 30 '10 at 17:13
The root mean square is invariant under rotation. It's used in, for example, thermodynamics, where the behavior of particles in a gas is invariant under rotation. – Qiaochu Yuan Jul 30 '10 at 19:12
Should the 1/x in front of the summation be 1/n? – Isaac Jul 30 '10 at 19:54
Qiaochu Yuan: Can you elaborate a little more? I'm not sure you mean by rotational invariance. How are you rotating the values? – Ben Alpert Jul 30 '10 at 21:35
@Ben Alpert: the root mean square is just a scaled form of the distance from the origin to (x_1, ... x_n). That means it's invariant under a rotation matrix applied to this vector. That's an important reason it is used to compute average properties of a gas: en.wikipedia.org/wiki/Root_mean_square_speed – Qiaochu Yuan Jul 30 '10 at 23:25
show 1 more comment

One possible answer is for defining unbiased estimators of probability distributions. Often times you want some transformation of the data that gets you closer to, or exactly to, a normal distribution. For example, products of lognormal variables are again lognormal, so the geometric mean is appropriate here (or equivalently, the additive mean on the natural log of the data). Similarly, there are cases where the data are naturally reciprocals or ratios of random variables, and then the harmonic mean can be used to get unbiased estimators. These show up in actuarial applications, for example.

-

I admit I don't really know what type of answer your looking for. So, I'll say something that might very well be entirely irrelevant for your purposes but which I enjoy. At least, it'll provide some context for the power means you asked about.

These generalized power means are basically the discrete (finitary) analogs of the L^p norms. So, for instance, it's with these norms that you prove (using, say, elementary calculus) the finitary version of Holder's inequality, which is really important in analysis, because it leads (via a limiting argument) to the more important fact that $L^p$ and $L^q$ spaces (which are continuous analogs of these finitary $l^p$ spaces) are dual for $p,q$ conjugate exponents.

This duality is really important: one example is that if you are trying to prove something about the $L^p$ spaces that is preserved under duality, you just have to restrict yourself to the case $1 \leq p \leq 2$. The theory of singular integral operators provides examples of this: basically, it's easy to prove they are bounded (i.e., reasonably well-behaved) for $p=2$ by Fourier analysis; you prove that they're "weak-bounded" on $L^1$ (in some sense which I won't make precise); then you apply to general results on interpolation to get boundedness in the range $1-2$; finally, this duality operation gives it for $p>2$ as well.

Also, root-mean-square speed is used to define temperature in physics.

-

An important special case of the AM-GM inequality is that the product of two (positive) numbers with a constant sum is at a maximum when they are equal. This comes up a lot.

-