Function RANDBETWEEN outputs bounding numbers at half the frequency of other outputs #2704
Open
1 task done
Labels
confirmed-bug
Issues with confirmed bugs
This issue is unique.
Operating System of DocumentServer
Linux (DEB package)
Version information
8.0.1.31
Expected Behavior
For example, RANDBETWEEN(1,3) should have an equal one third chance to output the numbers 1, 2, or 3. With a sufficiently large number of rolls, the relative frequency of each digit should approach 33.3%.
Actual Behavior
For RANDBETWEEN(1,3), the frequency of the digits 1, 2, and 3 after 10,000 rolls is approximately 25%, 50%, and 25% respectively. This off-balance behaviour is consistent among all RANDBETWEEN input values I've tested where the difference between the top value and bottom value is more than one.
Reproduction Steps
Additional information
A spreadsheet containing the frequencies of outputs for all valid combinations between 1 and 20 after 10,000 rolls is attached for your reference.
dice_roll_calc_test.xlsx
The text was updated successfully, but these errors were encountered: