# Harmonic Mean

The harmonic mean is:

the reciprocal of the average of the reciprocals

Yes, that is a lot of reciprocals!

Reciprocal just means \frac{1}{value}.

The formula is:

Where **a,b,c,...** are the values, and **n** is how many values.

Steps:

- Calculate the reciprocal (1/value) for every value.
- Find the average of those reciprocals (just add them and divide by how many there are)
- Then do the reciprocal of that average (=1/average)

### Example: What is the harmonic mean of 1, 2 and 4?

The reciprocals of 1, 2 and 4 are:

\frac{1}{1} = 1, \frac{1}{2} = 0.5, \frac{1}{4} = 0.25

Now add them up:

1 + 0.5 + 0.25 = 1.75

Divide by how many:

Average = \frac{1.75}{3}

The reciprocal of that average is our answer:

Harmonic Mean = \frac{3}{1.75} = **1.714** (to 3 places)

## Why

In *some* rate type questions the harmonic mean gives the true answer!

### Example: we travel 10 km at 60 km/h, than another 10 km at 20 km/h, what is our average speed?

Harmonic mean = 2/(\frac{1}{60} + \frac{1}{20}) = **30 km/h**

Check: the 10 km at 60 km/h takes 10 minutes, the 10 km at 20 km/h takes 30 minutes, so the total 20 km takes 40 minutes, which is 30 km per hour

The harmonic mean is also good at handling large outliers.

### Example: 2, 4, 6 and 100

The arithmetic mean is \frac{2+4+6+100}{4} = 28

The harmonic mean is 4/(\frac{1}{2} + \frac{1}{4} + \frac{1}{6} + \frac{1}{100}) = 4.32 (to 2 places)

But small outliers will make things worse!

## Another way to think of it

We can rearrange the formula above to look like this:

It is **not** easy to use this way, but it does look more "balanced" (**n** on one side matched with n **1**s on the other, and the mean on one side matched with the values on the other side too).