Verify distribution uniformity/Naive: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: simplified the COMMAS function.)
m (added whitespace to the task's preamble.)
Line 4: Line 4:




;Ttask:
;Task:
Create a function to check that the random integers returned from a small-integer generator function have uniform distribution.
Create a function to check that the random integers returned from a small-integer generator function have uniform distribution.


Line 12: Line 12:
* The number of times to call the integer generator.
* The number of times to call the integer generator.
* A 'delta' value of some sort that indicates how close to a flat distribution is close enough.
* A 'delta' value of some sort that indicates how close to a flat distribution is close enough.



The function should produce:
The function should produce:
* Some indication of the distribution achieved.
* Some indication of the distribution achieved.
* An 'error' if the distribution is not flat enough.
* An 'error' if the distribution is not flat enough.



Show the distribution checker working when the produced distribution is flat enough and when it is not. (Use a generator from [[Seven-sided dice from five-sided dice]]).
Show the distribution checker working when the produced distribution is flat enough and when it is not. (Use a generator from [[Seven-sided dice from five-sided dice]]).



See also:
See also: