Harmonic Mean(HM) in real life with examples

Harmonic mean is used when a fixed quanity is repeteadly applied across periods

In statistics, data science or just general everyday decisions, we always are interested in knowing the middle value.

Like what’re the average marks, average speed or average returns etc.

In technical terms, we also call it central tendency.

I will try to make this article as practical and easy as possible. So hang on and read till the end.

Table of Contents

  1. What is Harmonic Mean?
  2. Harmonic Mean Formula
  3. Application 1:Speed
  4. Application 2: Dollar Cost Averaging
  5. Application 3: PE Ratio
  6. Relationship: AM,HM,GM
  7. Uses of Harmonic Mean
  8. Examples of Harmonic Mean
  9. Calculating HM in excel
  10. Advantages and Disadvantages

What is Harmonic Mean?

Consider the following example Class A students and Class B students. You want to find out what’s the average score of students. However, there is a problem, which is that in class A students, there is one student who has got 100. So how is that a problem?

Well, that one score shoots up the average and gives you a false sense of performance.

So, the solution to that is Harmonic Mean.

  • Which will give a lesser weightage to the extreme values
  • More weightage to the regular non-extreme values.

Making the average measurement more reliable.

So what’s important for you to remember is, when it is used.

When the data has larger extreme values.

Harmonic Mean Formula

Now, as discussed in the last part, regarding giving less weightage to the larger extreme values?
Hence we need to understand first the weightage process of normal arithmetic.

  • This is equal to the case of a normal average; in other words, if we have four data observations, then each has 25%.
  • The harmonic process is exactly the opposite; we take the reverse of the values, i.e. Class A (1/25+1/23…..+1/100).
  • Hence you can observe that 100, a larger extreme value, becomes even smaller.
  • So 25 gets a weightage of 4%, 100 gets a weightage of 1%
Harmonic weightage versus Arithmetic mean
Weightage difference
  • Next, we added up all the reversed values (1/25+1/23/+1/25+1/100)=0.13
  • Divide N/( 0.13)= 4/0.13 which equals 29.96.
harmonic mean formula
Harmonic Mean Formula, where x1 x2 x3 xn are individual values and n is the total number of observations.

Harmonic Mean Application Rule

Every time you come across a situation to check if harmonic means can be used, follow the below rule.

The harmonic mean is used when a fixed quantity is repeatedly applied for a result.

Application 1: Finding the average speed of Cars

Let me take an example here. What should be the average speed?

harmonic mean

Speed calculation using harmonic Mean
  • Reverse the speed values : 3/(1/10+1/20+1/30)= 16.36 Km/Hr

Application 2: Investing in Mutual funds across Periods

Again, notice here that the investment amount must be the same across periods.

So, for example, You invest $5000 across five periods, with the purchase price of a mutual fund being $100, $200, $75, $150, or $300. What’s the average price per unit?

So, the solution would be:5/ (1/100+1/200+1/75+1/150+1/300)

Harmonic mean for investments

You can test the values and check that the simple average gives a wrong answer for total investments.

Application 3: P/E Ratio

Harminc mean of NIFTY 50 PE RATIO

So I plotted the Harmonic Mean of the NIFTY PE Ratio using the harmonic mean and simple average. Notice how initially HM and AM are identical, but as we keep progressing, adding more values then the simple average overestimates the mean. Hence harmonic mean makes more sense.

You can download this data set below.


The Relationship of Harmonic Mean, Arithmetic Mean, Geometric Mean

The above three means are also called Pythagorean means.

You might be wondering, am I going to make this complicated? Not.

However, let’s try to play a little with numbers.

  • Arithmetic Mean: a +b /2
  • Geometric Mean:√ab
  • Harmonic Mean: 2/(1/a+ 1/b) or 2 ab/(a+b)

So we can replace 2ab with geometric mean square because GM is √ab.

  • Therefore, harmonic mean = 2 (GM)²/(a+b)

but 2/(a+b) can also be said to reverse AM.

Hence, Harmonic Mean= (GM)²/AM

Small Discussion: Median, Mode and Mean

By the way, arithmetic mean is also called mean in general parlance. Also, the concept of median and mode, which of course, is not a part of this article, but I will share some quick light.

All that median is trying to do is to find the middle position (N+1)/2 in case of an odd number of total observations, while the N/2 position is in case of even. This needs to happen while the data is arranged in ascending order.

Why? How else would the position make sense right?

Similarly, the model is trying to find the data which repeats itself the most.

So frequency is what we are trying to find.

In summary, it means is the

  • Mean: algebraic addition divided by the no of observations
  • Media: Is the middle position of data arranged in an ascending order
  • Mode: The data that repeats itself the most

Uses of Harmonic Mean

Given below are some of the popular uses of the harmonic mean

  • It can be used in speed calculation because speed is already a ratio of distance over time.
  • Heavily used in finance when dealing with multiple
  • It can be used to finance patterns in the Fibonacci series
  • Very helpful when dealing with data which has larger extreme values

