PRNG Analysis

autohotkey


0:0.001013
1:0.001024
2:0.001009
3:0.000923
4:0.000983
5:0.000965
6:0.001017
7:0.001014
8:0.001008
9:0.001011
10:0.000962
11:0.000993
12:0.000981
13:0.000936
14:0.001089
15:0.001053
16:0.000975
17:0.000968
18:0.001019
19:0.001064
20:0.000953
21:0.001036
22:0.001072
23:0.000982
24:0.001021
25:0.000995
26:0.000962
27:0.001003
28:0.001003
29:0.000979
30:0.000952
31:0.001001
32:0.000987
33:0.001009
34:0.001035
35:0.001016
36:0.001007
37:0.000978
38:0.000989
39:0.000980
40:0.001004
41:0.001025
42:0.001014
43:0.001005
44:0.001004
45:0.000968
46:0.000988
47:0.001000
48:0.001058
49:0.001009
50:0.000991
51:0.001058
52:0.000951
53:0.001033
54:0.001038
55:0.000999
56:0.000983
57:0.000997
58:0.001024
59:0.001001
60:0.000997
61:0.000972
62:0.001062
63:0.000987
64:0.000995
65:0.001027
66:0.001021
67:0.000989
68:0.001061
69:0.001017
70:0.000978
71:0.000990
72:0.001013
73:0.001001
74:0.000952
75:0.000982
76:0.001022
77:0.000972
78:0.001011
79:0.000973
80:0.000939
81:0.000956
82:0.000979
83:0.000947
84:0.000993
85:0.001003
86:0.001020
87:0.001031
88:0.000969
89:0.000963
90:0.001036
91:0.001027
92:0.001010
93:0.001017
94:0.001110
95:0.001005
96:0.000999
97:0.000977
98:0.001003
99:0.001004
100:0.001021
101:0.000951
102:0.000984
103:0.000987
104:0.001002
105:0.000975
106:0.001025
107:0.001015
108:0.000956
109:0.000981
110:0.001042
111:0.001009
112:0.000988
113:0.000920
114:0.001040
115:0.001014
116:0.000984
117:0.001039
118:0.001020
119:0.001013
120:0.000972
121:0.000990
122:0.000976
123:0.001027
124:0.000975
125:0.000995
126:0.000980
127:0.001003
128:0.000982
129:0.001016
130:0.000997
131:0.001027
132:0.000977
133:0.000957
134:0.000988
135:0.000989
136:0.000989
137:0.000972
138:0.000967
139:0.000943
140:0.001011
141:0.001015
142:0.000953
143:0.000978
144:0.001016
145:0.001035
146:0.001032
147:0.000973
148:0.001023
149:0.001001
150:0.001017
151:0.000968
152:0.000999
153:0.001059
154:0.000944
155:0.000893
156:0.000981
157:0.000973
158:0.001037
159:0.001056
160:0.001047
161:0.000962
162:0.001040
163:0.000971
164:0.000966
165:0.001002
166:0.001022
167:0.000990
168:0.000965
169:0.000989
170:0.001060
171:0.001025
172:0.001008
173:0.000988
174:0.001050
175:0.000962
176:0.001022
177:0.000999
178:0.001016
179:0.001042
180:0.001002
181:0.000980
182:0.000968
183:0.001010
184:0.000995
185:0.001026
186:0.001035
187:0.000999
188:0.000985
189:0.000973
190:0.001063
191:0.000969
192:0.000981
193:0.001019
194:0.001015
195:0.001005
196:0.000972
197:0.000947
198:0.001040
199:0.000988
200:0.001006
201:0.000930
202:0.000995
203:0.001015
204:0.000958
205:0.001019
206:0.000973
207:0.001002
208:0.001001
209:0.000971
210:0.001035
211:0.001030
212:0.001003
213:0.000969
214:0.001029
215:0.000997
216:0.001006
217:0.001054
218:0.000985
219:0.001004
220:0.001001
221:0.000996
222:0.001016
223:0.000970
224:0.000928
225:0.000972
226:0.000981
227:0.001006
228:0.000997
229:0.000979
230:0.001001
231:0.001063
232:0.001009
233:0.001021
234:0.001003
235:0.001048
236:0.000994
237:0.000975
238:0.000999
239:0.000971
240:0.001016
241:0.001008
242:0.000994
243:0.001003
244:0.000989
245:0.000987
246:0.001005
247:0.001033
248:0.001056
249:0.000979
250:0.001002
251:0.000988
252:0.000980
253:0.000974
254:0.000974
255:0.001030
256:0.001026
257:0.001016
258:0.000980
259:0.001037
260:0.000989
261:0.000969
262:0.000987
263:0.000950
264:0.001020
265:0.001033
266:0.001007
267:0.001015
268:0.000970
269:0.001024
270:0.000984
271:0.001011
272:0.001061
273:0.001024
274:0.000993
275:0.000963
276:0.001018
277:0.001008
278:0.001015
279:0.000989
280:0.000975
281:0.001025
282:0.000988
283:0.001029
284:0.001009
285:0.001005
286:0.001001
287:0.000966
288:0.001017
289:0.001013
290:0.001003
291:0.000962
292:0.000997
293:0.000959
294:0.000969
295:0.000965
296:0.001014
297:0.001022
298:0.001020
299:0.000998
300:0.000995
301:0.000998
302:0.001036
303:0.000960
304:0.001017
305:0.000989
306:0.001021
307:0.000930
308:0.001052
309:0.001013
310:0.001011
311:0.000984
312:0.001051
313:0.001010
314:0.001028
315:0.001004
316:0.000984
317:0.000985
318:0.001005
319:0.001031
320:0.001066
321:0.000987
322:0.000949
323:0.000989
324:0.001004
325:0.000970
326:0.000985
327:0.001043
328:0.000935
329:0.000973
330:0.001027
331:0.001015
332:0.000951
333:0.000979
334:0.001035
335:0.000956
336:0.000993
337:0.001041
338:0.000997
339:0.001074
340:0.001044
341:0.001030
342:0.000965
343:0.001019
344:0.000966
345:0.001017
346:0.000982
347:0.000967
348:0.001051
349:0.000995
350:0.000978
351:0.001034
352:0.000973
353:0.001018
354:0.001022
355:0.001069
356:0.000982
357:0.000994
358:0.001044
359:0.001021
360:0.000997
361:0.000976
362:0.001059
363:0.000956
364:0.001003
365:0.000993
366:0.001003
367:0.001027
368:0.001014
369:0.000969
370:0.000990
371:0.001017
372:0.000965
373:0.000946
374:0.000985
375:0.001007
376:0.000959
377:0.000992
378:0.000974
379:0.001040
380:0.000988
381:0.001019
382:0.001007
383:0.000999
384:0.000986
385:0.001055
386:0.001031
387:0.000990
388:0.000992
389:0.001044
390:0.000911
391:0.001018
392:0.000986
393:0.000970
394:0.001037
395:0.001012
396:0.001005
397:0.001005
398:0.001017
399:0.000961
400:0.000996
401:0.001019
402:0.000958
403:0.001043
404:0.001013
405:0.000985
406:0.000991
407:0.000995
408:0.000953
409:0.000962
410:0.001012
411:0.001047
412:0.001006
413:0.001011
414:0.001014
415:0.000961
416:0.000982
417:0.001025
418:0.000975
419:0.001045
420:0.001011
421:0.001018
422:0.001022
423:0.001032
424:0.000976
425:0.000997
426:0.001035
427:0.000953
428:0.000969
429:0.001021
430:0.001010
431:0.000958
432:0.001010
433:0.000980
434:0.001025
435:0.001002
436:0.001000
437:0.001020
438:0.000997
439:0.000971
440:0.000989
441:0.001059
442:0.001069
443:0.001021
444:0.000996
445:0.001058
446:0.001029
447:0.001006
448:0.000955
449:0.001020
450:0.001027
451:0.001001
452:0.000950
453:0.000960
454:0.000962
455:0.001002
456:0.001022
457:0.000994
458:0.001008
459:0.000986
460:0.000971
461:0.000971
462:0.000998
463:0.001018
464:0.001051
465:0.001007
466:0.001013
467:0.000975
468:0.001057
469:0.000984
470:0.001012
471:0.000997
472:0.001053
473:0.001004
474:0.000980
475:0.001037
476:0.001034
477:0.001060
478:0.001042
479:0.001016
480:0.000998
481:0.001023
482:0.001013
483:0.000927
484:0.000981
485:0.001044
486:0.001021
487:0.001016
488:0.001017
489:0.000987
490:0.000983
491:0.001017
492:0.001001
493:0.000969
494:0.001008
495:0.001000
496:0.000991
497:0.000993
498:0.000983
499:0.001040
500:0.000985
501:0.001055
502:0.000993
503:0.000978
504:0.001016
505:0.001020
506:0.000976
507:0.000971
508:0.000988
509:0.000977
510:0.000987
511:0.000995
512:0.001052
513:0.001070
514:0.001006
515:0.001023
516:0.000998
517:0.000980
518:0.001042
519:0.001027
520:0.001017
521:0.001043
522:0.001006
523:0.001028
524:0.001009
525:0.000979
526:0.001053
527:0.001023
528:0.000985
529:0.001036
530:0.000973
531:0.001026
532:0.001011
533:0.001066
534:0.000957
535:0.001001
536:0.000949
537:0.001024
538:0.001012
539:0.001025
540:0.000944
541:0.000998
542:0.000949
543:0.000966
544:0.001009
545:0.001050
546:0.001038
547:0.001042
548:0.001051
549:0.000982
550:0.000976
551:0.001017
552:0.000999
553:0.001035
554:0.000961
555:0.001015
556:0.001009
557:0.000992
558:0.001002
559:0.001002
560:0.001041
561:0.001042
562:0.000972
563:0.001014
564:0.001001
565:0.001009
566:0.000992
567:0.001004
568:0.001003
569:0.001031
570:0.001011
571:0.001052
572:0.000975
573:0.000966
574:0.001007
575:0.000998
576:0.000997
577:0.001019
578:0.000993
579:0.001011
580:0.000981
581:0.001034
582:0.001020
583:0.000995
584:0.000998
585:0.001112
586:0.001028
587:0.001008
588:0.001029
589:0.000957
590:0.000958
591:0.000911
592:0.001006
593:0.001012
594:0.001008
595:0.001036
596:0.000908
597:0.000963
598:0.000982
599:0.000985
600:0.000940
601:0.000992
602:0.000998
603:0.000979
604:0.000949
605:0.000963
606:0.001014
607:0.000983
608:0.000953
609:0.000955
610:0.000971
611:0.000952
612:0.001035
613:0.000998
614:0.000971
615:0.001044
616:0.000976
617:0.001066
618:0.000990
619:0.001047
620:0.000980
621:0.001064
622:0.000992
623:0.000982
624:0.000986
625:0.000999
626:0.000990
627:0.000991
628:0.000990
629:0.000996
630:0.001051
631:0.001028
632:0.000989
633:0.000991
634:0.001015
635:0.000981
636:0.000960
637:0.000986
638:0.001010
639:0.000992
640:0.001002
641:0.001041
642:0.001024
643:0.001039
644:0.001002
645:0.001000
646:0.001024
647:0.001062
648:0.001030
649:0.001006
650:0.000988
651:0.001014
652:0.001047
653:0.001002
654:0.000974
655:0.000988
656:0.000983
657:0.001001
658:0.001014
659:0.000953
660:0.001004
661:0.000968
662:0.001012
663:0.000944
664:0.000948
665:0.001011
666:0.001007
667:0.000981
668:0.001032
669:0.000980
670:0.001035
671:0.000953
672:0.000991
673:0.001007
674:0.000986
675:0.001028
676:0.000991
677:0.000939
678:0.001028
679:0.001000
680:0.001057
681:0.001000
682:0.000990
683:0.000966
684:0.001034
685:0.001026
686:0.001042
687:0.001003
688:0.000947
689:0.001032
690:0.000977
691:0.000966
692:0.000980
693:0.001023
694:0.001017
695:0.001004
696:0.000944
697:0.001023
698:0.000998
699:0.001017
700:0.000998
701:0.001010
702:0.001035
703:0.000985
704:0.000959
705:0.001014
706:0.000993
707:0.001025
708:0.000971
709:0.000951
710:0.000975
711:0.000983
712:0.001026
713:0.000995
714:0.000965
715:0.000933
716:0.000979
717:0.000954
718:0.001007
719:0.000947
720:0.000985
721:0.001009
722:0.001005
723:0.000953
724:0.001005
725:0.001003
726:0.001003
727:0.000992
728:0.001006
729:0.000917
730:0.000996
731:0.001021
732:0.001013
733:0.000939
734:0.000971
735:0.001041
736:0.001050
737:0.000998
738:0.001008
739:0.001045
740:0.000999
741:0.000982
742:0.000949
743:0.001012
744:0.001042
745:0.000944
746:0.000965
747:0.000965
748:0.000995
749:0.000967
750:0.000956
751:0.001024
752:0.000993
753:0.000990
754:0.001056
755:0.001035
756:0.001013
757:0.001038
758:0.001040
759:0.001021
760:0.001008
761:0.001032
762:0.000989
763:0.001033
764:0.000987
765:0.001035
766:0.001029
767:0.001018
768:0.001015
769:0.001015
770:0.001052
771:0.001031
772:0.001037
773:0.000984
774:0.001011
775:0.000946
776:0.000923
777:0.001008
778:0.000965
779:0.000988
780:0.001018
781:0.000991
782:0.000918
783:0.001014
784:0.001060
785:0.000998
786:0.000965
787:0.000983
788:0.000994
789:0.000993
790:0.001033
791:0.001045
792:0.000926
793:0.000963
794:0.001011
795:0.001051
796:0.001002
797:0.001019
798:0.000975
799:0.001019
800:0.001042
801:0.001022
802:0.001027
803:0.000929
804:0.001050
805:0.000981
806:0.000975
807:0.000997
808:0.001021
809:0.001004
810:0.001055
811:0.001076
812:0.000972
813:0.000959
814:0.001006
815:0.001002
816:0.001018
817:0.001017
818:0.001054
819:0.000979
820:0.001022
821:0.000963
822:0.000972
823:0.000979
824:0.000992
825:0.000950
826:0.000963
827:0.001012
828:0.000956
829:0.000974
830:0.000988
831:0.000994
832:0.001030
833:0.001011
834:0.000942
835:0.000925
836:0.001006
837:0.001009
838:0.001026
839:0.001001
840:0.000985
841:0.001016
842:0.000987
843:0.000953
844:0.000984
845:0.001006
846:0.001022
847:0.000989
848:0.000993
849:0.001020
850:0.000994
851:0.000992
852:0.000980
853:0.001015
854:0.001005
855:0.000980
856:0.001014
857:0.000972
858:0.000962
859:0.000932
860:0.001016
861:0.001010
862:0.000918
863:0.001048
864:0.001012
865:0.001059
866:0.000978
867:0.001065
868:0.000989
869:0.000978
870:0.001008
871:0.001005
872:0.001036
873:0.001014
874:0.001049
875:0.000973
876:0.000974
877:0.000979
878:0.000994
879:0.001011
880:0.000975
881:0.001000
882:0.000995
883:0.001003
884:0.001011
885:0.001059
886:0.001030
887:0.000980
888:0.001031
889:0.000980
890:0.000984
891:0.000948
892:0.001015
893:0.001001
894:0.000988
895:0.000950
896:0.000935
897:0.000991
898:0.001017
899:0.001053
900:0.001012
901:0.000989
902:0.001025
903:0.000987
904:0.001050
905:0.001014
906:0.001072
907:0.001015
908:0.001017
909:0.001027
910:0.000996
911:0.001011
912:0.001037
913:0.000997
914:0.001007
915:0.000987
916:0.001002
917:0.001015
918:0.001014
919:0.001015
920:0.000996
921:0.000922
922:0.001017
923:0.000990
924:0.000976
925:0.000996
926:0.000984
927:0.000946
928:0.001048
929:0.000996
930:0.000996
931:0.000961
932:0.001020
933:0.000994
934:0.000959
935:0.000913
936:0.001020
937:0.000949
938:0.001014
939:0.000979
940:0.001030
941:0.001011
942:0.001015
943:0.001011
944:0.000996
945:0.001021
946:0.001028
947:0.000999
948:0.000969
949:0.001039
950:0.000964
951:0.000993
952:0.001015
953:0.000989
954:0.001025
955:0.000945
956:0.000949
957:0.000962
958:0.001011
959:0.000968
960:0.001045
961:0.001022
962:0.001027
963:0.000991
964:0.000994
965:0.000958
966:0.000944
967:0.001016
968:0.000995
969:0.001028
970:0.000959
971:0.001002
972:0.000980
973:0.001007
974:0.000965
975:0.001018
976:0.000892
977:0.000971
978:0.001045
979:0.001053
980:0.000989
981:0.001002
982:0.001006
983:0.001048
984:0.000976
985:0.000940
986:0.000934
987:0.000985
988:0.001039
989:0.000961
990:0.001039
991:0.000997
992:0.001023
993:0.001031
994:0.001038
995:0.001038
996:0.001016
997:0.000992
998:0.000946
999:0.000994
0:0.099598
1:0.100222
2:0.100196
3:0.099954
4:0.100083
5:0.099782
6:0.100499
7:0.100182
8:0.100005
9:0.099479
0:0.099995
1:0.099992
2:0.099995
3:0.099982
4:0.100007
5:0.099992
6:0.100026
7:0.100008
8:0.100010
9:0.099992

; Set the number of random numbers to generate and the upper bound for the numbers
n := 10
x := 100

; Generate N random numbers between 1 and X
numbers := []
Random, number, 1, x, %n%
Loop, %n%
{
    numbers.Push(number%A_Index%)
}

; Calculate the probability of each number
counts := []
total := n
Loop, %x%
{
    counts[A_Index] := 0
}
Loop, %n%
{
    counts[numbers[A_Index]]++
}
probabilities := []
Loop, %x%
{
    probabilities[A_Index] := counts[A_Index] / total
}

; Generate a file name based on the values of N and X
fileName := "ahk_" n "_" x ".csv"

; Create the "outputs" directory if it does not exist
IfNotExist, outputs
{
    FileCreateDir, outputs
}

; Write the probabilities to a file in the "outputs" directory
file := FileOpen("outputs\" fileName, "w")
Loop, %x%
{
    FileWriteLine, %file%, %A_Index%, %probabilities[A_Index]
}
FileClose, %file%