The DEEP Build Kit · Starter brief
Two dice: which total comes up most often?
Students predict the most common total, roll the dice up to 1,000 at a time, compare with the exact chances from all 36 outcomes, then explain.
For: Mathematics, ages 11–14
A starter tool for the Build with AI masterclass. It shows what a finished Respond build looks like. Simulations are not on the Level 1 build menu, so remix this one at Level 2 ▲ Orange or above. It is a guided-inquiry simulation, built and tested with the DEEP Build Loop: Brief it · Build it · Break it · Fix it · Teach it. Simulations are the highest-risk build type, because the maths in the code can be quietly wrong. So this one has a fairness test and an exact-chances check, and the teacher runs a debrief afterwards.
The tool is one .html file. Open it from this page, or save it and double-click it: it opens in a web browser and works offline.
The brief
Learning goal. Students can explain why 7 is the most likely total when two fair dice are rolled: it can be made in 6 of the 36 equally likely ways. They can explain why totals near 7 are more likely than 2 or 12. They also know that a few rolls can give a misleading picture, while the share of each total settles towards the exact chance over many rolls.
Who uses it. Year 7–9 students in pairs, one device per pair, in a 20–25 minute lesson segment after single-event probability has been taught. The teacher leads the debrief at the end.
The learning move. Guided inquiry. Students predict first, run the simulation and compare with their prediction, check the exact chances, then explain. The teacher debriefs afterwards.
How students reach it. One .html file, opened in a web browser on the student's device. There is no login and no account, and it needs no internet. Publishing it as a link is a stretch (card 17).
Must do.
- Require a locked-in prediction before any roll.
- Offer Roll 1, 10, 100 and 1,000.
- Show a live bar chart of the totals, with the count and share of each total written as text.
- Mark the predicted total in words.
- After at least 100 rolls, reveal the exact chances and a 6 × 6 grid of all outcomes. Show each chance as ways out of 36 with a rounded percentage, e.g. "6/36 (16.7%)", say that percentages are rounded, and give the expected count for the student's rolls.
- After at least 1,000 rolls, ask one explain question with feedback that explains. Show the student's earlier prediction and reason beside it.
- Use a fair random-number generator.
- Work with the keyboard alone and at phone width.
Must never do.
- Let students roll before predicting.
- Show the answer before any rolls.
- Add sliders or extra variables.
- Animate dice or flash anything.
- Use a biased random-number generator.
- Use colour as the only signal.
- Save or send anything, or call an AI.
Acceptance criteria.
- The exact chances match a full count of all 36 outcomes.
- The dice are fair: 100,000 of the page's own rolls pass a chi-square goodness-of-fit test.
- Rolling is impossible until a prediction is locked in.
- The counts always add up to the number of rolls, and every share is correct.
- It works with the keyboard only, at 320 px, at 4.5:1 contrast, with no network requests.
Test cases (written before building).
| # | Case | Expected |
|---|---|---|
| T1 | Try to roll, or press "Lock in", before choosing a total | Roll buttons disabled; "Choose a total first." |
| T2 | Keyboard only: choose 7 with the arrow keys, type a reason, lock in | "Your prediction: 7" gets focus; Roll buttons are enabled; the reason can no longer be changed |
| T3 | Roll once | The status names both dice and their total; that total's count is 1 and its share is 100.0% |
| T4 | Roll 1, then 10, 100 and 1,000 | The counts add up to 1,111; each share = count ÷ 1,111 to 1 decimal place; bar lengths match the counts |
| T5 | Look at the predicted row | "your prediction" is written in the row; the summary line compares the leading total with the prediction |
| T6 | Roll to 11, then 111, then 1,111; answer the explain question wrongly | At 11 rolls both later steps are locked; at 111 the exact chances open; at 1,111 the explain question opens, shows the earlier prediction and reason, and a wrong answer gets why plus a note on the chosen option |
| T7 | Reveal the exact chances | Each chance is ways out of 36 with its rounded percentage (1/36 (2.8%) … 6/36 (16.7%) … 1/36 (2.8%)), with a rounding note; expected = rolls × ways ÷ 36, rounded to a whole number; 6 × 6 grid correct, with six 7s marked |
| T8 | Fairness: 100,000 more rolls in the page | The counts add up to the number of rolls, and the totals pass a chi-square test against 1:2:3:4:5:6:5:4:3:2:1 (10 degrees of freedom, statistic < 29.59, i.e. p > 0.001) |
Non-goals. No biased dice, three dice or other dice shapes (see Remix ideas). No game or score. It does not replace the teacher's explanation of sample spaces. Students' predictions are not recorded.
Teacher's debrief script (after the explain question).
- "Who predicted 7? Who predicted something else, and why?"
- "Why do (3, 4) and (4, 3) count as two different ways?" Picture a red die and a blue die. Counting each pair once gives only 21 outcomes, and they are not equally likely.
- "After 10 rolls, did everyone's chart look the same? After 1,000?"
Reuse plan (checklist item 11). Two weeks later, open it again and roll only 10 times: "Why is this chart not trustworthy yet?"
Check of learning (checklist item 12). Exit question a week later, without the tool: "With two four-sided dice (1–4), which total is most likely, and why?" Answer: 5, which can be made 4 ways out of 16.
The faded brief
Copy this, fill in the five [YOUR CLASS: …] gaps with your partner, then give it to your AI tool with the .html file.
Learning goal. [YOUR CLASS: in one sentence, what should your students be able to explain after using this?]
Who uses it. [YOUR CLASS: year group, pairs or individuals, and when in the lesson]
The learning move. Guided inquiry: predict first, run the simulation, compare, check the exact chances, then explain. The teacher debriefs afterwards.
How students reach it. One .html file, opened in a web browser. No login, no account, no internet needed.
Must do. A prediction is required before rolling. Roll 1, 10, 100 and 1,000. The bar chart also shows counts and shares as text, and the prediction is marked in words. The exact chances (as ways out of the total, with rounded percentages) and the grid of outcomes appear only after 100 rolls; the explain question only after 1,000, beside the student's earlier reason. One explain question with feedback that explains. A fair random-number generator. Keyboard and phone width must work. [YOUR CLASS: the one thing you want to change, e.g. the explain question, the dice, or the wording for your students]
Must never do. Rolling before predicting; answers before rolls; sliders or extra variables; animation or flashing; colour as the only signal; saving or sending anything; calling an AI.
Acceptance criteria.
- [YOUR CLASS: how will you check the exact chances by hand? For example, list every outcome in a grid and count them.]
- The dice look fair: roll 1,000 at a time a few times, and check that each total's share gets close to its exact chance.
- Rolling is blocked until a prediction is locked in.
- The counts add up to the number of rolls.
- Keyboard, 320 px and contrast all work; no network requests.
Test cases. Keep T1–T6 and T8 above. Rewrite T7 for your version: "The exact chances are ___ (worked out by hand), and the page shows ___."
Debrief questions. [YOUR CLASS: the 2–3 questions you will ask the class afterwards]
How it was tested
- An automated browser test ran every test case above at 320 px wide, using the keyboard only. All passed. Being random, the counts differ on every run.
- The exact chances were counted from all 36 outcomes, and each one on the page was compared with that count.
- The page's own dice were rolled 100,000 times, and the totals passed the chi-square test in T8. The dice code was also tested on its own: 100,000 single rolls, and 100,000 two-dice totals.
- Accessibility: text contrast at least 4.5:1, a visible focus outline at every Tab stop, controls at least 24 × 24 px, no sideways scroll at 320 px, nothing moves by itself, and no issues found by the axe-core accessibility checker. Every bar has its count and share as text in a real table.
- The page made no network requests and stored nothing.
- Not tested: real screen readers, Safari and Firefox, or real phones. Try it on a class device before you use it.
What went wrong in testing, and the fix
- Unreadable bars on a phone, found by looking at a screenshot rather than by an automated check. At 320 px each bar was about 12 px wide. Fix: on narrow screens each bar gets its own full-width line, with its numbers underneath.
- A misleading prompt nearly shipped: "compare your bars with the expected column: are they closer after 1,000 rolls?" The gaps between counts and expected counts usually grow with more rolls; only the shares get closer. The prompt now compares shares with chances only.
- The explain question gave the answer away. It asked "Why does a total of 7 come up more often than any other total?", which can contradict a student's own results. It now asks a neutral question in step 4, which opens once the student has rolled 1,000 times; step 3, the exact chances, opens at 100 rolls.
The teacher's build checklist (12 points)
| # | Check | How this starter meets it |
|---|---|---|
| 1 | One learning goal | Why 7 is the most likely total, and why a few rolls mislead |
| 2 | Students think, not just click | A prediction (with an optional reason) is required; the explain question asks for an explanation |
| 3 | Retrieval built in | The explain question now; the exit question a week later (brief) |
| 4 | Feedback explains | The feedback gives the six pairs that make 7 and a note on the chosen misconception |
| 5 | Guidance matches the learner | The prediction step, the 100-roll and 1,000-roll unlocks, and the teacher's debrief script guide the inquiry |
| 6 | Nothing decorative | No dice animation, sounds or scores |
| 7 | Visuals integrated | Counts with every bar (beside it, or underneath on a phone); the prediction marked in its row; the grid sits below the chances table |
| 8 | Few controls | Two choices (the prediction and the explain question); four roll sizes and one reveal button |
| 9 | Facts checked | The exact chances are counted from all 36 outcomes, and the dice passed a fairness test over 100,000 rolls |
| 10 | Accessible | See How it was tested above |
| 11 | Reused | Reuse plan in the brief |
| 12 | I'll know if it worked | Exit question with four-sided dice a week later |
Remix ideas
- "Change the dice to two four-sided dice (1–4). Update the totals, the exact chances and the grid to match, and keep everything else the same. Show me how to check the new chances by hand."
- "Replace the explain question with this one: [your question], with three options and a note on each wrong option. Change nothing else."
- "Change the unlocks from 100 and 1,000 rolls to 50 and 500, and the wording for Year 7 students who are new to probability. Change nothing else."
DEEP Education Network · Build with AI · Two rules: no student names or data anywhere; nothing student-facing calls AI.