Weighted Harmonic Mean

This is just a special case, where along with finding the mean, we also wish to assign weightage.

However, all the weights should add up to 1.

weighted harmonic mean

So, all that changed from our previous formula, instead of just reciprocal. We know are dividing it by the weightage.

An unweighted harmonic mean(HM), assigns equal weightage to all values, right?

However, if you wish to assign weightage, then you could use this method.

Just to add here, this is not a special case of just harmonic mean, but you could also find weighted arithmetic mean too.

Why Do We Calculate Mean?

Consider that you are evaluating a mutual fund investment scheme. Which one of the below questions will you be interested in asking?

  1. What was the highest return for a particular month?

2. Or what have been the average returns?

Let’s take the example on this sheet: Franklin Templeton MF.

Average

Median

0.58%

1.02%

After the analysis, we concluded that the average monthly return is:

  • Does the central location itself give you any information?
  • What if we were to find how much each day fluctuates from the centre?
  • Because we are always interested in the average fluctuation, which will somehow affect our capital volatility.
  • Imagine investing in a fund, and even though the returns are good at 21% annual.
  • Just when you were planning to buy a house, the fund experienced a -70% fluctuation.
  • This is why we are learning statistics and managing risk is more important than targeting returns.

Harmonic Mean Examples

Example -1

You have to find the harmonic mean of the average P/E ratio of the index of the stocks of Company A and Company B.

  • Company A has a market capitalization of US$1 billion and earnings of US$20 million.
  • Company B has a market capitalization of US$20 billion and earnings of US$5 billion.
  • The index comprises 40% of Company A and 60% of Company B. 

We first need to calculate the P/E of each company.

The calculation can be done in the following way:

  • P/E (Company A) = ($1 billion) / ($20 million) = 50
  • P/E (Company B) = ($20 billion) / ($5 billion) = 4

We must use the weighted harmonic mean to calculate the P/E ratio of the Index.

Using the formula for the weighted harmonic mean, the P/E ratio of the index can be found:

P/E(Index) = (0.4+0.6) / (0.4/50 + 0.6/4) = 6.33

Example-2

This central tendency method is particularly useful for rates or ratios. For example, look at the harmonic mean of P/E Ratios of Nifty

What this does is the exact opposite of the weighted mean.

The higher the value, the lower the proportion.

If you had calculated the average rate of P/E, how would you calculate it? You would have got 30 and if you had calculated the Weighted mean you would have got 32.

P/E Ratios- nifty

Inverse Value(1/x)

25

4%

35

3%

40

3%

20

5%

Sum of Inverse

14%

HM (no of obs/ sum of inverse)

27.86

How do you calculate Harmonic Mean in Excel?

Calculating the harmonic mean in excel is easy because it saves the trouble of manually finding the inverse using the harmonic mean.

God bless bill gates for creating spreadsheets!

However a word of caution, the harmonic mean doesn’t work with negative or zero values.

You can practice this in this template:


Advantages of Harmonic Mean

While we saw how to calculate this and, at the same time, learnt when to use it.

Now its time to look at its advantages:

  • It’s appropriate for the time and rate calculation
  • It can be useful for derived mathematical calculation
  • The harmonic mean isn’t affected by the outliers

Disadvantages of Harmonic Mean

Of course, nothing comes without some shortcomings, and this method likewise has some challenges.

  • The method is complex.
  • It gets affected by extreme values in opposite situations to the arithmetic mean.

Conclusion

Central tendency is a large and wide concept, having its application in modern-day machine learning.

It is important to understand the core objective of calculating central tendency, without which you can make some serious errors with your decisions. Imagine that you are deciding to invest $100 Mn in an investment opportunity while concluding its average risk.

Selecting an inappropriate method of calculation could mean disaster. Similarly, imagine you are trying to measure the chance of failure for a business project, and we casually look at a skewed sample.

The skewed sample might contain data from only successful projects and not failures.

Moreover, it is also possible that the data has a time bias, which was particularly favourable for this project. On the contrary, this could also be true with a data set that contains only failures.

You see, it’s not about calculating a value; it’s about what exactly we intend to do with that value.

We are in an education system that casually deals with concepts and fundamentals without any heed to their real-world relevance. Hence it’s important that as students of maths, finance or science, you push beyond what the curriculum draws on.

Summary
What is Harmonic mean
Article Name
What is Harmonic mean
Description
The harmonic mean is a method which gives less weightage to larger single values and more weightage to smaller values. I want you to directly look at this example to understand this. We have two sets of students marks, Class A and Class B. Class A has one extremely large value of 100, so harmonic mean actually gave lower weightage. In Contrast, Class B values have relatively smaller values, hence more or less the harmonic mean is closer to the arithmetic mean.
Author
Publisher Name
MENTOR ME CAREERS
Publisher Logo
ALLEN ARAVINDAN,CFA
ALLEN ARAVINDAN,CFA

Leave a Reply