How biased is my d20?
A little less than a year ago, a friend (who worked at a gaming store at the time) gave me a d20 as a present. Now, it's not a ‘proper’ d20 (proper d20 would have the numbers on the opposite sides total 21) — it's a HP tracker/damage counter dice, but:
- you don't look gift horse in its mouth, and
- the placement of numbers really shouldn't matter because in theory, the throws are random anyway.
But is that really so? If you possess an ideal die, then yes. The problem is that your average d20 isn't exactly ideal and is probably at least slightly unbalanced. Alternatively, I could've been set up with a weighted d20, which would be bad if the d20 liked to roll lower numbers more often. Since ‘‘trust no one’’ is kinda my motto when it comes to dealing with people, I decided to check if everything is the way it should be so I can — in case the d20 is indeed too biased — demand replacement before the warranty is up.
At that point, it's worth noting that the d20 would only get RMA'd if it was biased towards the lower values. I'm okay if dice is overly biased towards higher values, there's nothing wrong with that. Bias is only problematic if you're worse off because of it.
On the roll
So I got busy. I took a piece of paper and a pen (in later sessions, pencil) and started rolling. One line, 1 roll, and 5 rolls mean I color a square.
It quickly became obvious that not all numbers fall with equal frequency. Initially, number 17 showed a promise as I was getting it most often, but eventually it was overtaken by number 7. As 7 kept gaining huge advantage, 14 slowly started to emerge as the hero of the good side. It wasn't completely uncontested, though: 9 also soon became another champion for the negative side (though it never manage to achieve the #2 spot, not even for a round). Other numbers were getting rolled far less often, but despite the two strong champions on the bad side, numbers 11 and above seemed to appear slightly more often than their opponents.
During all this, 14 continued to become stronger and soon, Justice! was achieved. With it's 81th appearance, it got tied with 7 (which at that point also fell 81 times) and overtook it. 7 tried to challenge 14 a couple of times, trying to re-acquire the #1 position, but eventually failed. Other ties were 90:90, 99:99 and 107:107. Eventually, 14 got to 111 total rolls, at which point the experiment was concluded as I ran out of squares on the paper.
Some other fun stats: it took 87 rolls to get all the numbers. The 'most consecutive rolls' award goes to 7, as it's the only number that managed to show up three times in a row.
During the course of the experiment, the dice was rolled 1622 times. The bottom half (1-10) was the result of 798 rolls, while numbers 11-20 fell a grand total of 824 times. Bad side got 49.20% of rolls and the good side appeared in 50.80% of the rolls. The difference between the two is 1.60 percentage points. The value of an average roll was 10.70, which is a bit higher than the expected value (10.50).
Overall, the numbers look great. However, things change a bit when you look at each side separately:
||num of rolls||percentage of rolls||% better or worse than ideal|
|1||80||0,05 %||- 0,01 %|
|2||74||0,05 %||- 0,09 %|
|3||60||0,04 %||- 0,26 %|
|4||76||0,05 %||- 0,06 %|
|5||73||0,05 %||- 0,10 %|
|6||74||0,05 %||- 0,09 %|
|7||107||0,07 %||+ 0,32 %|
|8||59||0,04 %||- 0,27 %|
|9||101||0,06 %||+ 0,25 %|
|10||94||0,06 %||+ 0,16 %|
|11||83||0,05 %||+ 0,02 %|
|12||79||0,05 %||- 0,03 %|
|13||60||0,04 %||- 0,26 %|
|14||111||0,07 %||+ 0,37 %|
|15||95||0,06 %||+ 0,17 %|
|16||68||0,04 %||- 0,16 %|
|17||94||0,06 %||+ 0,16 %|
|18||77||0,05 %||- 0,05 %|
|19||69||0,04 %||- 0,15 %|
|20||88||0,05 %||+ 0,09 %|
Let's have some fun with this data. We can now calculate my chances for a successful roll, given I need to roll n at minimum.
Of course, with an average of 81 rolls per side, the sample size of this experiment isn't that big. I should probably have done a lot more roll. After all, some researchers flipped a coin a grand total of 40 000 (!!) times in order to prove or disprove their theories, and the coin has only two sides. Trying to get this degree of statistical significance on a d20 would almost take a lifetime! (But then again, I have a Raspberry Pi lying around completely unused (as well as two CD/DVD units). I suppose I could build an auto-roll machine and let it roll the dice and collect results for about a month or so. This would be fun project.)