[R] Mean of lognormal in base-2

Senanu Pearson smpearson at hotmail.com
Fri May 29 18:04:09 CEST 2009


Hi, Does anyone know what the mean value of a lognormal distribution in base-2 is? I am simulating stochastic population growth and if I were working in base-e, I would do:lambda <- 1.1 #multiplicative growth rates <- 0.6 #stochasticity (std. dev)lognormal <- rlnorm(100000, log(lambda) - (s^2)/2, s)## or lognormal <- exp( rnorm( 100000,  log(lambda) - (s^2)/2, s)mean(log(lognormal))which gives the desired mean of  mean-(var^2)/2. Unfortunately, I have to do this in base-2.  I know that I can generate a lognormal in base 2 by raising 2 to the power of the variates, but I don't know what the mean value should be.Any help is much appreciated...Mark




More information about the R-help mailing list