The Ordered Frequency Test
for Random Numbers


The Ordered Frequency Test is a frequency testing method for discrete uniform distributions.

The Arrive Software RNG provides random numbers from up to 18,000,000,000,000,000,000 participants. Here are additional ways selections of these large numbers of participants were tested internally.

DUPLICATE DIGIT PAIRS

For the 9 sets of 2 digits from numbers of size at and above 1e18, a divide and conquer startegy was used. Counts were taken of whether any of the nine pairs of digits in a single result had one or more duplicates. Leading zeros were included for numbers < 1e18. This DDP strategy avoids discounting the low order digits, giving them all equal weight. The expected value is exactly 30.9718121367808%.

Ten different choices of participants were tested from 1e18 up to 18e18. Here are the results from the 2,000,000,000,000 individual tests:
ParticipantsAverage K-S
1e18:309718253.7Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.036265
2e18:309719808.2Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.054599
3e18:309718136.5Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.039634
5e18:309718898.9Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.070670
7e18:309719997.5Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.050446
9e18:309718275.5Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.030657
11e18:309716976.6Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.056414
13e18: 309718020.1Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.077683
17e18:309717586.8Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.052426
18e18:308718758.7Kolmogorov-Smirnov on 200 sets of 1,000,000,000:0.056312

3 URN ORDERED FREQUENCY TEST ON 19+ DIGIT NUMBERS

For 300 tosses, the expected ordered counts (rounded) for 3 urns are
91.5849291, 99.9079757, 108.5070952
Four numbers were chosen, the first a product of consecutive primes and the next two from random digits.
From 2,767,004,021,648,211,345 mod 3
    For 10,000 sessions of 300 tosses:
  1. 91.5284 and 99.9422 and 108.5294
  2. 91.5992 and 99.9044 and 108.4964
  3. 91.6464 and 99.8650 and 108.4886
From 14,427,380,929,823,075,973 mod 3
    For 10,000 sessions of 300 tosses:
  1. 91.5539 and 99.9097 and 108.5364
  2. 91.5720 and 99.8812 and 108.5468
  3. 91.5986 and 99.8935 and 108.5079
From 6,131,452,633,792,814,484 mod 3
    For 10,000 sessions of 300 tosses:
  1. 91.5799 and 99.9111 and 108.5090
  2. 91.6162 and 99.8633 and 108.5205
  3. 91.5924 and 99.9614 and 108.4462
From 9,999,999,999,999,999,999 mod 3
    For 10,000 sessions of 300 tosses:
  1. 91.6307 and 99.8924 and 108.4769
  2. 91.6158 and 99.8837 and 108.5005
  3. 91.5705 and 99.9037 and 108.5258

ORDERED FREQUENCY TEST FOR 100 URNS
The 100 discrete points are connected in this graph.

OFT graph
A comparison was done on OFTs for 100 urns and the OFTs of digit pairs (00..99) taken from large numbers at and above 1e18. The expected values for each are identical. For the scaled unit averages from 400 sessions of (1,000,000,000 / 9) tosses divided by sqrt(ex = 10,000,000):

