But What Do You MEAN?

Sophie Maclean

If you ask someone their favourite number most people will have an answer. It might be the date of their wedding, it could be a number with pleasing symmetry (I have always liked 8), or cultural significance. Very few people, however, will have a favourite average, and most would be slightly baffled at the question.

So, I am on a mission. I want to make sure that not only does everybody have a favourite average, but also that everyone knows about the deep ecosystem of different means, and how they relate to one another.

The first thing I need to address is that this article will not contain discussion of the mode or median. The mean, median and mode are often introduced in schools as a trio; the mode being the most common outcome in a sample, and the median being the “middle” value, when the data is sorted in ascending order. Whilst these both have their place and uses in statistics, it’s the means that pervade many more areas of maths.

The second thing to address is the fact that I have said “means” in the plural. Because yes, there is more than one mean. Just as how median and mode are types of averages, there are different types of mean too. The “mean” you learned about in school, is actually only a specific type of mean. A nickname, if you will, for the arithmetic mean. Which is where we shall begin our journey.

The Arithmetic Mean

The arithmetic mean is one that you will all be familiar with – it is calculated by summing all the values in your data set, then dividing by the number of values.

That is to say, if your data is \(x_1, x_2, \dots, x_N\), then the arithmetic mean is

\(\frac{x_1 + x_2 + \dots + x_N}{N}.\)

This is commonly used as a way of working out the “central” value of a data set. It is, for this reason, often used in statistics. It can be compared to the median for even greater analysis. For example, if the arithmetic mean income of a country increases faster than the median income, that could imply that the super rich’s salaries are increasing faster than most of the population.

The arithmetic mean is also very useful in probability theory. Suppose our random event takes numerical values \(x_1, x_2, \dots x_N\). If they are each equally likely to occur, then the arithmetic mean gives the expected value of that event. The value that, if you were to run the trial over and over again, you would expect to get on average.

Now that we have discussed the familiar mean, it’s time to introduce one of the newbies. Behold, the geometric mean.

The Geometric Mean

The geometric mean for our data \(x_1,\dots x_N\)is defined by

\(\sqrt[n]{x_1\cdot x_2\cdot\cdots\cdot x_N},\)

i.e. the Nth root of the product of all \(N\) elements. Note that this is equal to \(e\) to the power of the arithmetic mean of the logarithms of all the values.

This is often used in data sets like population growth rates, where items combine multiplicatively. It can also be used when averaging interest rates. For example, if a person invests 1000 money (choose your favourite currency) and gets returns of +10%, -4%, -8% and +25%, this results in 1214.4 money. The geometric mean is 20%, which is a lot more meaningful in terms of what we see happening to the money than the arithmetic mean of 5.75%.

Meaning…

A fun fact about the geometric and arithmetic means, is that the arithmetic mean is always greater than or equal to the geometric mean, with equality if and only if all values in the data set are the same.

It is easy to prove this in the case \(N=2\), when we only have two elements in our data set. Let us call these elements \(a\) and \(b\).

Square numbers are always non-negative, so

\( (a-b)^2 \geq 0,\)

with equality if and only if \(a=\b). Multiplying out the brackets gives

\(a^2 – 2ab + b^2 \geq 0.\)

We now add \(4ab\) to both sides giving

\(a^2 + 2ab + b^2 \geq 4ab.\)

Factorising gives

\((a + b)^2 \geq 4ab.\)

We can now take square roots of both sides, giving

\(a + b \geq 2\sqrt{ab}.\)

Finally, dividing by two gives

\(\frac{a + b}{2} \geq \sqrt{ab},\)

with equality if and only if \(a = b\), which is exactly what we want!

We can also prove this inequality in pictures!

A triangle in a semicircle, its base forming the diameter of the circle. The triangle is split in half forming two triangles - PGQ and QGR
Proof without words of the inequality of arithmetic and geometric means, drawn by CMG Lee. 1

The Harmonic Mean

After that scheduled break, it is back to discovering new means, and next up is the harmonic mean. This is the reciprocal of the arithmetic mean of the reciprocals. So, for our data \(x_1, x_2, \dots, x_N\), the harmonic mean is

\( \frac{N}{\frac{1}{x_1} + \frac{1}{x_2} + \dots + \frac{1}{x_N}}.\)

This has a few surprising uses and is often used in things regarding rates and ratios. For example, if a car travels outbound at a speed \(x\), and returns the same distance at a speed \(y\), then its average speed is the harmonic mean of \(x\) and \(y\). Interestingly, here we made the distance of both legs be equal, but if we had instead made the time travelled on each leg be equal, then the average speed would be the arithmetic mean of \(x\) and \(y\).

The Root Mean Square

Our final mean is the root mean square, which is exactly what it says on the tin: You take each element. Find the arithmetic mean of the squares. Then square root it. In symbols, this is

\( \sqrt{\frac{1}{N} (x_1^2 + x_2^2 + \cdots + x_N^2)}.\)

This is also sometimes called the quadratic mean, which is less descriptive but does still give some idea of what is going on.

The root mean square (RMS) has some applications in the real world. For example, it is commonly used in electrical engineering. The RMS of an alternating current equals the value of the constant direct current that would dissipate the same power in a given resistor.

