TwiddleLab / Math / Probability by Simulation
Shapes of Randomness
What you will learn
- A distribution says how often each result comes up. A histogram draws it as bars.
- Adding dice changes the shape: one die is flat, two make a triangle, many make a bell.
- The average of more dice piles up closer to the middle: 4 dice put 81% of averages between 2.5 and 4.5.
How the lesson goes
One die: every number is equally likely. Add up ten dice. Still flat?
Draw the shape you think a thousand sums of ten dice would make.
Roll a thousand times: 1, 2, 3, then 10 dice.
Each roll adds the dice and drops the sum into its bar. Try all four.
Now average the dice instead of adding them.
The pile of averages always runs from 1 to 6. Dial the number of dice. Hit each goal with the fewest dice.
Averages of more dice cancel out highs and lows. The share between 2.5 and 4.5 is 67.6% for 3 dice, 80.6% for 4, 87.8% for 6 and 92.2% for 8.
Distributions and histograms.
A distribution tells how often each result happens: which results, and how likely each one is.
A histogram draws it: one bar per result (or per range), bar height is how often.
Shapes have names: flat (uniform), triangle, and the bell that appears whenever many small random parts add up.
Which machine makes which pile?
Drag each machine onto its histogram, or tap a machine and then a pile. Read the numbers under the bars.
One die: 6 equal bars, 1 to 6. Two dice: 11 bars, 2 to 12, peak at 7. Heads in 10 flips: 0 to 10, peak at 5. The spinner has only two results, red 1/4 and not red 3/4.
Game: guess the machine.
Balls drop one by one. Tap the machine that makes them as soon as you can tell. Three rounds, win 2.
Each machine has its own distribution. As more balls fall, the histogram looks more like it, the same way the coin's line settled in lesson 2.
This code should count sums of two dice. Its pile looks wrong.
Totals 7 and 11 never show up. Tap the orange symbol to change it, then Run and watch the bars.
a * b is the product, which can never be 7 or 11 (they are prime and bigger than 6). a + b counts the totals 2 to 12, and they pile into the triangle.
Which chart shows the sum of three dice?
Each chart shows its first and last result. Tap one, then Check.
The sum of three dice runs from 3 to 18, 16 results, with the most ways in the middle at 10 and 11 (27 ways each out of 216).
Your sketch against two real piles.
Tap each pile to lay your first sketch over it.
Previous lesson: The Long-Run Average · Next lesson: Project: Design a Fair Game · Part of the course: Probability by Simulation
Lessons are interactive and need JavaScript. Turn it on to play them.