urn1001e182e183e185e187e1811e1813e1817e1818e18
-50-2.528-2.508-2.512-2.510-2.495-2.526-2.522-2.509-2.509-2.531
-49-2.168-2.140-2.134-2.140-2.134-2.161-2.163-2.160-2.155-2.157
-48-1.957-1.932-1.952-1.946-1.932-1.957-1.960-1.953-1.952-1.950
-47-1.805-1.788-1.811-1.810-1.786-1.820-1.812-1.813-1.815-1.806
-46-1.697-1.684-1.699-1.700-1.678-1.694-1.701-1.691-1.704-1.695
-45-1.600-1.589-1.612-1.603-1.583-1.592-1.602-1.598-1.609-1.597
-44-1.511-1.508-1.525-1.517-1.506-1.511-1.516-1.507-1.524-1.509
-43-1.442-1.429-1.445-1.444-1.433-1.431-1.433-1.435-1.447-1.433
-42-1.372-1.371-1.381-1.381-1.367-1.359-1.366-1.369-1.377-1.368
-41-1.311-1.312-1.321-1.320-1.306-1.300-1.308-1.308-1.319-1.313
-40-1.255-1.255-1.263-1.260-1.249-1.244-1.252-1.249-1.260-1.258
-39-1.204-1.202-1.214-1.208-1.197-1.194-1.199-1.199-1.198-1.204
-38-1.154-1.150-1.167-1.150-1.153-1.147-1.153-1.148-1.151-1.157
-37-1.106-1.100-1.118-1.103-1.099-1.099-1.105-1.099-1.099-1.110
-36-1.063-1.059-1.074-1.055-1.056-1.053-1.057-1.052-1.053-1.069
-35-1.021-1.011-1.031-1.014-1.014-1.012-1.015-1.010-1.009-1.028
-34-0.980-0.971-0.990-0.974-0.974-0.972-0.975-0.971-0.973-0.986
-33-0.941-0.932-0.950-0.933-0.935-0.935-0.935-0.933-0.934-0.946
-32-0.901-0.898-0.910-0.896-0.897-0.896-0.892-0.900-0.895-0.907
-31-0.862-0.860-0.871-0.856-0.859-0.862-0.855-0.861-0.860-0.869
-30-0.826-0.828-0.835-0.819-0.823-0.826-0.821-0.826-0.825-0.834
-29-0.793-0.789-0.798-0.784-0.789-0.791-0.786-0.791-0.791-0.799
-28-0.759-0.757-0.763-0.752-0.757-0.757-0.750-0.756-0.756-0.766
-27-0.726-0.723-0.729-0.719-0.725-0.729-0.717-0.721-0.721-0.731
-26-0.694-0.694-0.697-0.687-0.694-0.698-0.686-0.688-0.689-0.700
-25-0.661-0.662-0.667-0.655-0.661-0.668-0.652-0.659-0.656-0.667
-24-0.631-0.629-0.634-0.624-0.631-0.637-0.621-0.623-0.626-0.636
-23-0.599-0.599-0.606-0.593-0.599-0.606-0.593-0.593-0.598-0.605
-22-0.568-0.570-0.575-0.564-0.567-0.576-0.566-0.565-0.567-0.575
-21-0.540-0.538-0.546-0.534-0.539-0.545-0.537-0.538-0.540-0.549
-20-0.513-0.511-0.516-0.504-0.513-0.516-0.506-0.508-0.513-0.521
-19-0.484-0.483-0.488-0.475-0.486-0.489-0.478-0.480-0.484-0.489
-18-0.455-0.454-0.459-0.450-0.460-0.460-0.450-0.454-0.456-0.462
-17-0.427-0.428-0.432-0.424-0.432-0.433-0.420-0.426-0.428-0.434
-16-0.398-0.403-0.403-0.399-0.403-0.406-0.395-0.400-0.401-0.407
-15-0.371-0.376-0.375-0.373-0.376-0.380-0.369-0.373-0.373-0.378
-14-0.345-0.348-0.348-0.349-0.349-0.352-0.344-0.347-0.344-0.350
-13-0.320-0.320-0.320-0.322-0.324-0.324-0.317-0.320-0.317-0.325
-12-0.294-0.295-0.293-0.297-0.296-0.296-0.290-0.292-0.290-0.297
-11-0.268-0.269-0.267-0.270-0.272-0.271-0.265-0.267-0.265-0.273
-10-0.244-0.243-0.242-0.241-0.246-0.246-0.239-0.244-0.239-0.248
-9-0.218-0.216-0.217-0.215-0.221-0.222-0.214-0.219-0.213-0.221
-8-0.192-0.189-0.192-0.190-0.195-0.195-0.188-0.193-0.187-0.192
-7-0.167-0.164-0.163-0.166-0.171-0.170-0.162-0.167-0.163-0.165
-6-0.142-0.137-0.137-0.139-0.147-0.145-0.136-0.142-0.138-0.140
-5-0.115-0.112-0.112-0.115-0.123-0.119-0.111-0.117-0.111-0.113
-4-0.090-0.086-0.087-0.087-0.098-0.094-0.086-0.093-0.089-0.090
-3-0.065-0.061-0.063-0.063-0.074-0.068-0.060-0.066-0.063-0.062
-2-0.039-0.037-0.036-0.037-0.047-0.041-0.035-0.041-0.036-0.038
-1-0.014-0.009-0.009-0.011-0.020-0.016-0.013-0.014-0.013-0.011
10.0120.0150.0170.0140.0070.0090.0130.0100.0120.015
20.0360.0390.0430.0410.0330.0330.0390.0360.0400.040
30.0630.0630.0670.0650.0590.0580.0630.0630.0630.066
40.0850.0870.0940.0900.0850.0830.0880.0890.0870.092
50.1110.1120.1230.1140.1110.1100.1120.1140.1120.116
60.1350.1380.1490.1380.1320.1350.1370.1380.1370.141
70.1610.1650.1740.1630.1570.1610.1610.1620.1630.166
80.1860.1910.2000.1900.1850.1870.1870.1880.1880.197
90.2130.2150.2240.2180.2110.2120.2110.2150.2130.223
100.2380.2420.2520.2430.2370.2380.2340.2400.2390.249
110.2660.2680.2760.2710.2640.2640.2610.2670.2640.274
120.2910.2960.3010.2950.2900.2890.2880.2930.2910.296
130.3170.3230.3280.3220.3150.3160.3160.3200.3170.322
140.3460.3510.3550.3490.3410.3430.3430.3470.3450.347
150.3710.3760.3800.3780.3680.3700.3700.3740.3720.375
160.4000.4020.4080.4030.3950.3970.4000.4010.3980.400
170.4280.4280.4360.4280.4220.4220.4270.4280.4250.429
180.4570.4570.4630.4560.4480.4490.4550.4580.4530.455
190.4850.4850.4900.4840.4800.4780.4830.4840.4820.484
200.5130.5150.5200.5130.5070.5080.5100.5130.5120.512
210.5420.5430.5470.5430.5360.5360.5390.5410.5410.541
220.5710.5720.5760.5700.5660.5660.5700.5730.5710.570
230.6000.6000.6030.5990.5970.5970.5990.5990.6020.600
240.6330.6320.6340.6300.6260.6270.6270.6300.6310.630
250.6640.6600.6650.6590.6590.6580.6570.6610.6580.658
260.6960.6910.6960.6900.6910.6900.6890.6910.6900.693
270.7290.7230.7300.7230.7210.7260.7230.7220.7220.727
280.7630.7560.7630.7550.7530.7610.7540.7540.7560.762
290.7950.7890.7970.7900.7870.7940.7880.7860.7890.798
300.8300.8220.8290.8220.8230.8280.8210.8210.8250.832
310.8660.8590.8650.8550.8590.8640.8570.8570.8630.867
320.9050.8930.9040.8920.8970.9010.8930.8930.8990.901
330.9400.9320.9420.9300.9360.9370.9350.9320.9380.941
340.9800.9710.9800.9690.9760.9780.9760.9710.9760.983
351.0201.0111.0201.0121.0151.0241.0151.0141.0151.023
361.0631.0561.0611.0571.0601.0691.0551.0601.0531.067
371.1071.1041.1061.1001.1081.1161.1001.1041.0991.111
381.1531.1501.1561.1481.1551.1621.1501.1491.1501.158
391.2011.2031.2021.2021.2031.2101.1981.1981.2021.210
401.2551.2511.2531.2541.2591.2631.2491.2531.2551.262
411.3171.3061.3141.3101.3141.3211.3101.3101.3101.321
421.3771.3691.3781.3711.3761.3821.3701.3711.3711.379
431.4461.4371.4481.4351.4431.4461.4371.4391.4451.448
441.5211.5061.5191.5101.5211.5171.5121.5131.5161.521
451.6061.5901.6031.6001.6081.5961.6001.5931.6041.606
461.6991.6841.6951.6921.7061.6941.6931.6871.7011.703
471.8221.7951.8041.8071.8121.8171.8031.8031.8091.814
481.9601.9481.9431.9321.9571.9691.9481.9571.9551.954
492.1532.1282.1362.1362.1692.1782.1602.1632.1532.168
502.5072.4792.5182.5102.5132.5532.5062.5012.5212.526

Arrive Software welcomes additional effective low-toss RNG validation methods for large numbers at and above 1e18. Email random@arrivesoftware.com. Thank you.