Maths Formulae Statistics Harmonic Mean

Harmonic Mean – Reciprocal-Based Average

Understand harmonic mean and its applications in statistics where rates or ratios are involved.
🔑

Definition

The Harmonic Mean (HM) is a type of average, one of the three Pythagorean means, used for sets of positive real numbers. It is calculated as the number of values divided by the sum of the reciprocals of the values. The harmonic mean is most appropriate for situations when the average of rates is desired, such as average speed when traveling equal distances at different speeds.

It gives less weight to larger values and more weight to smaller values. Therefore, it is always the smallest of the Pythagorean means (Harmonic ≤ Geometric ≤ Arithmetic).

SymbolDescription
HMHarmonic Mean
nThe total number of values in the dataset.
xᵢAn individual data value (must be positive).
wᵢThe weight or frequency associated with each value xᵢ.
ΣSummation symbol, indicating to add up a series of numbers.
📊

Key Formulas

\[ HM = \frac{n}{\frac{1}{x_1} + \frac{1}{x_2} + \ldots + \frac{1}{x_n}} = \frac{n}{\sum_{i=1}^{n} \frac{1}{x_i}} \]
Harmonic Mean
\[ HM = \left(\frac{\sum_{i=1}^{n} x_i^{-1}}{n}\right)^{-1} \]
Alternative Form
\[ HM_w = \frac{\sum_{i=1}^{n} w_i}{\sum_{i=1}^{n} \frac{w_i}{x_i}} \]
Weighted Harmonic Mean
📈

Conceptual Diagram

Go: v₁ = 60 km/h Return: v₂ = 40 km/h H = 2×60×40 / (60+40) = 48 km/h H = n / (1/x₁ + 1/x₂ + … + 1/xₙ) Harmonic mean is always ≤ arithmetic mean
Harmonic Mean H: use when averaging rates or speeds — equal time at each speed gives H, not the arithmetic mean

The Harmonic Mean does not have a standard geometric diagram like a shape. It is a statistical measure of central tendency. Conceptually, it can be visualized on a number line as the smallest of the three Pythagorean means for a given dataset, positioned closest to the minimum value in the set.

⚖️

Properties

Means Inequality: For any set of positive numbers, the harmonic mean is always less than or equal to the geometric mean, which is less than or equal to the arithmetic mean.

\[ HM \leq GM \leq AM \]
Means Inequality

Sensitivity to Small Values: The harmonic mean is heavily influenced by the smallest values in a dataset. A single small value can significantly lower the overall harmonic mean.

Reciprocal Relationship: The harmonic mean of a set of numbers is the reciprocal of the arithmetic mean of their reciprocals.

\[ HM(x_1, ..., x_n) = \frac{1}{AM(\frac{1}{x_1}, ..., \frac{1}{x_n})} \]
Reciprocal Property
💡

Proof of Average Speed

Let's prove why the average speed for a journey covering the same distance d twice, at two different speeds s₁ and s₂, is the harmonic mean of the speeds.

1. The formula for average speed is Total Distance / Total Time.

\[ \text{Total Distance} = d + d = 2d \]

2. Calculate the time taken for each part of the journey using the formula time = distance / speed.

\[ t_1 = \frac{d}{s_1} \quad \text{and} \quad t_2 = \frac{d}{s_2} \]
\[ \text{Total Time} = t_1 + t_2 = \frac{d}{s_1} + \frac{d}{s_2} \]

3. Now, substitute the total distance and total time into the average speed formula.

\[ \text{Average Speed} = \frac{2d}{\frac{d}{s_1} + \frac{d}{s_2}} \]

4. Factor out the distance d from the denominator and cancel it.

\[ \text{Average Speed} = \frac{2d}{d(\frac{1}{s_1} + \frac{1}{s_2})} = \frac{2}{\frac{1}{s_1} + \frac{1}{s_2}} \]

This final expression is the formula for the harmonic mean of two numbers, s₁ and s₂.

🧮

Worked Example

Calculate the harmonic mean of the numbers 2, 4, and 8.
  1. Identify the number of values, n. Here, n = 3.
  2. Calculate the reciprocal of each value: 1/2, 1/4, 1/8.
  3. Sum the reciprocals: 1/2 + 1/4 + 1/8 = 4/8 + 2/8 + 1/8 = 7/8.
  4. Apply the harmonic mean formula: HM = n / (Sum of reciprocals).
  5. HM = 3 / (7/8) = 3 × (8/7) = 24/7.
The harmonic mean is 24/7, which is approximately 3.43.
🧮

Try It

🚀

Applications

Transportation & Logistics: Used to calculate the true average speed of a vehicle over a journey with multiple segments of equal distance but different speeds.

Finance: Used in dollar-cost averaging to find the average cost of shares purchased over time. It is also used to average multiples like the Price-Earnings (P/E) ratio.

Physics & Engineering: Used to calculate the equivalent resistance of parallel resistors in an electrical circuit, and to find the average density of a composite material.

Computer Science: The F1-score in machine learning, a measure of a test's accuracy, is the harmonic mean of precision and recall.

🌍

Real-World Examples

A car travels from town A to town B at a speed of 60 km/h and returns to town A at a speed of 90 km/h. What is the average speed for the entire round trip?
  1. The distance for both parts of the journey is the same, so the harmonic mean is appropriate.
  2. The speeds are x₁ = 60 and x₂ = 90. The number of values is n = 2.
  3. Use the formula: Average Speed = 2 / (1/60 + 1/90).
  4. Find a common denominator (180): 1/60 + 1/90 = 3/180 + 2/180 = 5/180.
  5. Calculate the result: 2 / (5/180) = 2 × (180/5) = 360/5 = 72.
