Post Reply 
(11C) Roll "Four" Dice at Random
10-15-2018, 04:29 PM (This post was last modified: 10-15-2018 06:16 PM by Albert Chan.)
Post: #8
RE: (11C) Roll "Four" Dice at Random
If tried to pull multiple dice rolls from a single RAN#, the bias might be too high.

For example, my Casio RAN# can produce between 0.000 to 0.999 (hopefully, unbiased)

For 1 dice roll, dice distribution = 167 + 167 + 166 + 167 + 167 + 166 (3 or 6 is less likely)
Ideally, we wanted even distribution, but 167/166 = 1.006 may be good enough.

For 3 dice rolls, dice distribution = 80*4 + 136*5. 5/4 = 1.25 is unacceptably bad.

To produce unbiased multiple dice roll, remove random below a threshold.
For my casio, remove RAN# below 0.136 should do it.

>>> total = 1000 # Casio RAN# 0.000 to 0.999
>>> dice3 = 6**3 # treble dice rolls
>>> unbiased = [ i % dice3 for i in range(total % dice3, total) ]
>>> [ unbiased.count(i) for i in range(dice3) ]
[4, 4, 4, 4, 4 ... ]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Roll "Four" Dice at Random - Gamo - 10-13-2018, 03:32 AM
RE: (11C) Roll "Four" Dice at Random - Albert Chan - 10-15-2018 04:29 PM



User(s) browsing this thread: 7 Guest(s)