Skip to main content
5 of 6
added 547 characters in body
BruceET
  • 57.6k
  • 2
  • 36
  • 95

Comment on lognormal and normal distributions.

The variance of data tends to decrease when you take logs of the values. Perhaps the most common case is that, if $X_1$ is lognormal, then $X_2 = \ln(X_1)$ is normal, which has smaller variance than $X_.1$ Also, if it exists, $X_3 = \ln(X_2)$ may have a still smaller variance.

Below we begin with a random sample (using R) of $n = 10^4$ observations from a lognormal distribution with parameters $\mu = 50, \sigma = 2.$ (It is customary to use lognormal parameters that match parameters of the related normal distribution. You can look at Wikipedia on 'lognormal distributions' for details.) We show means and standard deviations for distributions of $X_1, X_2,$ and $X_3.$

set.seed(720); n = 10^4
x2 = rnorm(n, 50, 2);  x1 = exp(x2);  x3 = log(x2)
mean(x1); mean(x2); mean(x3)
[1] 3.686093e+22
[1] 50.01289         # aprx E(X2) = 50
[1] 3.911481
sd(x1); sd(x2); sd(x3)
[1] 2.308712e+23
[1] 1.997261         # aprx SD(X2) = 2
[1] 0.04004551

Then we show histograms of the three samples. At the left, notice that it is difficult to make an informative histogram of $X_1$ because it is so severely skewed to the right. In the center panel, we overlay the density function of $\mathsf{Norm}(\mu =50, \sigma=2);$ which is symmetrical. At the right, notice that taking (natural) logs once again results in a slightly left-skewed distribution.

enter image description here

Notes: (1) The the support of a lognormal distribution is $(0, \infty).$ A normal distribution may take negative values. If the lognormal distribution is truncated to $(1, \infty)$ so that the normal distribution is truncated to $(0,\infty),$ then the natural log of that "normal" distribution exists. The distribution $\mathsf{Norm}(50, 2)$ has almost no probability below $0,$ so the truncation would have little practical effect in this example.

(2) R code for the figure above:

par(mfrow=c(1,3))
hist(x1, prob=T, br=50, col="skyblue2")
hist(x2, prob=T, col="skyblue2")
  curve(dnorm(x,50,2), add=T, col="red")
hist(x3, prob=T, col="skyblue2")
par(mfrow=c(1,1)) 

(3) However, it is not always true that taking logs gives a smaller variance. If $X_2 \sim \mathsf{Unif}(0,1),\, X_1 = e^{X_2},$ and $X_3 = \ln(X_2),$ then R code similar to the code for the lognormal example gives the following results:

set.seed(720); n = 10^5
x2 = runif(n);  x1 = exp(x2);  x3 = log(x2)
var(x1); var(x2); var(x3)
[1] 0.2411124
[1] 0.08316279  # aprx V(X2) = 1/12
[1] 1.01091

enter image description here

BruceET
  • 57.6k
  • 2
  • 36
  • 95