The True Average of Multiplicative Growth
Descriptive Statistics
Geometric Mean: Where Compounding Reveals the Truth
A stock doubles then crashes 50%. The arithmetic mean says you gained 25%. Your portfolio says otherwise.
- Investment returns — CAGR is the geometric mean, not the arithmetic average
- Population growth — multiplicative rates compound, and so should their average
- AM-GM inequality — the geometric mean is always less than or equal to the arithmetic mean
When values multiply rather than add, only the geometric mean tells the real story.
What You'll Learn
- 1State the geometric mean formula and the property that defines it
- 2Decide when a quantity must be averaged multiplicatively instead of additively
- 3Compute compound annual growth rate from endpoints and from a return series
- 4Quantify the gap between arithmetic and geometric means as volatility drag
What is the Geometric Mean?
Definition
The geometric mean is the nth root of the product of n positive values. It is the appropriate average for ratios, rates of change, and multiplicative processes.
Where the Formula Comes From
Ask a mean a single question: what constant value, repeated times, produces the same result as the original numbers? For additive data the answer is the arithmetic mean, because copies of sum to the same total. For multiplicative data the answer is the value with , and taking the -th root of both sides gives the definition. Equivalently, because taking logarithms turns products into sums, the geometric mean is the exponentiated arithmetic mean of the logs:
That identity explains both the power and the restriction of this average. It also yields the property that makes the geometric mean the natural choice for index numbers: it is scale equivariant and multiplicatively consistent, so if every value doubles, doubles, and the geometric mean of two index series equals the product of their geometric means. No other common mean satisfies both.
Why Geometric Mean for Growth Rates?
The arithmetic mean answers a question nobody asked: what single rate, added each year, matches the total of the rates? What a holder experiences is the compounded product of the annual multipliers, so the average must live on that scale. Convert each return to a multiplier , take the geometric mean of the multipliers, then subtract one.
import numpy as np
from scipy.stats import gmean
import pandas as pd
import matplotlib.pyplot as plt
# ==========================================
# Example 1: Investment Returns
# ==========================================
annual_returns = [0.25, -0.10, 0.40, -0.20, 0.15] # +25%, -10%, etc.
multipliers = [1 + r for r in annual_returns]
# Geometric mean of multipliers
geo_mean_multiplier = gmean(multipliers)
arith_mean_multiplier = np.mean(multipliers)
geo_cagr = geo_mean_multiplier - 1
arith_mean_return = np.mean(annual_returns)
print("Annual returns:", [f"{r:.0%}" for r in annual_returns])
print(f"Arithmetic mean return: {arith_mean_return:.2%} <- WRONG for compounding")
print(f"Geometric mean (CAGR): {geo_cagr:.2%} <- CORRECT for compounding")
# Verify: compound at geometric mean
initial = 1000
final_actual = initial * np.prod(multipliers)
final_geometric = initial * (1 + geo_cagr)**5
print(f"\nActual final value: ${final_actual:.2f}")
print(f"Projected via CAGR: ${final_geometric:.2f}")
# ==========================================
# Example 2: Population Growth
# ==========================================
years = [2018, 2019, 2020, 2021, 2022, 2023]
population = [50000, 53000, 56180, 59551, 63124, 66911]
growth_rates = [population[i]/population[i-1] for i in range(1, len(population))]
geo_mean_growth = gmean(growth_rates)
print(f"\nAnnual growth rates: {[f'{r:.4f}' for r in growth_rates]}")
print(f"Geometric mean growth rate: {geo_mean_growth:.4f}")
print(f"Expected CAGR: {geo_mean_growth - 1:.2%}")
# Verify
n_years = len(population) - 1
cagr_from_endpoints = (population[-1]/population[0])**(1/n_years)
print(f"CAGR from endpoints: {cagr_from_endpoints - 1:.2%}")
# ==========================================
# Example 3: Geometric vs Arithmetic Mean
# ==========================================
print("\n=== AM-GM Inequality ===")
print("Arithmetic mean is ALWAYS >= Geometric mean (for positive values)")
for trial in range(5):
x = np.random.uniform(1, 100, 10)
am = np.mean(x)
gm = gmean(x)
print(f" AM = {am:.3f}, GM = {gm:.3f}, AM >= GM: {am >= gm}")
Worked Examples by Hand
Assumptions and Domain Rules
The geometric mean is defined only where logarithms are defined, and that single constraint drives every practical rule:
| Rule | Why it matters | What to do instead |
|---|---|---|
| All values must be strictly positive | is undefined and of a negative number is not real | Shift the scale, or use the arithmetic mean |
| One zero forces the geometric mean to zero | A single wipeout erases every other observation in the product | Report the median or a trimmed arithmetic mean |
| Inputs must sit on a ratio scale | An interval scale such as Celsius has an arbitrary zero, so ratios are meaningless | Use the arithmetic mean |
| Average multipliers, never raw percentages | Negative returns have no real root | Compute GM of , then subtract 1 |
| Values should be commensurable | Multiplying metres by dollars produces nonsense units | Average within a unit, then combine |
Because the geometric mean is always at or below the arithmetic mean, the shortfall grows with the spread of the data. For annual returns that gap has a well-known approximation:
with the variance of the returns. A fund averaging 12% a year with a return standard deviation of 20% compounds at roughly , so 10% a year rather than 12%. Two managers with identical average returns can therefore produce very different client outcomes: the arithmetic mean ignores dispersion, the geometric mean prices it in.
💡Volatility is a tax on compounding
Log-transform Shortcut
# Same result, numerically more stable for many values
data = np.random.uniform(1, 100, 1000)
gm_direct = gmean(data)
gm_log = np.exp(np.log(data).mean())
print(f"Direct gmean: {gm_direct:.6f}")
print(f"Via log: {gm_log:.6f}")
Working in logs also solves two numerical problems: products overflow once the inputs get large or numerous, and geometric means computed from raw products lose precision to rounding, while a mean of logs stays in a comfortable range. The log route is what every serious implementation uses, including scipy.stats.gmean.
When to Use Each Mean
| Situation | Use | Worked anchor |
|---|---|---|
| Average price, temperature, test score | Arithmetic mean | Adds up to the correct total |
| Average growth rate, CAGR, inflation | Geometric mean | Reproduces the compounded endpoint |
| Average rate or speed over equal distances | Harmonic mean | 60 and 120 km/h give 80, not 90 |
| Ratios and index numbers that must chain | Geometric mean | Product of the parts equals product of the averages |
| Distribution with outliers or heavy skew | Median | Not a mean, but robust to extremes |
import numpy as np
# One dataset, three means: 60 km/h out, 120 km/h back
speeds = np.array([60.0, 120.0])
arithmetic = speeds.mean()
geometric = np.exp(np.log(speeds).mean())
harmonic = len(speeds) / np.sum(1.0 / speeds)
print(f"Arithmetic mean speed: {arithmetic:.2f} km/h")
print(f"Geometric mean speed: {geometric:.2f} km/h")
print(f"Harmonic mean speed: {harmonic:.2f} km/h")
# Check: driving 120 km each way takes 2 h + 1 h = 3 h for 240 km
total_distance = 2 * 120
total_time = 120/60 + 120/120
print(f"True average speed: {total_distance/total_time:.2f} km/h")
# Ordering guarantee for positive values
assert harmonic <= geometric <= arithmetic
The ordering harmonic <= geometric <= arithmetic holds for every set of positive numbers, and each gap measures dispersion: identical inputs collapse all three means onto one value.
Geometric Mean in Machine Learning
| ML Application | Why the multiplicative mean fits | How |
|---|---|---|
| F1 score | Precision and recall trade off, and a model must be good at both | F1 = 2 × precision × recall / (precision + recall) |
| Geometric mean of class recalls | Multilabel metrics penalize a model that fails one class | √(recall₁ × recall₂ × …) on the log scale |
| Growth and scale-up metrics | Throughput and latency gains compound across stages | Compound multipliers |
| Perplexity reporting | Perplexity is exp of mean negative log likelihood | Geometric mean of token probabilities |
import numpy as np
from sklearn.metrics import precision_score, recall_score, f1_score
from sklearn.datasets import make_classification
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
X, y = make_classification(n_samples=500, n_features=5, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
model = LogisticRegression(random_state=42)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
precision = precision_score(y_test, y_pred)
recall = recall_score(y_test, y_pred)
f1 = f1_score(y_test, y_pred)
arithmetic = (precision + recall) / 2
geometric = np.sqrt(precision * recall)
harmonic = 2 * precision * recall / (precision + recall)
print(f"Precision: {precision:.3f}")
print(f"Recall: {recall:.3f}")
print(f"Arithmetic: {arithmetic:.3f}")
print(f"Geometric: {geometric:.3f}")
print(f"Harmonic: {harmonic:.3f} <- this is F1")
print(f"F1 (sklearn):{f1:.3f}")
# Compound growth: daily multipliers multiply, so average them geometrically
daily_returns = np.array([1.02, 0.98, 1.05, 1.01, 0.97])
print(f"\nArithmetic mean multiplier: {daily_returns.mean():.4f}")
print(f"Geometric mean multiplier: {np.prod(daily_returns) ** (1/len(daily_returns)):.4f}")
print(f"Total compound return: {np.prod(daily_returns) - 1:.4f}")
A precision of 0.90 and a recall of 0.50 makes the distinction vivid: the arithmetic mean claims 0.70, the geometric mean 0.67, but the F1 score is the harmonic mean, 0.64. The harmonic mean sits lowest because it punishes imbalance hardest, which is exactly the behaviour a metric needs when one side of the ratio can collapse to zero.
Frequently Asked Questions
Can I take the geometric mean of percentages that include a loss?
Not of the percentages themselves. A return of −50% is a multiplier of 0.50, and every return must be converted to its multiplier first. Geometric-mean the multipliers, then subtract 1 to get back to a percentage.
Why is the geometric mean always smaller than the arithmetic mean?
Because products grow slower than sums when the inputs differ. The AM-GM inequality states the fact formally, and the gap widens as the values become more spread out, vanishing only when every value is the same.
What happens if one value is zero or negative?
A zero forces the geometric mean to zero, and a negative value makes the root undefined for most exponents. Either the data is not appropriate for this mean, or you need a shifted scale with a documented justification.
How does CAGR relate to the geometric mean?
Compound annual growth rate is the geometric mean of the annual growth multipliers minus one. You can compute it either from the full return series or directly from the two endpoint values, and both give the identical answer.
Common Mistakes
Averaging percentage returns directly with the geometric mean
Fix: Convert each return to a multiplier of 1 + r, average those, then subtract 1.
Quoting the arithmetic mean return as what an investor earned
Fix: Report CAGR, the geometric mean, for anything that compounds; keep the arithmetic mean only for single-period expectations.
Applying the geometric mean to interval data such as temperature in Celsius
Fix: Ratio scales only: a scale with an arbitrary zero has no meaningful ratios to multiply.
Key Takeaways
- The geometric mean is the n-th root of the product, equivalently exp of the mean of the logs, and it is the average that reproduces a compounded total
- Growth rates must be converted to multipliers of 1 + r before averaging, and CAGR is exactly the geometric mean of those multipliers
- For positive values the order harmonic ≤ geometric ≤ arithmetic always holds, and the AM-GM gap measures how spread out the inputs are
- Volatility drag separates the two means by roughly half the variance per period, so equal average returns do not imply equal wealth
Interview Questions
Q1: A stock doubles and then falls 50%. What is the average annual return?
The arithmetic mean says +25%, but the geometric mean is 0%, because 2.0 × 0.5 = 1.0 and the square root of 1 is 1. The investor ended exactly where they started.
Q2: Why can't you compute the geometric mean of returns that include −100%?
A return of −100% is a multiplier of zero, which forces the product to zero, and any negative multiplier has no real n-th root. Multipliers must be strictly positive.
Q3: How would you explain CAGR to a stakeholder in one sentence?
It is the single constant annual growth rate that would have turned the starting value into the ending value — the geometric mean of the year-by-year growth.
Q4: What is the relationship between the arithmetic mean, the geometric mean and variance?
For returns, geometric mean is approximately arithmetic mean minus variance over two, so the more volatile the path, the more compound growth it costs at a fixed average return.
Compounding is multiplicative, not additive — respect the math, or your financial projections will deceive you.