PRNG Analysis

haskell


1: 0.000949000
2: 0.001018000
3: 0.000947000
4: 0.001046000
5: 0.000976000
6: 0.000948000
7: 0.001037000
8: 0.000994000
9: 0.000979000
10: 0.000971000
11: 0.001028000
12: 0.000996000
13: 0.001038000
14: 0.001002000
15: 0.001025000
16: 0.001030000
17: 0.001007000
18: 0.001019000
19: 0.000977000
20: 0.000988000
21: 0.001054000
22: 0.001035000
23: 0.001070000
24: 0.001018000
25: 0.000969000
26: 0.000984000
27: 0.001010000
28: 0.000988000
29: 0.000985000
30: 0.000971000
31: 0.001023000
32: 0.000984000
33: 0.000998000
34: 0.000969000
35: 0.000942000
36: 0.001031000
37: 0.001004000
38: 0.001013000
39: 0.001017000
40: 0.000960000
41: 0.001010000
42: 0.000988000
43: 0.000986000
44: 0.000973000
45: 0.001013000
46: 0.001043000
47: 0.000953000
48: 0.001022000
49: 0.001034000
50: 0.000968000
51: 0.000996000
52: 0.000941000
53: 0.000985000
54: 0.001041000
55: 0.001003000
56: 0.001023000
57: 0.001014000
58: 0.001010000
59: 0.000997000
60: 0.000988000
61: 0.001031000
62: 0.000938000
63: 0.000924000
64: 0.001006000
65: 0.000978000
66: 0.000949000
67: 0.000985000
68: 0.001044000
69: 0.000979000
70: 0.000998000
71: 0.000986000
72: 0.001027000
73: 0.001015000
74: 0.000996000
75: 0.000986000
76: 0.000976000
77: 0.001050000
78: 0.000974000
79: 0.001008000
80: 0.000979000
81: 0.000976000
82: 0.000976000
83: 0.001021000
84: 0.001047000
85: 0.000980000
86: 0.000984000
87: 0.000943000
88: 0.001015000
89: 0.000985000
90: 0.001020000
91: 0.000980000
92: 0.001013000
93: 0.001099000
94: 0.000993000
95: 0.000974000
96: 0.001015000
97: 0.001030000
98: 0.001010000
99: 0.001031000
100: 0.000958000
101: 0.000983000
102: 0.001035000
103: 0.000934000
104: 0.001018000
105: 0.001047000
106: 0.001020000
107: 0.000970000
108: 0.000992000
109: 0.001028000
110: 0.001013000
111: 0.000972000
112: 0.001000000
113: 0.000966000
114: 0.001058000
115: 0.000969000
116: 0.001056000
117: 0.001001000
118: 0.000997000
119: 0.000996000
120: 0.001030000
121: 0.001000000
122: 0.001051000
123: 0.001003000
124: 0.001033000
125: 0.000988000
126: 0.000986000
127: 0.000986000
128: 0.001020000
129: 0.001045000
130: 0.001015000
131: 0.001048000
132: 0.001022000
133: 0.001001000
134: 0.000972000
135: 0.001001000
136: 0.000998000
137: 0.000996000
138: 0.001002000
139: 0.000992000
140: 0.001003000
141: 0.000951000
142: 0.001004000
143: 0.000994000
144: 0.000989000
145: 0.001021000
146: 0.000969000
147: 0.001030000
148: 0.001015000
149: 0.001032000
150: 0.001033000
151: 0.001058000
152: 0.001031000
153: 0.001016000
154: 0.001061000
155: 0.000961000
156: 0.001034000
157: 0.000960000
158: 0.001035000
159: 0.001095000
160: 0.000990000
161: 0.001036000
162: 0.000945000
163: 0.000942000
164: 0.000975000
165: 0.000990000
166: 0.001011000
167: 0.001000000
168: 0.000995000
169: 0.001038000
170: 0.001047000
171: 0.000990000
172: 0.001010000
173: 0.001007000
174: 0.000988000
175: 0.000969000
176: 0.000992000
177: 0.001020000
178: 0.001073000
179: 0.000948000
180: 0.000939000
181: 0.000985000
182: 0.000893000
183: 0.000918000
184: 0.001006000
185: 0.000989000
186: 0.000918000
187: 0.001004000
188: 0.001067000
189: 0.001026000
190: 0.000990000
191: 0.000983000
192: 0.001060000
193: 0.001026000
194: 0.000971000
195: 0.001054000
196: 0.000953000
197: 0.001009000
198: 0.000981000
199: 0.001020000
200: 0.001027000
201: 0.001023000
202: 0.001006000
203: 0.000988000
204: 0.001024000
205: 0.000992000
206: 0.001011000
207: 0.001004000
208: 0.001004000
209: 0.001027000
210: 0.001001000
211: 0.001028000
212: 0.000972000
213: 0.001000000
214: 0.001016000
215: 0.001077000
216: 0.000963000
217: 0.000997000
218: 0.001022000
219: 0.000994000
220: 0.000991000
221: 0.001009000
222: 0.000997000
223: 0.001023000
224: 0.001008000
225: 0.001038000
226: 0.001012000
227: 0.001003000
228: 0.000978000
229: 0.001006000
230: 0.001019000
231: 0.001000000
232: 0.000996000
233: 0.001051000
234: 0.000967000
235: 0.001003000
236: 0.001029000
237: 0.000991000
238: 0.000971000
239: 0.001043000
240: 0.000978000
241: 0.001081000
242: 0.000992000
243: 0.000965000
244: 0.001006000
245: 0.001012000
246: 0.000957000
247: 0.001021000
248: 0.000964000
249: 0.001027000
250: 0.000990000
251: 0.001032000
252: 0.001007000
253: 0.000967000
254: 0.001010000
255: 0.000977000
256: 0.001067000
257: 0.000959000
258: 0.000985000
259: 0.000966000
260: 0.001025000
261: 0.001028000
262: 0.000959000
263: 0.000987000
264: 0.001072000
265: 0.001050000
266: 0.000979000
267: 0.001024000
268: 0.001021000
269: 0.001028000
270: 0.001045000
271: 0.001025000
272: 0.001000000
273: 0.001025000
274: 0.000974000
275: 0.001025000
276: 0.000951000
277: 0.000953000
278: 0.000988000
279: 0.000983000
280: 0.000970000
281: 0.000987000
282: 0.000948000
283: 0.001020000
284: 0.000987000
285: 0.000946000
286: 0.000926000
287: 0.001003000
288: 0.000954000
289: 0.000975000
290: 0.000989000
291: 0.000950000
292: 0.001024000
293: 0.001019000
294: 0.000970000
295: 0.000999000
296: 0.000994000
297: 0.000992000
298: 0.001028000
299: 0.001037000
300: 0.001006000
301: 0.000986000
302: 0.000973000
303: 0.001040000
304: 0.001041000
305: 0.000990000
306: 0.000982000
307: 0.000970000
308: 0.000952000
309: 0.001014000
310: 0.001036000
311: 0.000977000
312: 0.001001000
313: 0.001010000
314: 0.001009000
315: 0.000952000
316: 0.000972000
317: 0.000993000
318: 0.000989000
319: 0.001020000
320: 0.000990000
321: 0.001059000
322: 0.000985000
323: 0.000966000
324: 0.001000000
325: 0.000996000
326: 0.000958000
327: 0.001044000
328: 0.000997000
329: 0.001007000
330: 0.001112000
331: 0.000985000
332: 0.001024000
333: 0.001054000
334: 0.001010000
335: 0.001002000
336: 0.000953000
337: 0.001072000
338: 0.001007000
339: 0.001012000
340: 0.000995000
341: 0.001050000
342: 0.000975000
343: 0.000984000
344: 0.001061000
345: 0.000967000
346: 0.001049000
347: 0.000979000
348: 0.000980000
349: 0.001038000
350: 0.000958000
351: 0.000987000
352: 0.000974000
353: 0.000982000
354: 0.001017000
355: 0.001011000
356: 0.000971000
357: 0.000977000
358: 0.000986000
359: 0.000975000
360: 0.001079000
361: 0.001072000
362: 0.000980000
363: 0.001058000
364: 0.001006000
365: 0.001009000
366: 0.001012000
367: 0.001043000
368: 0.001020000
369: 0.001037000
370: 0.001014000
371: 0.000949000
372: 0.000990000
373: 0.000989000
374: 0.000983000
375: 0.000986000
376: 0.001007000
377: 0.000999000
378: 0.000943000
379: 0.001032000
380: 0.001004000
381: 0.000996000
382: 0.001030000
383: 0.001000000
384: 0.001006000
385: 0.001008000
386: 0.001026000
387: 0.001000000
388: 0.001004000
389: 0.001026000
390: 0.000972000
391: 0.000934000
392: 0.001001000
393: 0.001007000
394: 0.000988000
395: 0.001027000
396: 0.001031000
397: 0.001007000
398: 0.001004000
399: 0.000979000
400: 0.001001000
401: 0.000987000
402: 0.001035000
403: 0.001000000
404: 0.000955000
405: 0.000916000
406: 0.000930000
407: 0.000983000
408: 0.001000000
409: 0.000927000
410: 0.000981000
411: 0.000979000
412: 0.001107000
413: 0.001011000
414: 0.000968000
415: 0.001019000
416: 0.000973000
417: 0.001009000
418: 0.000991000
419: 0.001011000
420: 0.001004000
421: 0.000949000
422: 0.000992000
423: 0.000977000
424: 0.000951000
425: 0.001085000
426: 0.001037000
427: 0.000986000
428: 0.001015000
429: 0.000956000
430: 0.001015000
431: 0.001020000
432: 0.000969000
433: 0.000990000
434: 0.000957000
435: 0.000971000
436: 0.000957000
437: 0.001022000
438: 0.000980000
439: 0.000939000
440: 0.001033000
441: 0.000955000
442: 0.001035000
443: 0.001028000
444: 0.001014000
445: 0.001042000
446: 0.001029000
447: 0.001057000
448: 0.000974000
449: 0.000984000
450: 0.001001000
451: 0.001023000
452: 0.001058000
453: 0.000989000
454: 0.001072000
455: 0.001036000
456: 0.001044000
457: 0.001003000
458: 0.000949000
459: 0.001025000
460: 0.000993000
461: 0.000990000
462: 0.000990000
463: 0.000996000
464: 0.001030000
465: 0.001052000
466: 0.000974000
467: 0.001015000
468: 0.001047000
469: 0.001001000
470: 0.000973000
471: 0.001019000
472: 0.001024000
473: 0.000957000
474: 0.000979000
475: 0.001040000
476: 0.000978000
477: 0.001059000
478: 0.001001000
479: 0.001064000
480: 0.000961000
481: 0.000963000
482: 0.000948000
483: 0.000964000
484: 0.000972000
485: 0.000969000
486: 0.001011000
487: 0.001008000
488: 0.001000000
489: 0.000942000
490: 0.001011000
491: 0.001032000
492: 0.001047000
493: 0.001008000
494: 0.000978000
495: 0.000924000
496: 0.000988000
497: 0.001002000
498: 0.001056000
499: 0.000980000
500: 0.000984000
501: 0.000983000
502: 0.000934000
503: 0.000987000
504: 0.000947000
505: 0.001001000
506: 0.000962000
507: 0.001004000
508: 0.000989000
509: 0.000997000
510: 0.001036000
511: 0.000965000
512: 0.000989000
513: 0.000985000
514: 0.000976000
515: 0.001082000
516: 0.001033000
517: 0.000960000
518: 0.001026000
519: 0.001018000
520: 0.000972000
521: 0.001039000
522: 0.001020000
523: 0.000987000
524: 0.001020000
525: 0.000928000
526: 0.000954000
527: 0.000984000
528: 0.000944000
529: 0.001004000
530: 0.000946000
531: 0.001002000
532: 0.001013000
533: 0.000993000
534: 0.001004000
535: 0.000987000
536: 0.001044000
537: 0.000992000
538: 0.000990000
539: 0.000990000
540: 0.000971000
541: 0.001017000
542: 0.001041000
543: 0.000963000
544: 0.001030000
545: 0.000973000
546: 0.001010000
547: 0.001014000
548: 0.001014000
549: 0.001012000
550: 0.000989000
551: 0.000961000
552: 0.000983000
553: 0.001006000
554: 0.000933000
555: 0.000989000
556: 0.000950000
557: 0.001018000
558: 0.001000000
559: 0.001055000
560: 0.000963000
561: 0.001005000
562: 0.000989000
563: 0.000960000
564: 0.000975000
565: 0.000930000
566: 0.000993000
567: 0.001012000
568: 0.001038000
569: 0.001000000
570: 0.000982000
571: 0.001043000
572: 0.000906000
573: 0.000952000
574: 0.001042000
575: 0.000978000
576: 0.000964000
577: 0.000942000
578: 0.001008000
579: 0.001019000
580: 0.001001000
581: 0.000979000
582: 0.001032000
583: 0.000979000
584: 0.000956000
585: 0.001015000
586: 0.000963000
587: 0.001004000
588: 0.000989000
589: 0.000950000
590: 0.000988000
591: 0.000985000
592: 0.001095000
593: 0.000948000
594: 0.001009000
595: 0.000953000
596: 0.000953000
597: 0.000963000
598: 0.000984000
599: 0.001019000
600: 0.001031000
601: 0.001014000
602: 0.001028000
603: 0.000928000
604: 0.000983000
605: 0.000974000
606: 0.000986000
607: 0.001009000
608: 0.000983000
609: 0.001014000
610: 0.000986000
611: 0.001051000
612: 0.000965000
613: 0.001006000
614: 0.000989000
615: 0.001005000
616: 0.001012000
617: 0.000992000
618: 0.001023000
619: 0.001008000
620: 0.000929000
621: 0.000989000
622: 0.000902000
623: 0.001022000
624: 0.001039000
625: 0.001013000
626: 0.000989000
627: 0.000968000
628: 0.000973000
629: 0.000985000
630: 0.001017000
631: 0.001000000
632: 0.000992000
633: 0.000995000
634: 0.001041000
635: 0.001002000
636: 0.001004000
637: 0.001024000
638: 0.000997000
639: 0.001004000
640: 0.001008000
641: 0.000991000
642: 0.000984000
643: 0.000960000
644: 0.001039000
645: 0.001020000
646: 0.001003000
647: 0.001003000
648: 0.001047000
649: 0.000979000
650: 0.001006000
651: 0.001031000
652: 0.001052000
653: 0.001006000
654: 0.000974000
655: 0.001019000
656: 0.000986000
657: 0.001092000
658: 0.001017000
659: 0.001011000
660: 0.000951000
661: 0.000983000
662: 0.001000000
663: 0.000991000
664: 0.001013000
665: 0.001014000
666: 0.000983000
667: 0.000989000
668: 0.001037000
669: 0.001033000
670: 0.001034000
671: 0.000989000
672: 0.000976000
673: 0.001000000
674: 0.001001000
675: 0.000976000
676: 0.001001000
677: 0.001073000
678: 0.001056000
679: 0.000987000
680: 0.000973000
681: 0.001049000
682: 0.001014000
683: 0.001029000
684: 0.000980000
685: 0.001087000
686: 0.001034000
687: 0.000964000
688: 0.000960000
689: 0.001038000
690: 0.001006000
691: 0.001049000
692: 0.000966000
693: 0.000930000
694: 0.000982000
695: 0.000967000
696: 0.000925000
697: 0.000984000
698: 0.000987000
699: 0.000944000
700: 0.000984000
701: 0.000951000
702: 0.000959000
703: 0.000950000
704: 0.000969000
705: 0.000924000
706: 0.000974000
707: 0.001011000
708: 0.001045000
709: 0.000992000
710: 0.000939000
711: 0.001044000
712: 0.000975000
713: 0.000998000
714: 0.000941000
715: 0.001006000
716: 0.000973000
717: 0.001025000
718: 0.000989000
719: 0.000982000
720: 0.000987000
721: 0.001069000
722: 0.001006000
723: 0.001022000
724: 0.001011000
725: 0.001013000
726: 0.001032000
727: 0.000991000
728: 0.001070000
729: 0.001044000
730: 0.001055000
731: 0.001024000
732: 0.001038000
733: 0.000993000
734: 0.000981000
735: 0.001003000
736: 0.000994000
737: 0.000966000
738: 0.001005000
739: 0.001059000
740: 0.000974000
741: 0.000999000
742: 0.000949000
743: 0.000976000
744: 0.000985000
745: 0.000997000
746: 0.000964000
747: 0.001028000
748: 0.000979000
749: 0.000974000
750: 0.000945000
751: 0.000983000
752: 0.001040000
753: 0.001035000
754: 0.000954000
755: 0.000983000
756: 0.000983000
757: 0.000998000
758: 0.001105000
759: 0.000961000
760: 0.000997000
761: 0.001022000
762: 0.000978000
763: 0.000992000
764: 0.000982000
765: 0.001058000
766: 0.001000000
767: 0.000997000
768: 0.000940000
769: 0.000959000
770: 0.000988000
771: 0.001009000
772: 0.001037000
773: 0.001048000
774: 0.000994000
775: 0.001013000
776: 0.001030000
777: 0.000975000
778: 0.001014000
779: 0.000985000
780: 0.000995000
781: 0.001028000
782: 0.000970000
783: 0.000969000
784: 0.000940000
785: 0.000970000
786: 0.000984000
787: 0.000986000
788: 0.000978000
789: 0.000998000
790: 0.001057000
791: 0.001040000
792: 0.001036000
793: 0.001051000
794: 0.001005000
795: 0.001005000
796: 0.000985000
797: 0.000980000
798: 0.001010000
799: 0.000957000
800: 0.001003000
801: 0.000990000
802: 0.001006000
803: 0.000980000
804: 0.000956000
805: 0.000988000
806: 0.001003000
807: 0.001035000
808: 0.000957000
809: 0.001053000
810: 0.001040000
811: 0.001038000
812: 0.001026000
813: 0.001019000
814: 0.001002000
815: 0.001034000
816: 0.000992000
817: 0.000953000
818: 0.001014000
819: 0.001017000
820: 0.001034000
821: 0.000972000
822: 0.000985000
823: 0.000951000
824: 0.001009000
825: 0.001019000
826: 0.000985000
827: 0.001061000
828: 0.001062000
829: 0.001058000
830: 0.000964000
831: 0.000979000
832: 0.001028000
833: 0.000941000
834: 0.001011000
835: 0.000955000
836: 0.001003000
837: 0.000998000
838: 0.001014000
839: 0.000967000
840: 0.001012000
841: 0.000952000
842: 0.000988000
843: 0.001045000
844: 0.001028000
845: 0.000960000
846: 0.000934000
847: 0.001038000
848: 0.000957000
849: 0.001005000
850: 0.000983000
851: 0.000971000
852: 0.000986000
853: 0.001012000
854: 0.001097000
855: 0.001001000
856: 0.000933000
857: 0.000986000
858: 0.000960000
859: 0.000992000
860: 0.001037000
861: 0.000967000
862: 0.001022000
863: 0.001058000
864: 0.000990000
865: 0.000972000
866: 0.001045000
867: 0.001037000
868: 0.001071000
869: 0.001016000
870: 0.000996000
871: 0.000999000
872: 0.001018000
873: 0.001003000
874: 0.000906000
875: 0.000970000
876: 0.000984000
877: 0.000923000
878: 0.000955000
879: 0.000968000
880: 0.001022000
881: 0.000984000
882: 0.000970000
883: 0.000973000
884: 0.000997000
885: 0.000996000
886: 0.000955000
887: 0.001014000
888: 0.000997000
889: 0.001013000
890: 0.001009000
891: 0.000964000
892: 0.001003000
893: 0.000980000
894: 0.000950000
895: 0.001044000
896: 0.000959000
897: 0.000995000
898: 0.000992000
899: 0.001025000
900: 0.001024000
901: 0.000989000
902: 0.000928000
903: 0.001017000
904: 0.001090000
905: 0.001012000
906: 0.001019000
907: 0.000988000
908: 0.001031000
909: 0.000960000
910: 0.001095000
911: 0.000990000
912: 0.001042000
913: 0.001055000
914: 0.001001000
915: 0.001016000
916: 0.001016000
917: 0.001076000
918: 0.000980000
919: 0.001058000
920: 0.001049000
921: 0.000976000
922: 0.001032000
923: 0.001065000
924: 0.001066000
925: 0.001020000
926: 0.001007000
927: 0.001084000
928: 0.001004000
929: 0.001009000
930: 0.000995000
931: 0.001032000
932: 0.000969000
933: 0.000987000
934: 0.000959000
935: 0.000996000
936: 0.001060000
937: 0.000987000
938: 0.001018000
939: 0.000954000
940: 0.000985000
941: 0.000979000
942: 0.001008000
943: 0.001055000
944: 0.001004000
945: 0.001001000
946: 0.000974000
947: 0.000988000
948: 0.000985000
949: 0.001019000
950: 0.001006000
951: 0.001042000
952: 0.001044000
953: 0.000980000
954: 0.000982000
955: 0.000979000
956: 0.000974000
957: 0.001027000
958: 0.001014000
959: 0.000955000
960: 0.000943000
961: 0.001004000
962: 0.001054000
963: 0.000998000
964: 0.001056000
965: 0.001025000
966: 0.001045000
967: 0.001003000
968: 0.000991000
969: 0.000982000
970: 0.001032000
971: 0.000994000
972: 0.001048000
973: 0.001049000
974: 0.001038000
975: 0.000999000
976: 0.001012000
977: 0.000992000
978: 0.001014000
979: 0.000981000
980: 0.000998000
981: 0.001037000
982: 0.000985000
983: 0.001016000
984: 0.001032000
985: 0.000922000
986: 0.000980000
987: 0.001013000
988: 0.001001000
989: 0.001007000
990: 0.000955000
991: 0.000974000
992: 0.001017000
993: 0.000971000
994: 0.001067000
995: 0.000986000
996: 0.001000000
997: 0.001018000
998: 0.001009000
999: 0.000965000
1000: 0.001053000
1: 0.099972000
2: 0.099987000
3: 0.100198000
4: 0.099870000
5: 0.100078000
6: 0.100179000
7: 0.099849000
8: 0.099871000
9: 0.100114000
10: 0.099882000
1: 0.100004065
2: 0.100006434
3: 0.100013248
4: 0.099993593
5: 0.099993178
6: 0.099997079
7: 0.099989373
8: 0.100002263
9: 0.099985186
10: 0.100015581

import System.Random
import Text.Printf

main :: IO ()
main = do
  let n = 1000000000
      x = 10
  gen <- newStdGen
  let nums = take n (randomRs (1, x) gen :: [Int])
      freqs = map (\num -> (num, length (filter (== num) nums))) [1..x]
      probs = map (\(num, freq) -> (num, fromIntegral freq / fromIntegral n :: Double)) freqs
      filename = "haskell_" ++ show x ++ "_" ++ show n
  writeFile filename (unlines (map (\(num, prob) -> printf "%d: %.9f" num prob) probs))