(11C) Roll "Four" Dice at Random
|
10-15-2018, 06:33 PM
Post: #9
|
|||
|
|||
RE: (11C) Roll "Four" Dice at Random
(10-15-2018 04:29 PM)Albert Chan Wrote: For 3 dice rolls, dice distribution = 80*4 + 136*5. 5/4 = 1.25 is unacceptably bad. How did you come up with this distribution? Because I get the following result: >>> dice_dist(1000, 1) {0: 167, 1: 167, 2: 166, 3: 167, 4: 167, 5: 166} >>> dice_dist(1000, 2) {0: 335, 1: 333, 2: 332, 3: 335, 4: 333, 5: 332} >>> dice_dist(1000, 3) {0: 503, 1: 501, 2: 496, 3: 503, 4: 501, 5: 496} While this isn't an exact equal distribution I wouldn't say it's biased. However when we roll more dice the imbalance increases: >>> dice_dist(1000, 4) {0: 671, 1: 669, 2: 664, 3: 671, 4: 669, 5: 656} >>> dice_dist(1000, 5) {0: 839, 1: 837, 2: 832, 3: 839, 4: 837, 5: 816} >>> dice_dist(1000, 6) {0: 1007, 1: 1005, 2: 1000, 3: 1007, 4: 1005, 5: 976} This is not a big surprise. There are now gaps between consecutive numbers and thus some of the values aren't hit as last digit. Thus as a rule of thumb we should use it only if \(6^k < n\). Therefore \(6^3 = 216 < 1000\) is still okay while \(6^4 = 1296 > 1000\) starts getting problematic. This is the Python function I used to calculate the distribution of the dice: Code: def base6(n, k): Quote:To produce unbiased multiple dice roll, remove random below a threshold. That means 0 (i.e. [1, 1, 1]) can never happen? How is that not biased? Kind regards Thomas |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(11C) Roll "Four" Dice at Random - Gamo - 10-13-2018, 03:32 AM
RE: (11C) Roll "Four" Dice at Random - Gamo - 10-13-2018, 10:21 AM
RE: (11C) Roll "Four" Dice at Random - Valentin Albillo - 10-13-2018, 09:43 PM
RE: (11C) Roll "Four" Dice at Random - Gamo - 10-14-2018, 03:48 AM
RE: (11C) Roll "Four" Dice at Random - Gamo - 10-14-2018, 05:37 AM
RE: (11C) Roll "Four" Dice at Random - Dieter - 10-14-2018, 09:55 PM
RE: (11C) Roll "Four" Dice at Random - Thomas Klemm - 10-15-2018, 07:48 AM
RE: (11C) Roll "Four" Dice at Random - Albert Chan - 10-15-2018, 04:29 PM
RE: (11C) Roll "Four" Dice at Random - Thomas Klemm - 10-15-2018 06:33 PM
RE: (11C) Roll "Four" Dice at Random - Albert Chan - 10-16-2018, 12:17 AM
RE: (11C) Roll "Four" Dice at Random - Albert Chan - 10-16-2018, 04:20 PM
RE: (11C) Roll "Four" Dice at Random - Thomas Klemm - 10-16-2018, 08:37 AM
RE: (11C) Roll "Four" Dice at Random - Albert Chan - 10-16-2018, 09:17 PM
|
User(s) browsing this thread: 10 Guest(s)