Post Reply 
Two more for the road: the PIE ROM and the RANDOM ROM
04-29-2022, 11:49 PM
Post: #5
RE: Two more for the road: the PIE ROM and the RANDOM ROM
(04-29-2022 09:26 AM)Ángel Martin Wrote:  The curious angle to this is that the "modified" TOULMTAH RNG yields better results when used in the Gaussian RNG methods, i.e. the results had a better "normality". On the other hand, the "randomness" of the modified and original TOULMATH were very similar

100 points sample size might be too small to deduce which GRN is better.
Also, "normality index" from 6 quantiles points might be too little.

Instead of checking "normality", we could apply "cdf", turn them back to uniform randoms.
Checking for uniform random distribution is much easier.
Scatterplots may be enough to call the "winner".

This got me thinking ...

Why not use 1 uniform random, apply inverse cdf, to get 1 GRN ?
icdf(p) = ierfc(p*2)*-sqrt(2), and ierfc can be cheaply calculated.

lua> T = setmetatable({}, {__index = function(F, i) return 0 end})
lua> for i=1,1e6 do x=round(icdf(random())*4)/4; T[x]=T[x]+1 end

lua> T[0] / 1e6 -- slot for z within +/- 1/8
0.09953
lua> cdf(1/8)*2 - 1 --> distribution matched standard normal
0.09947644966022584

lua> for z=-4,4,1/4 do print(z,('*'):rep(T[z]/1400)) end
-4
-3.75
-3.5
-3.25
-3    *
-2.75 **
-2.5  ***
-2.25 ******
-2    **********
-1.75 ****************
-1.5  ***********************
-1.25 ********************************
-1    ********************************************
-0.75 ******************************************************
-0.5  ***************************************************************
-0.25 *********************************************************************
0     ***********************************************************************
0.25  *********************************************************************
0.5   ***************************************************************
0.75  *****************************************************
1     *******************************************
1.25  ********************************
1.5   ***********************
1.75  ****************
2     **********
2.25  ******
2.5   ***
2.75  **
3     *
3.25
3.5
3.75
4
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Two more for the road: the PIE ROM and the RANDOM ROM - Albert Chan - 04-29-2022 11:49 PM



User(s) browsing this thread: 2 Guest(s)