Calculate Harmonic Mean
Online calculator to compute the harmonic mean of a data series
Harmonic Mean Calculator
The Harmonic Mean
The harmonic mean is the mean of reciprocals of n positive numbers. It is particularly suitable for velocities and rates.
Harmonic Mean Concept
The harmonic mean is n divided by the sum of reciprocals.
Ideal for average velocities and rates.
■ Input Values ■ Reciprocals ■ Harmonic Mean
|
|
What is the Harmonic Mean?
The harmonic mean is a special measure of location with important applications:
- Definition: n divided by the sum of reciprocals
- Calculation: H = n / (1/x₁ + 1/x₂ + ... + 1/xₙ)
- Requirement: All values must be positive (> 0)
- Property: Smallest of three means (≤ geometric ≤ arithmetic)
- Application: Ideal for average velocities and rates
- Advantage: Correct for constant numerator (e.g., same distance)
Calculating the Harmonic Mean
The calculation follows four steps:
1. Reciprocals
Create reciprocals:
1/x₁, 1/x₂, ..., 1/xₙ
2. Sum
Add reciprocals:
S = Σ(1/xᵢ)
3. Count
Determine count:
n = Number of Values
4. Divide
Divide n by S:
H = n / S
Applications of the Harmonic Mean
The harmonic mean is particularly important for:
Transport and Velocity
- Average velocity with constant distance
- Fuel consumption (liters per km)
- Travel time calculations
- Traffic flow analysis
Economics and Finance
- Price-to-Earnings Ratio (P/E Ratio)
- Average cost per unit
- Price indices with quantity weighting
- Productivity metrics
Formulas for the Harmonic Mean
Harmonic Mean
n divided by the sum of reciprocals
Extended Form
Explicit representation with fractions
Alternative Form
Reciprocal of the arithmetic mean of reciprocals
For Two Values
Simplified form for two values
Symbol Explanations
| \(H\) | Harmonic Mean |
| \(x_i\) | Individual Data Value |
| \(n\) | Number of Values |
| \(\sum\) | Summation Symbol |
| \(\frac{1}{x_i}\) | Reciprocal of xᵢ |
| \(\overline{x}\) | Arithmetic Mean |
Example Calculations for the Harmonic Mean
Example 1: Basic Calculation
Calculate: Harmonic mean of 5 values
1. Create Reciprocals
Reciprocals of all values
2. Sum Reciprocals
Sum of reciprocals
3. Harmonic Mean
n divided by sum
Example 2: Average Velocity
Calculate: Average velocity for round trip
Correct Method (Harmonic)
Correct for same distance
Incorrect Method (Arithmetic)
Wrong! With same distance, more time is spent at 40 km/h.
Explanation
Example with 120 km per leg:
Forward: 120 km / 60 km/h = 2 hours
Return: 120 km / 40 km/h = 3 hours
Total: 240 km in 5 hours = 48 km/h ✓
The harmonic mean is correct here, not the arithmetic mean!
Example 3: Comparison of Three Means
Harmonic Mean
Smallest Mean
Geometric Mean
Middle Mean
Arithmetic Mean
Largest Mean
Important Inequality
H ≤ G ≤ A: The harmonic mean (1.71) is always smallest, followed by the geometric (2.0), and the arithmetic (2.33) is largest.
Equality holds only when all values are identical.
Difference increases with greater spread of values.
Mathematical Foundations of the Harmonic Mean
The harmonic mean is an important measure of location with special properties that is especially used for ratio numbers and rates.
Properties of the Harmonic Mean
The harmonic mean has characteristic mathematical properties:
- Inequality: H ≤ G ≤ A (harmonic ≤ geometric ≤ arithmetic)
- Positive values only: Defined only for xᵢ > 0
- Reciprocal-based: H = 1 / (arithmetic mean of reciprocals)
- Weighting: Smaller values receive more weight than larger ones
- Extreme sensitivity: Very sensitive to small values
When to Use the Harmonic Mean?
Harmonic Mean is Correct
- Velocities: With same distance
- Rates: Unit/time with equal units
- Ratio numbers: E.g., cost per unit
- Reciprocals: When reciprocals should be added
- Resistance calculation: Parallel circuits
Use Other Means
- Arithmetic: With same time (instead of distance)
- Geometric: For growth rates and multiplicative processes
- Median: For skewed distributions with outliers
- Weighted means: With different importance levels
Practical Example: Average Velocity
Scenario:
A car travels 100 km at 50 km/h, then 100 km at 100 km/h.
Question: What is the average velocity?
Common Mistake (Arithmetic):
(50 + 100) / 2 = 75 km/h
Wrong! The time is not equally distributed.
Correct Solution (Harmonic):
H = 2 / (1/50 + 1/100) = 2 / 0.03 = 66.67 km/h
Verification:
Time 1: 100 km / 50 km/h = 2 h
Time 2: 100 km / 100 km/h = 1 h
Total: 200 km / 3 h = 66.67 km/h ✓
Special Applications
Physics and Engineering
- Parallel circuits: Total resistance R = n/(1/R₁ + ... + 1/Rₙ)
- Lenses: Focal length with combined lenses
- Capacitances: Series connection of capacitors
- Flows: Flow rates
Economics
- F-Score: Harmonic mean of precision and recall
- Price indices: With quantity weighting
- Average costs: Cost per unit
- Productivity: Output rates
Relationship to Other Means
Harmonic Mean
H = n / Σ(1/xᵢ)
Smallest Mean
For Rates
Geometric Mean
G = ⁿ√(Πxᵢ)
Middle Mean
For Growth
Arithmetic Mean
A = Σxᵢ / n
Largest Mean
For Sums
Summary
The harmonic mean is the correct measure of location for averages of rates and ratios, especially for velocities with constant distance. It is the smallest of the three classical means (H ≤ G ≤ A) and gives more weight to smaller values. The most common error is using the arithmetic mean for velocities – this leads to incorrect results when times are different. The harmonic mean also has important applications in physics (parallel circuits) and machine learning (F-score).
|
|
|
|