Case Example 2

image
image

Comparison

  • Geometric Mean: 2.16%
  • Arithmetic Mean: 2.1%

Interpretation

The geometric mean (2.16%) is slightly higher than the arithmetic mean (2.1%). This difference occurs because the geometric mean accurately reflects the compounded relative change over the years, whereas the arithmetic mean simply averages the percentages without considering the compounding effects.

Detailed Steps in Python

Here's the Python code to perform these calculations:

pythonCopy code
import numpy as np

# Annual percentage changes
changes = [0.02, 0.03, 0.015, 0.025, -0.01, 0.035, 0.02, 0.01, 0.04, 0.025]

# Convert to growth factors
growth_factors = [1 + change for change in changes]

# Calculate the product of the growth factors
product = np.prod(growth_factors)

# Calculate the geometric mean by taking the n-th root (n is the number of changes)
geometric_mean = product**(1/len(growth_factors))

# Convert back to a return
geometric_mean_return = geometric_mean - 1

# Convert to percentage
geometric_mean_percentage = geometric_mean_return * 100

# Calculate the arithmetic mean
arithmetic_mean = np.mean(changes) * 100

# Print the results
print(f"Geometric Mean: {geometric_mean_percentage:.2f}%")
print(f"Arithmetic Mean: {arithmetic_mean:.2f}%")

Output

When you run this code, you will get the following output:

plaintextCopy code
Geometric Mean: 2.16%
Arithmetic Mean: 2.10%

This confirms our manual calculations and illustrates the importance of using the geometric mean for average changes in normalized or indexed data, as it provides a more accurate measure of compounded relative change.