Problem with the random uniform generator

Use this forum to post Vensim related questions.
Post Reply
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Problem with the random uniform generator

Post by LAUJJL »

Hi

I join a vpm file with a model and different seed values showing that the average Bernouilli value does not converge properly towards the original frequency depending on the seed value.

Best regards.

JJ
Attachments
test1234.vdf
(1.43 MiB) Downloaded 185 times
test4444.vdf
(1.43 MiB) Downloaded 186 times
test3.vpm
(78.93 KiB) Downloaded 174 times
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Problem with the random uniform generator

Post by LAUJJL »

other vdf files
Attachments
test0.vdf
(1.43 MiB) Downloaded 176 times
test4542.vdf
(1.43 MiB) Downloaded 188 times
test7876.vdf
(1.43 MiB) Downloaded 175 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Problem with the random uniform generator

Post by tomfid »

I'm not convinced that there's a problem. I used the attached modified model to run a sample of 1000 realizations at once, and looked at the statistics for the cumulated "input". The expected value of the standard deviation of "input" given by the binomial distribution is sqrt(100000*0.2*(1-0.2))=126.5. In 2 tests with different seeds I got ~123 and 129. So, I think your threshold for "strangeness" is too strict, because .001*100000 < 126.5.
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Problem with the random uniform generator

Post by tomfid »

Forgot the attachment:
test3arr.mdl
(10.24 KiB) Downloaded 244 times
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Problem with the random uniform generator

Post by LAUJJL »

Hi Tom

You are right. In fact if one applies Tchebychev inequailty that sets the maximum probability that the gap is more than the epsilon, one finds 1.6, whch means that there is no limitation to the likelyhood of that event happening. I have tested that the Techbychev inequatily that proves that the precision of the estimation of the average increases with the number of draws, works for any seed, any epsilon and any number of draws. See the model joined.
In fact I have a model where I have about 8000 draws and a frequency of 0.2 and with a seed of 4000, I get an estimation of the frequency a little more than 0.21. In that case with the Tchebychev inequality there is a 0.16 maximum probability of this event happening.

Thank you for your help.

Best regards.

JJ
Attachments
test3_sub_2_bis.mdl
(4.85 KiB) Downloaded 185 times
Post Reply