Eenie Meanie…

Just as we have the AM-GM inequality, we have a similar inequality bringing in the harmonic mean (HM) and the root mean square (RMS). This is sometimes called the not quite as catchy RMS-AM-GM-HM inequality, and states that the root mean square is greater than or equal to the arithmetic mean is greater than or equal to the geometric mean, is greater than or equal to the harmonic mean, with equality if and only if all elements are equal.

This gets rather fiddly to prove algebraically, though it is perfectly possible. I shall instead leave you with this beautiful visual proof. Enjoy!

 

A diagram based on a circle proving the root mean square inequality
Geometric proof without words that quadratic mean (root mean square) > arithmetic mean > geometric mean > harmonic mean, drawn by CMG Lee based on Figure 4 on http://maa.org/book/export/html/466289.2

In the image above, O is the centre of a circle, and P, G and R lie around the circle. Because P and R form a diameter, PGR is an equilateral triangle. Q is a point on the diameter PR, with PQ being length \(a\), and QR being length \(b\). The radius of the circle is \(\frac{a+b}{2}\) i.e. the arithmetic mean of \(a\) and \(b\). This is shown in pink on the diagram. To find the length of the purple line (let us call it \(x\)), we can use the similarity of the right-angled triangles to see that \(\frac{a}{x} = \frac{x}{b}\). This can be solved to show \(x = \sqrt{ab}\), i.e. the geometric mean. From the diagram, we can clearly see that the pink line is longer than the purple line (and they would only be equal length if Q was at the centre of the circle), i.e. the arithmetic mean is greater than the arithmetic mean.

This arithmetic/geometric mean fact is known as the AM-GM inequality (after the initials of both the means) and is a staple of high school maths competitions the world over. One cool use of this inequality is that is shows that given a rectangle with fixed perimeter, the area is maximised when you have a square!

This is because if side lengths of the rectangle are \(a\) and \(b\), the perimeter is \(2(a+b)\) which is four times the arithmetic mean, so fixing the perimeter fixes the arithmetic mean. Therefore, the geometric mean (which is the square root of the area of the rectangle) has a fixed upper bound which it can only achieve when \(a=b\).

  1. In the image above, O is the centre of a circle, and P, G and R lie around the circle. Because P and R form a diameter, PGR is an equilateral triangle. Q is a point on the diameter PR, with PQ being length \(a\), and QR being length \(b\). The radius of the circle is \(\frac{a+b}{2}\) i.e. the arithmetic mean of \(a\) and \(b\). This is shown in pink on the diagram. To find the length of the purple line (let us call it \(x\)), we can use the similarity of the right-angled triangles to see that \(\frac{a}{x} = \frac{x}{b}\). This can be solved to show \(x = \sqrt{ab}\), i.e. the geometric mean. From the diagram, we can clearly see that the pink line is longer than the purple line (and they would only be equal length if Q was at the centre of the circle), i.e. the arithmetic mean is greater than the arithmetic mean.

    This arithmetic/geometric mean fact is known as the AM-GM inequality (after the initials of both the means) and is a staple of high school maths competitions the world over. One cool use of this inequality is that is shows that given a rectangle with fixed perimeter, the area is maximised when you have a square!

    This is because if side lengths of the rectangle are \(a\) and \(b\), the perimeter is \(2(a+b)\) which is four times the arithmetic mean, so fixing the perimeter fixes the arithmetic mean. Therefore, the geometric mean (which is the square root of the area of the rectangle) has a fixed upper bound which it can only achieve when \(a=b\). ↩
  2. A is the centre of a circle, and points N,Q, G and P lie on the circumference (with N and P forming a diameter). M is a point outside the circle, along the diameter NP. Let us call the distance from N to M, \(a\) (in red), and the distance P to M \(b\) (in blue). Note that the diameter of the circle is \(a-b\), so the radius is \(r = \frac{a-b}{2}\). This is shown in grey on the diagram.
     
    The distance A to M is \(b\), plus the radius, i.e.\( \frac{(a+b)}{2}\), the arithmetic mean, shown in orange. Using Pythagoras’ theorem on triangle AGM, we see that \( r^2 + GM^2 = a^2\). We know that \(r = \frac{a-b}{2}\), so we can resolve this to find that \(GM = \sqrt{ab}\), the geometric mean. This line is shown in green.
     
    We can use Pythagoras’ theorem again, this time looking at triangle AMQ, to find the length of line QM:
     
    \(\sqrt{AM^2 + AQ^2} = \sqrt{\bigg(\frac{a-b}{2}\bigg)^2 + \bigg(\frac{a+b}{2}\bigg)^2} = \sqrt{
    \frac{a^2 + b^2}{2}}\),
     
    i.e., the root mean square! This is shown in cyan on the diagram.
     
    Finally, for the length of HM, we use similar triangles. This tells us that \(\frac{HM}{GM} = \frac{GM}{AM}\). We therefore have \(HM =  \frac{GM^2}{AM} = \frac{2ab}{a+b}\), which is indeed the harmonic mean. This line is in purple.
     
    We can now visually see that RMS \(\geq\) AM \(\geq\) GM \(\geq\) HM. ↩

The post But What Do You MEAN? originally appeared on the HLFF SciLogs blog.