Verify distribution uniformity/Naive: Difference between revisions

Example is the D7 from D5
(CL distribution checker)
(Example is the D7 from D5)
Line 82:
finally (return bins))))</lang>
 
<pre>> (check-distribution #'(lambda () (random 10))d7 1000)
Distribution potentially skewed for 31: expected around 1001000/7 got 111153.
Distribution potentially skewed for 92: expected around 1001000/7 got 88119.
Distribution potentially skewed for 3: expected around 1000/7 got 125.
Distribution potentially skewed for 7: expected around 1000/7 got 156.
T
#<EQL Hash Table{107} 200BDC1B200B5A53>
 
ROSETTA-CODE 22 > (check-distribution #'(lambda () (random 10))d7 10000)
NIL
#<EQL Hash Table{107} 20090567200CB5BB></pre>
 
=={{header|OCaml}}==
Anonymous user