Post Reply 
Information on calculator Random Number Generators from PPC Journal articles
11-16-2016, 01:53 PM (This post was last modified: 11-16-2016 06:31 PM by Dieter.)
Post: #46
RE: Information on calculator Random Number Generators from PPC Journal articles
(11-15-2016 11:51 PM)Paul Dale Wrote:  It might be possible to reduce the multiplier to \( 10^4 \) or \( 10^5 \)without losing the apparent entropy. The choice of \( 2^{20} \) was fairly arbitrary.

I tried a multiplier of 1000 which leaves 5 or 6 digits on a 10-digit calculator. Which is not too much since some game programs use the first four digits to get two 2-digit random numbers. #-)

After a few runs with 10 batches of 1000 numbers each I discovered a similar phenomenon like the one you can see in the table at post #39. This time there were several 1000-number-runs where not a single random number appeared between 0,7 and 0,8. The pattern was like this, leading to Chi² = 202,9. While the first three 10.000-number-runs looked fine, all following ones had this pattern, maybe here and there ±1 in the one or other bin, but always the 8th one empty:

Code:
0,0...    117
0,1...    103
0,2...     78
0,3...    143
0,4...    182
0,5...     91
0,6...    117
0,7...      0  (!!!)
0,8...     78
0,9...     91

Very strange. I wonder if it's the RNG, Excel or my coding.
The random numbers were calculated this way, starting with a seed of x0 = 0.546703671.

Code:
    z = Exp(Round(x + x + 1, 9))
    x = z - Int(z)
    If z < 9.9999999995 Then x = Round(x, 9) Else x = Round(x, 8)
    rn = Round(1000 * x - Int(1000 * x), 6)

Any idea what would cause strange results like these?

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Information on calculator Random Number Generators from PPC Journal articles - Dieter - 11-16-2016 01:53 PM



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