The average speed for the round trip is 72 km/h.
Three resistors with resistances of 2 Ω, 4 Ω, and 6 Ω are connected in parallel. What is their average resistance for the purpose of finding the total resistance?
  1. The formula for total resistance (R_T) in a parallel circuit is 1/R_T = 1/R₁ + 1/R₂ + ... + 1/R_n. The average resistance in this context is found using the harmonic mean.
  2. The values are x₁ = 2, x₂ = 4, x₃ = 6. The number of values is n = 3.
  3. Calculate the sum of reciprocals: 1/2 + 1/4 + 1/6.
  4. Find a common denominator (12): 6/12 + 3/12 + 2/12 = 11/12.
  5. Calculate the harmonic mean: HM = 3 / (11/12) = 3 × (12/11) = 36/11 ≈ 3.27 Ω.
The harmonic mean of the resistances is approximately 3.27 Ω. (Note: The total equivalent resistance would be HM/n = (36/11)/3 = 12/11 ≈ 1.09 Ω).
🏙️

Real-World Scenarios

60 Return Trip Go: 60 km/h Return: 40 km/h HM = 48 km/h (not 50!)
Average Speed
If you drive 60 km/h there and 40 km/h back, the arithmetic mean (50) is wrong. The harmonic mean — 2/(1/60+1/40) = 48 km/h — gives the true average speed.
R₁=6Ω R₂=12Ω R_eff = 4Ω HM of R₁, R₂
Parallel Resistors
For two equal parallel resistors, the effective resistance is exactly half the harmonic mean of their values. The same formula governs parallel capacitors and pipe flows.
FUEL ECONOMY City: 25 mpg Highway: 40 mpg HM = 30.8 mpg (not (25+40)/2 = 32.5)
Fuel Efficiency
Car fuel economy ratings combine city and highway mpg using the harmonic mean — because you drive the same distance in each mode, not the same time.

Fuel Efficiency: When a car's fuel efficiency is measured in miles per gallon (or km per liter) over different terrains (city, highway), the harmonic mean provides a more accurate overall efficiency if the distance driven on each terrain is the same.

Data Transmission: In networking, if a file is downloaded in chunks over connections with different speeds, the harmonic mean can describe the average data transfer rate, as it properly accounts for the time spent at slower speeds.

Population Density: When averaging population densities across several regions of equal area, the harmonic mean gives a more representative figure for the overall density, weighting the more sparsely populated areas correctly.

📂

Types and Classifications

TypeDescriptionUse Case
Simple Harmonic MeanAll data points are given equal importance. It is the default calculation.Averaging speeds over equal distances.
Weighted Harmonic MeanEach data point is assigned a weight (wᵢ) corresponding to its importance or frequency.Averaging speeds over different distances, where the distances are the weights.
⚠️

Common Mistakes

⚠️ Using the Arithmetic Mean for Rates: The most common error is using the simple arithmetic average for rates like speed. For a round trip at 40 mph and 60 mph, the arithmetic mean is 50 mph, but the correct average speed (the harmonic mean) is 48 mph because more time is spent traveling at the slower speed.
⚠️ Including Zero or Negative Values: The harmonic mean is undefined if any value in the dataset is zero (due to division by zero). It is also not typically used for negative numbers, as the concept is based on rates and quantities that are positive.
💡 Ignoring Weights: When averaging rates over unequal intervals (e.g., different distances), the simple harmonic mean is incorrect. The weighted harmonic mean must be used, with the intervals (distances) as the weights.
🚀

Study Strategy

1 📖 Grasp the Core Concept
  • Read the 'Definition' to understand it's the reciprocal of the arithmetic mean of reciprocals.
  • Study the 'Conceptual Diagram' to see how it gives more weight to smaller values.
  • Review the 'Properties' to learn its suitability for rates, ratios, and averages of multiples.
  • Contrast with Arithmetic and Geometric means using the 'Related Formulas' section to know when to use each.
2 🧠 Internalize the Formulas
  • Write out the primary formula H = n / (Σ(1/xᵢ)) ten times until it becomes second nature.
  • Memorize the simplified formula for two numbers: H = 2ab / (a + b).
  • Review the 'Key Formulas' for the weighted Harmonic Mean, noting the position of the weights.
  • Examine the 'Proof of Average Speed' to see a practical derivation and solidify the formula's logic.
3 ✍️ Reinforce with Practice
  • Re-solve the 'Worked Example' without looking at the solution, then compare your steps.
  • Actively study the 'Common Mistakes' section and create a quiz for yourself on how to avoid them.
  • Calculate the Harmonic Mean for small, custom data sets (e.g., {2, 4, 8}) by hand.
  • Practice problems from the 'Types and Classifications' section, covering both raw data and frequency distributions.
4 🌍 Apply to Real-World Scenarios
  • Explain one of the 'Applications', like calculating average speed over a fixed distance, to a friend.
  • Take a 'Real-World Example', such as cost averaging in finance, and create a new problem with different numbers.
  • Solve the problems in the 'Real-World Scenarios' section, focusing on identifying why the Harmonic Mean is the correct tool.
  • Create a scenario where the Arithmetic Mean is appropriate for average speed (fixed time) and contrast it with a Harmonic Mean scenario (fixed distance).
By systematically building from concept to application, you can confidently master the Harmonic Mean and its powerful uses in analyzing rates and ratios.

Frequently Asked Questions

×

×