Dice probability
Dice are the oldest random number generators, and probability theory began with them. Counting the ways dice can land explains which results are common and which are rare.
Equally likely faces
A fair die is a cube that is equally likely to land on each of its six faces, so each face has probability 1/6. On a standard die opposite faces add up to 7. That does not change the chances; it only makes a misprinted die easier to spot.
Counting the ways
With two dice, write the outcomes as ordered pairs: (1, 1), (1, 2), …, (6, 6). All 36 are equally likely. The probability of a sum is the number of pairs that give it divided by 36: 1/36 for 2, 2/36 for 3, up to 6/36 for 7 and back down to 1/36 for 12. Three dice have 6³ = 216 outcomes, and 10 and 11 can each be made in 27 ways.
Gerolamo Cardano counted like this in the 16th century. Galileo later explained to Italian gamblers why 10 comes up more often than 9 with three dice, although both can be written as a sum of three faces in six ways: 10 has 27 ordered outcomes and 9 only 25.
Expected and observed
The expected count of a result after N rolls is N times its probability. After 1,000 rolls of two dice, 7 is expected 1,000 × 6/36 ≈ 167 times and 2 about 28 times. The observed counts scatter around these numbers. For a result with probability p and expected count E = Np the typical spread is √(E(1 − p)), so 167 ± 12 and 28 ± 5 are ordinary results. In the app the dashed outlines are the expected counts and the filled bars the observed ones.
The law of large numbers and the bell curve
The more you roll, the closer each share gets to its probability: the law of large numbers. The absolute deviations grow, but more slowly than the number of rolls, so in percent the bars line up ever better with the outlines. Add more dice and the distribution of the sum becomes a bell curve. With five dice the 26 possible sums already follow a normal curve closely: the central limit theorem at work.
Testing a die: the chi-square test
Karl Pearson's chi-square test from 1900 measures how far observed counts O are from expected counts E:
χ² = Σ (O − E)² / E
For fair dice this sum approximately follows a chi-square distribution whose degrees of freedom are one less than the number of bars: 5 for one die, 10 for the sums of two dice. The p-value is the chance of a χ² at least as large if the dice are fair. A large p means the counts fit; a p below 0.05 is a warning, although one in twenty runs with fair dice gets there too. The test needs expected counts that are not too small, which is why the app waits for enough rolls.
Explore it in PictorX
Open Rolling dice and one die is already rolling, 100 times a second, up to 1,000 rolls. Choose up to five dice, the number of rolls and the speed. Number of rolls shows counts; Percent of rolls shows shares, which makes runs of different lengths easy to compare. The loaded die shows its six twice as often as each other face: watch its bar rise out of the dashed outline and the chi-square test catch it. Slow motion lets every roll tumble; click the dice or press Enter to roll once yourself. Save a PNG of the chart, or compare with the Galton board, where many small random steps also add up to a bell curve.
Frequently asked questions
What is the probability of rolling a 6?
1/6 for a fair die, about 16.7%. In 600 rolls you expect about 100 sixes, give or take about 9.
Why is 7 the most likely sum of two dice?
It can be made in six of the 36 equally likely ways: 1 + 6, 2 + 5, 3 + 4, 4 + 3, 5 + 2 and 6 + 1. No other sum has as many.
What is the chance of a double with two dice?
Six of the 36 outcomes are doubles, so 1/6.
What does the chi-square test tell me?
How surprising the differences between observed and expected counts would be for fair dice. A p-value below 0.05 suggests the dice are not fair, but one in twenty runs with fair dice gets there too.
Are the dice in the app fair?
Yes, unless you choose the loaded die. Each face is drawn with your browser's random number generator, with probability 1/6.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Try Rolling dice