Hi everybody
pliiiisss look at the attached model... I need to understand why the two gaussian curves (one obtained with a mathematical formula the other with a Vensim model) show such different values at their maximum (one is correctly at 1 the other at 0.008).
Best regards
Lorenzo
Different maximum values.....
-
- Senior Member
- Posts: 102
- Joined: Wed Jul 30, 2014 7:09 am
- Vensim version: PLE
Different maximum values.....
- Attachments
-
- TEST_gaussiandestribution2mod.mdl
- (4.25 KiB) Downloaded 263 times
Re: Different maximum values.....
The expression for the Gaussian is incomplete. The full pdf is:
1/SQRT(2*pi)/sigma*EXP( (x-mu)^2/2/sigma^2 )
That partially reconciles the two. They still differ, but I don't understand the rationale for the DIFF version, so I can't really comment on that, except to point out that it doesn't work for sigma=1.
1/SQRT(2*pi)/sigma*EXP( (x-mu)^2/2/sigma^2 )
That partially reconciles the two. They still differ, but I don't understand the rationale for the DIFF version, so I can't really comment on that, except to point out that it doesn't work for sigma=1.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Senior Member
- Posts: 102
- Joined: Wed Jul 30, 2014 7:09 am
- Vensim version: PLE
Re: Different maximum values.....
Hitomfid wrote:The expression for the Gaussian is incomplete. The full pdf is:
1/SQRT(2*pi)/sigma*EXP( (x-mu)^2/2/sigma^2 )
That partially reconciles the two. They still differ, but I don't understand the rationale for the DIFF version, so I can't really comment on that, except to point out that it doesn't work for sigma=1.
thank you a lot.... a really stupid mistake.... the rationale of the Vensim model is to generate the Gaussian dynamically and non through a formula....
Lorenzo
Re: Different maximum values.....
What's the real world explanation of what you're trying to accomplish here?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Senior Member
- Posts: 102
- Joined: Wed Jul 30, 2014 7:09 am
- Vensim version: PLE
Re: Different maximum values.....
Hitomfid wrote:What's the real world explanation of what you're trying to accomplish here?
I really don't know... it is included in a bigger model from one of my students as his final project so he is still working on it...
Regards
LC
Re: Different maximum values.....
One way to generate an approximate Gaussian dynamically is to use a delay chain with a lot of levels. The SMOOTHN or DELAYN functions are convenient for this. A single level of a smooth or 1st order delay is an Exponential or Erlang(1) distribution. As you reach a large number, it converges to Gaussian. The output of a SMOOTH3 already looks pretty close if you feed it a PULSE input.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
-
- Senior Member
- Posts: 102
- Joined: Wed Jul 30, 2014 7:09 am
- Vensim version: PLE
Re: Different maximum values.....
Hitomfid wrote:One way to generate an approximate Gaussian dynamically is to use a delay chain with a lot of levels. The SMOOTHN or DELAYN functions are convenient for this. A single level of a smooth or 1st order delay is an Exponential or Erlang(1) distribution. As you reach a large number, it converges to Gaussian. The output of a SMOOTH3 already looks pretty close if you feed it a PULSE input.
thank you a lot for this precious suggestion...
Best regards
Lorrenzo