I wished to transform some data and have noticed that the geometric mean is a known transformation to normalise data with high differences in comparably large values relative to lower values.

However, has such a transformation been used before: $\log_{10}(e^{\operatorname{mean}(\log(x))})$

When does using the $\log_{10}$ of the geometric mean become meaningful? For example, if I have a set of values and I want to take the differences likes:

x <- data.frame(m = rep(1:2, 2),x=c(46, 7, 888, 9), y=c(888, 6, 77, 5), d=c(999, 66, 5, 4))

#geometric mean
ge <- function(x){
+     exp(mean(log(x)))
+ }

#log10 mean
ge <- function(x){
+     log10(exp(mean(log(x))))
+ }

> aggregate(. ~ m, x, ge)
  m          x          y        d
1 1 202.108882 261.488049 70.67531
2 2   7.937254   5.477226 16.24808
> aggregate(. ~ m, x, log.ge)
  m         x         y        d
1 1 2.3055854 2.4174518 1.849268
2 2 0.8996703 0.7385606 1.210802

If I were to take the differences from the rows of 2 from 1, by ratio it is far larger in the geometric mean in comparison to taking the $\log_{10}$ how much does this impact the data?

  • $\begingroup$ $\log_{10}(\exp(x))$ is just the same as multiplying $x$ by a constant - specifically by $1/\ln(10)$. So your expression is just $k.\text{mean}(\log(x))$ for $k\approx 0.43$. $\endgroup$
    – Glen_b
    Commented Jul 14, 2021 at 12:06
  • $\begingroup$ @Glen_b Competitively speaking - are there any charges by incurring the constant $k$ relative to $exp$ on the data-transformation - such costs may be the size of the data as above. What is your input on the profit of maintaining the constant $k$, any given situation by which this is apprehensively useful? $\endgroup$
    – Stackcans
    Commented Jul 14, 2021 at 12:18
  • $\begingroup$ Using $\log_{10}$ can be helpful (a) when you do not have a calculator and have to use tables, and (b) when you want to express results as related to powers of $10$ as in for example decibels. $\endgroup$
    – Henry
    Commented Jul 14, 2021 at 12:56
  • $\begingroup$ @Stackcans I am sorry, I really don't follow what you're asking. $\endgroup$
    – Glen_b
    Commented Jul 15, 2021 at 5:58

1 Answer 1


Introducing the log is equivalent to scaling the (non-exponentiated) mean by $\frac{1}{\log_e(10)}$. Notice that you can change the base of a logarithm from $a$ to $b$ by scaling: \begin{align} \log_a{x} = \frac{\log_b(x)}{\log_b(a)} \end{align} We therefore have: \begin{align} \log_{10}\left(e^{\text{mean}(\log(x))}\right) & = \frac{1}{\log_{e}(10)}\log_e\left(e^{\text{mean}(\log(x))}\right) \\ & = \frac{1}{\log_{e}(10)}\text{mean}(\log(x)) \end{align}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.