terms in random distribution

Use this forum to post Vensim related questions.
Post Reply
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

terms in random distribution

Post by adjie »

Dear Forum,

i have some problems in understanding the terms in random distribution. within the vensim manual, i can find some of the terms differently than in statistics' software such as arean5. i define my data distribution by using arena5. so that, i have to match the terminologies in random distribution formula in vensim and arena5. i have made a guess on :
A= Alpha = alpha2
B = Beta = alpha1
S= start = minimum
P = Peak = mode
T = end = max
are they correct? hopefully yes.

but, i still have no idea about some of the following terms:
h = shift = ??
r = stretch = ??
O = order = ??
(random binomial) P = ??
(random poisson) M= ??
(random weibull) S =??
N = numbers of trial = ??

i do hope someone can point me to the exact statistical terms of those terms.
thanks,
adjie
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: terms in random distribution

Post by Administrator »

Sorry about the slow reply.

Have you seen the following page?
http://www.vensim.com/documentation/ind ... ?22675.htm
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

no worries.

thanks for your reply. yes, i have seen that page. but, sorry, i can not define those terms into specific numbers from that pages except some of the terms (as i mentioned in my first massage). so that, i can not make the random formula. oh ya, from that page, i can also see that if the distribution is normal, i can use shift and stretch as mean and standard deviation respectively. what if the distribution is not normal? something like beta, gamma or weilbull. can i use the values of mean and std to replace the shift and stretch?

thanks
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: terms in random distribution

Post by Administrator »

That help page has descriptions of the parameters required for the Weibull distribution as well. I'm not familiar with the Weibull, but I'd say yes, use shift = mean and stretch = SD.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

Right !! Thanks for your answer. what about others, like;
O = order = ??
(random binomial) P = ??
(random poisson) M= ??
(random weibull) S =??
N = numbers of trial = ??

cheers,
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: terms in random distribution

Post by tomfid »

Shift and stretch are transformations that get applied after generation of the distribution.

For the normal, shift and stretch transform N(0,1) to N(mu,sigma) (i.e. N(shift,stretch)). I actually tend not to use it that way - I would normally write randNorm = mean + sd*RANDOM NORMAL(-6,6,0,1,seed) - but that's just personal preference (I find it easier to set the 6-sigma limits this way).

For other distributions, like Poisson, shift and stretch don't always make sense, so they should be set to 0 and 1.

I've attached a sample model from the upcoming Vensim release that illustrates usage.
RANDOM functions.mdl
(28.26 KiB) Downloaded 758 times
Tom
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

Thanks Tomfid,

i tried your suggestions several time on my model just now. it seems working. thanks a lot and sorry for the late response. i just get back to work again.

thanks,
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

Dear All,

i have another problem on random distribution. i have a log normal distribution. since the log normal distribution is the same as EXP of random normal. i tried to use the formula of EXP(RANDOM NORMAL( {min} , {max} , {mean} , {stdev} , {seed} )). but, when i run the model, the model gives a unrealistic results to the original data. therefore, i think my formula expression is wrong. does anyone has solution on this? how can i represent my log normal distribution in vensim?

cheers...
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: terms in random distribution

Post by Administrator »

First of all simplify things a little. Generate your random number, and then feed it into EXP.

normal distn Random number = RANDOM NORMAL( {min} , {max} , {mean} , {stdev} , {seed} )
log normal random number = EXP (normal distn Random number)

It is impossible to debug models when functions like this are nested as you cannot get at the original random number.

Is the plot of the random numbers correct when you plot it in Excel? If it is, the problem is likely to be elsewhere in your model.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: terms in random distribution

Post by tomfid »

The problem may be that EXP( RANDOM NORMAL( min, max, mu, sigma, seed ) ) will not return a variable with mean=mu and std dev=sigma. Check a stats handbook for the relationship between the geometric and arithmetic mean & sd of the lognormal.

Normally you will want to use something like:

Code: Select all

myLogNorm = geometricMean*EXP( geometricSD*RANDOM NORMAL(-6,6,0,1,0) )
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

i try the formula of: myLogNorm = geometricMean*EXP( geometricSD*RANDOM NORMAL(-6,6,0,1,0) ), but it seems not working. actually from the statistical analysis, i have formulas in representing my data as follows;
1. Distribution: Lognormal
2. Expression: 0.01 + LOGN(0.0453, 0.0205)
Logmean= 0.0453
Logstd = 0.0205
3. Square Error: 0.008318
4. Chi Square Test
Number of intervals = 3
Degrees of freedom = 0
Test Statistic = 0.152
Corresponding p-value < 0.005

5. Kolmogorov-Smirnov Test
Test Statistic = 0.153
Corresponding p-value > 0.15

6.Data Summary

Number of Data Points = 25
Min Data Value = 0.0236
Max Data Value = 0.0889
Sample Mean = 0.055
Sample Std Dev = 0.0182

from those parameters, my plan is to represent the data on one of the random formulas in vensim. any suggestions?

thanks a heap!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: terms in random distribution

Post by tomfid »

I think you need to check the manuals of your stats package to determine the interpretation of the expression you have. I'm not sure how to interpret 0.01 + LOGN(0.0453, 0.0205) (in particular, where does the .01 come from?).
adjie
Member
Posts: 22
Joined: Tue May 10, 2011 4:59 am

Re: terms in random distribution

Post by adjie »

Thanks tom,

i think, 0.01 is a constanta. so, every results of lognormal random analysis will be added with 0.01. and the numbers within the bracket are Logmean= 0.0453
Logstd = 0.0205.

cheers!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: terms in random distribution

Post by tomfid »

Right ... but it isn't obvious why that would make sense. Does it mean X = .01 + EXP( N(.0453,.0205) )? That wouldn't be truly lognormal. If it means X = EXP( .01 + N(.0453,.0205) ) then why not say X = EXP( N(.0543,.0205) )?
Post Reply