# Dice odds

> Use dice odds to set real outcomes beside the odds of pure chance, and let readers roll their own to feel how close luck gets.

- Data type: Many values of one measure (`spread`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`spread`)
- Example: **Weldon's 26,306 throws of 12 dice showed 5s and 6s a little more often than fair dice would** (Share of throws by how many of the 12 dice showed a 5 or a 6; Weldon's 1894 experiment against fair-dice odds)
- How to read it: Each bar is the share of Weldon's throws with that many 5s or 6s; the black line is what fair dice would give; roll your own to add orange dots.
- Interactive: roll
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- comparing what happened with what chance predicts
- teaching probability with something hands-on
- a distribution of counts (0, 1, 2 …)

## Avoid it when
- there is no clear model of chance to compare against
- the outcomes aren't counts
- readers need a formal test (show the statistics)

## Fields (data.json)
- `dice` (number, unit "dice", format count): dice per throw (12)
- `throws` (number, unit "throws", format count): total throws (26,306)
- `counts[].fives` (number, unit "dice showing 5 or 6", format count): dice showing a 5 or a 6 in a throw; the last row is 10 or more
- `counts[].throws` (number, unit "throws", format count): how many throws had that count

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- tap the dice or Roll 12 dice to throw them; they land on a label with how often fair dice give that count
- Roll 1,000 times adds many throws at once
- hover or tap a column to compare Weldon, fair dice and you
- Motion: Weldon's bars grow in from the left, then the fair-dice marks appear; each throw hops and spins the dice before they land square, a callout names the odds of that count, and your dots slide to their new shares.
- Sound: Silent while the dice tumble, one landing sound, a whoosh for a thousand rolls, a pop on hover; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "dice-odds",
  "title": "Weldon's 26,306 throws of 12 dice showed 5s and 6s a little more often than fair dice would",
  "subtitle": "Share of throws by how many of the 12 dice showed a 5 or a 6; Weldon's 1894 experiment against fair-dice odds",
  "data": "/charts/dice-odds.data.json"
}
```

## Source
WeldonDice: Weldon's dice data (R package vcd), via Rdatasets, Rdatasets (Vincent Arel-Bundock), from Pearson (1900) and the vcd package (GPL-2), retrieved 2026-12-01: https://vincentarelbundock.github.io/Rdatasets/csv/vcd/WeldonDice.csv

Note: Fair-dice odds are worked out from the binomial distribution with a 1 in 3 chance per die. Your rolls use the browser's random numbers and are not saved.

Inspired by: [Weldon's dice](https://en.wikipedia.org/wiki/Weldon%27s_dice), W. F. R. Weldon; Karl Pearson (1900) (linked, not copied).

Live: /charts/dice-odds · Manifest: /charts/dice-odds.json · Tags: probability, binomial, chance, experiment, dice, history of science, interactive
