Page 1 of 1
Stat dist
Posted: Wed Feb 25, 2009 4:46 am
by rezakazemi
Is Lognormal distribution available in Vensim?
Posted: Wed Feb 25, 2009 11:40 am
by bob@vensim.com
I assume you mean with random functions. Just use exp(RANDOM NORMAL(nmean,nstdv,0)). I think, though it is worth double checking, that the mean for this will be
mean of log normal = exp(nmean + nstdv^2/2)
and the variance will be
variance of log normal = exp(2*(nmean + nstdv^2)) - exp(2*stdv + nstdv^2)
Hope that helps.
Posted: Fri Jul 10, 2009 7:26 am
by Danny
I wanted to use the suggested formula but I always get a floating point error.
What can be the reason?
Thanks, Danny
Posted: Fri Jul 10, 2009 9:34 am
by bob@vensim.com
most likely your mean and standard deviation put the values out of range. these need to be pretty small numbers since you are passing them through exp. Try with a mean of 0 and a standard deviation of 1.