[Math] Arithmetic mean using logarithm

logarithmsmeans

I have logarithm data in dBm and I want to compute the arithmetic mean of this data. The problem is, I'm not sure if I can directly compute the mean using logarithm, adding and then dividing for the amount of data or instead I need to convert each data to mW and then sum the values and the compute the average, therefore I reconvert to dBm.
In either way the values are somewhat similarly and I think that both are mathematically identical but the difference is because logarithm is so sensible to conversion, isn't it?. If is that reason, then I prefer operating in logarithm.

Best Answer

Measuring something in dBm means taking the logarithm of power (mW). Let $p_k$ be the $k$th value of power, so that the decibel value is $\log p_k$ (ignoring details like the base of logarithm). If you take arithmetic mean of decibel, you end up with $$ \frac{1}{n}\sum_{k=1}^n \log p_k = \log\left( \prod_{k=1}^n p^{1/n}\right) $$ That is, the result is the logarithm of the geometric mean of power levels.

An alternative is to average $p_k$, obtaining $\frac{1}{n}\sum_{k=1}^n p_k$. This the the arithmetic mean of power levels.

Both operations make sense mathematically. Their results are not identical: the geometric mean is smaller than the arithmetic mean. Which one to use depends on the purpose of computation. If it is, for example, to measure human's perception of mixed signals (like quickly varying light intensities), then you probably want to average decibels, which may* better correspond to human perception.

(*) disclaimer: I've no idea what I'm talking about here.