Stat dist

Use this forum to post Vensim related questions.
Post Reply
rezakazemi
Junior Member
Posts: 3
Joined: Mon Jul 21, 2008 4:07 pm

Stat dist

Post by rezakazemi »

Is Lognormal distribution available in Vensim?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Danny
Junior Member
Posts: 10
Joined: Fri Apr 25, 2008 11:42 am

Post by Danny »

I wanted to use the suggested formula but I always get a floating point error.
What can be the reason?

Thanks, Danny
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply