mdbtxt1
mdbtxt2
Proceed to Safety

# Dice for Benford's Law Distribution

Contents

### Powers of Ten Dice

One day I was looking through Eric Harshbarger's custom dice and was inspired by his Powers of Ten dice:

Eric Harshbarger's "Powers of Ten" dice

I love large numbers, and at first glance I thought these two dice could be used to generate any power of 10 from 100 to 1035. On closer inspection I realised that no they cannot, because the second one isn't all powers of 106, and doesn't include a 100. (If you roll them together and multiply, you can get from 106 to 1026, with values from 109 to 1023 being more common.)

That can be fixed easily, and while we're at it, let's use the single words myriad and lakh for 104 and 105. This pair of dice will select a power of ten from 100 to 1035:

(all non-negative exponents)

Like Eric I used short scale names. If you want something that includes fractions (powers of ten with negative exponents) you could do this:

(for exponents from 10-18 to 1017)

I used the Metric prefix forms of the negative powers of ten. It's still a little unbalanced (-18 to +17) but if we could add a random multiplier from 1.0 to 9.999..., we'd exactly cover the range from 10-18 to 1018. Read on!

### Uniformly Distributed Significands

The powers of ten are all well and good, and seem pretty popular with the large number fanboys who hang out on Googology, but the real beauty of large numbers is to be found off the beaten path. I was reminded of my life-long desire to generate random numbers whose logarithms are uniformly distributed1.

A mild improvement could be made by generating powers of 2, say with something like the doubling cube used in backgammon, and then use additional dice to generate a number from 1.0 to 1.999... that gets multiplied by this power of 2. But the multiplication would be difficult, and the distribution wouldn't be as smooth as I like it: every time you cross a power-of-two boundary, the distribution would make a sudden drop. One might just as well generate 32-bit binary numbers and convert to IEEE 32-bit floating point3.

A totally smooth distribution could be achieved easily on a computer by just generating a random number r in the ordinary way and computing 10r to get the needed distribution2. But that is unsatisfying. As an old-timer, early 80's D&D player, who marvelled at the possibilities of various Platonic solids, I lamented the lack of dice that could be used to roll the base-10 digits directly.

Let's formalise the problem.

The Harshbarger dice above (with my modification) are nicely designed so that one gives a power of a million, the other a power of ten, which can be combined (multiplied) to give us the "exponent" part of a floating point number. Now I'd like a douse4 to generate the significand (also called "mantissa").

The hardest part of the problem is the first digit. I can't just pick a digit from 1 to 9 (or from 0 to 9) at random. If a first digit of 1 is just as likely as a first digit of 9, then I'd get numbers in the range 100-199 just as often as numbers in the range 90-99, which hardly seems fair. The ten numbers 100-109 would come up only about 1/10 as often as 90-99.

I want my numbers to be logarithmically distributed within each decade (order of magnitude), so that numbers in the range 100-109 come up only slightly less often than 90-99. Read the Wikipedia article on Benford's law to see what we're up against. This is a distribution that comes up a lot in the real world (examples below).

Put another way, I'd like dice that can generate significands from 1.0 to 9.999... that would be distributed evenly along a slide-rule-like logarithmic scale:

There are a lot of ways this could be approached with dice. I could start with a monster polyhedron like the 120-sided disdyakis triacontahedron that recently started mass-production by the good folks at The Dice Lab. I could take the Benford percentages for the digits 1 through 9, scale each percentage to the nearest multiple of 1/120, label my d120 with numbers from 1 to 9 and have done with it.

Taking a more physics-based approach, I could design an oddly asymmetrical 9-sided polyhedron whose geometry is carefully aligned (and thoroughly tested) so that the odds of rolling digit d is proportional to log(1+1/d). It'd be hard to manufacture to within the desired tolerances, and hard to use because in all likelihood there would be few or no parallel opposite faces, so there'd be no easy way to see which side is facing up.

In addition to the manufacturing challenge, those approaches are unsatisfying because they're sort of "brute-force" solutions. They don't present any challenge in dealing with the unique demands and constraints of traditional dice, and by traditional, I mean super-oldskool, pre-D&D, 6-sided dice ... shaped like cubes ... and rolled in pairs.

### Munafo's Benford-Significand Dice

Let's stick to the familiar design constraints of two 6-sided dice. There are 36 possibilities, and all are equally likely. The two dice can be different, to make all 36 cases distinguishable if we want, but no tricks (magnets, holographic ink, nanobots...) are allowed. What's the best way to label two dice so that they give a digit from 1 to 9 with a Benford-like distribution, and are really easy to use?

I thought about this for a while one night, waiting to fall asleep5, and came up with this:

My "Benford-significand" Dice

These dice alone generate the first significand digit. To roll significands of two or more digits, you also need a standard d4, d6, and d10.

### Instructions

Rolling the First Digit

To get the first digit of the significand, roll both Benford-significand dice together.

• If you roll a 1 or a 2, that's your first digit.
• Otherwise, there will be exactly one digit that appears on both dice. That's your first digit.

For example, if your roll says "3 6" and "6 5 9", your first digit is a 6 because that's the only digit that appears on both dice.

If you prefer to avoid the unused die-roll, you can think of the instructions this way (it generates the same statistical distribution):

• Roll the first die (the one bearing the large 1s and 2). If you roll a 1 or a 2, that's your digit.
• Otherwise, you have a choice of 2 or 3 digits. Roll the other die to match one of the digits on the first die. You'll always get a match.

Orientation of 6 and 9

On one of the dice, 6 and 9 never appear together but appear with other digits whose orientation is clear. On the other die, 6 and 9 always appear together. There is therefore no ambiguity, and it is relatively unlikely one will glance at the roll and think "I rolled a 6 on one and a 9 on the other".

Rolling the Second Digit

To get the second digit of the significand:

• If your first digit was a 1 showing ".0.1.2.3", determine your second digit by rolling a d4 and subtracting 1.
• If your first digit was a 1 showing ".4.5.6.7.8.9", determine your second digit by rolling a d6 and adding 3.
• If your first digit was 2 or higher, determine your second digit by rolling a d10 (and if you roll 10, treat it as 0).

Rolling Third and Subsequent Digits

If you want more significand digits, roll a d10 once for each desired digit. If you roll a 10, treat it as 0.

### Probability Distribution

 single digits probability % ideal (Benford) 1 12/36 33.3% 30.1% 2 6/36 16.7% 17.6% 3 4/36 11.1% 12.5% 4 3/36 8.3% 9.7% 5 3/36 8.3% 7.9% 6 2/36 5.6% 6.7% 7 2/36 5.6% 5.8% 8 2/36 5.6% 5.1% 9 2/36 5.6% 4.6% two-digit combinations probability % ideal (Benford) 1.0 15/360 4.17% 4.14% 1.3 15/360 4.17% 3.22% 1.4 10/360 2.78% 3.00% 1.9 10/360 2.78% 2.23% 2.0 6/360 1.67% 2.12% 2.9 6/360 1.67% 1.47% 3.0 4/360 1.11% 1.42% 3.9 4/360 1.11% 1.10% 4.0 3/360 0.83% 1.07% 5.9 3/360 0.83% 0.730% 6.0 2/360 0.56% 0.718% 9.9 2/360 0.56% 0.436%

As you can see, the 1.0 through 1.9 block is broken up into two parts, smoothing out the probability distribution for those common numbers starting wih the digit 1. Overall, the probabilities achieved with this simple pair of specially-labeled d6 dice are pretty close to the ideal.

### Applications

Many things in the real world that can be measured with numbers have a distribution in which the initial digits obey Benford's law (or come fairly close). The Power law, Pareto distributions, and Zipf's law are related.

• What is the house number of the house where you lived as a child?
• How many people lived in your mom's home town/village/city when you were born?
• Think of the last book (or movie, piece of music, etc.) you bought. What was its total unit sales (How many copies were sold?)
• Choose a country at random from the CIA World Factbook. What is its population?
• Choose a person at random from among those you know. How many friends do they have (in real life, or in social networking)?
• Find the nearest hill and start climbing. How many metres can you ascend before reaching a hilltop/summit?
• Find the nearest pond or lake. What is its surface area, in square metres?
• Look at a recent statement for a credit card (or, if you usually pay by checks, for a checking account). Choose an item at random; what is the amount?

Robert Munafo       @mrob_27    6:27 PM - 18 Apr 2016
I designed dice to roll a floating-point significand with Benford law distribution. mrob.com/pub/math/benford-dice.html ... 1/2
... and guess who I'm hoping can make some for me? 2/2

Benford: It's Not Just the Law — It's How We Roll.

Also dice-related:

Footnotes

1 : If you have to ask why I'd have a life-long desire like that, then you most probably won't understand, and might be better off perusing some other part of my site, like the Gray-Scott patterns.

2 : The official name is reciprocal distribution because the probability density function is proportional to 1/x. Contrary to intuition, it is not called exponential distribution, a logarithmic distribution, or even an exponential-logarithmic distribution. The probability density function is nonzero only in a fixed range, say from 1.0 to 10.0, and elsewhere zero; and within that range it is proportional to 1/x. If the range covers an exact power of 10 (like from 1.0 to 10.0, or from 0.2 to 200.0, or from 0.000005 to 0.005, etc.) the first digits end up being distributed by the Benford's law distribution, i.e. proportional to ln(1+1/d) for each digit d.

3 : If you're really looking for some nerd Cred, generate 32 binary digits and convert to floating-point in your head...

4 : douse, analogous to "mouse" and "louse", is an alternative singular form of dice, for those of us who are of the "never-say-die" persuasion.

5 : Usually when this happens I can't sleep, and have to get up and write it all down, lest I forget some detail. I really should invest in a nyctograph. But this time was different — I had left the Harshbarger dice page open in my browser, so I knew I'd remember it all in the morning. Thanks Eric!

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2021 Mar 08. s.27