I am imagining some data distribution where taking the log over and over again yields a distribution that has the exact same shape.

  • 2
    $\begingroup$ Please explain what you mean by "take log of [a] histogram." $\endgroup$
    – whuber
    Oct 5, 2022 at 14:54

2 Answers 2


To put this in more mathematical form, you want to be able to start with a random variable $X$, take a logarithm, then perhaps add and multiply by some numbers and get back the same distribution. $Y=a+b\log X$ and $X$ have the same distribution.

This is possible for a distribution that puts all its probability on two points. The logarithm puts all the probability on two different points, and you can rescale it back to the original distribution.

It's not possible otherwise. Let $x_1$ and $x_2$ be two values of $X$ and consider the point halfway between them: $x_m=\frac{1}{2}(x_1+x_2)$. Because $\log$ is a concave function, $\log x_m$ will always be less than $\frac{1}{2}(\log x_1+\log x_2)$. If we write $y_1$ and $y_2$ for the transformed values of $x_1$ and $x_2$, we can choose the scaling so that $y_1=x_1$ and $y_2=x_2$. But $y_m<x_m$, rather than $y_m=x_m$. So we can only get the same shape back if there is no probability at $x_m$. Basically the same argument works for a point 1/3 of the way between $x_1$ and $x_2$, or any other intermediate position.


A logarithm can be thought of as a function that stretches/squeezes along the number line. Given a series of values, taking the log will stretch the lower end of the range, and squash the upper end of the range - small values like 0.001, 0.01, and 0.1 that are "nearby" one another get stretched to cover a larger range of -3, -2, and -1, while large values like 1000, 10000, and 100000 that are "distant" from one another get squeezed to cover a smaller range of 3, 4, and 5.

When taking the log of a histogram, you're modifying distances between bars, but are doing so unevenly along the length of the histogram - you're stretching the left half of the histogram and squeezing the right half. Except in the case of very simple histograms with few values, this will always result in a different shape from what you started with. To preserve the shape, you'd need to shift or scale all values by the same amount, but the log effectively applies a scale factor that varies with the value being scaled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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