geometric_mean(c(50, 100))
# For a given sum, geometric mean is maximised with equality
geometric_mean(c(75,75))
v = c(1, 149); c(sum(v), geometric_mean(v), mean(v), median(v))
# 150.00000 12.20656 75.00000 75.00000
# Underlying logic
sqrt(50 * 100)
# Alternate form using logs
exp(mean(log(c(50 *100))))
# Reciprocal duality
1/geometric_mean(c(100, 50))
geometric_mean(c(1/100, 1/50))
Run the code above in your browser using DataLab