CoursesAIMathCodePhysicsAbout and FAQ

TwiddleLab / Math / Probability by Simulation

Counting the Outcomes

Lesson 3 of 11 · 7 min · Free, no account needed

What you will learn

  • Two dice have 36 equally likely outcomes: a 6 by 6 grid. That grid is the sample space.
  • A chance is cells that fit / all cells: a total of 7 is 6/36 = 1/6, a total of 2 is 1/36.
  • 7 wins in board games because it has the most cells, not by luck.

Start the lesson

How the lesson goes

  1. In board games, 7 comes up more than any other total.

    Coincidence? Put your chip on the total of two dice you would bet on.

  2. Roll two dice. Which total wins?

    Each roll adds one to its total's bar. Your chip's bar is gold.

  3. Here is why: every way two dice can land.

    Each cell is one outcome: the first die down the side, the second along the top. Drag across the cells to paint each total.

    3 and 4 is a different outcome from 4 and 3: the dice are two separate things. So 7 has six cells: 1+6, 2+5, 3+4, 4+3, 5+2, 6+1.

  4. The grid is the sample space.

    The sample space is every possible outcome. Two dice have 6 × 6 = 36.

    All 36 are equally likely, so a chance is cells that fit / 36.

    Total 7: 6 cells, so P(7) = 6/36 = 1/6. Total 2: P(2) = 1/36.

  5. Build the bar chart from the grid.

    Tap a bar to light its cells. Drag each bar up to its number of cells. Your 1000 rolls are dashed.

    Each bar counts the cells of one diagonal of the grid. Diagonals grow from 1 cell to 6 and shrink back, so the chart is a tent.

  6. Game: Settlers.

    A settlement scores when its total is rolled. Place 3 settlements, roll 30 times and beat Pip.

  7. This code should count the 6 ways to roll a 7. It prints 4.

    The two loops list every pair of dice, like the grid. Tap an orange number to change it, then Run.

    range(1, 6) stops before 6, so the code missed every pair with a 6 in it: 1+6 and 6+1. With one loop fixed it prints 5, with both it prints 6.

  8. How many of the 36 outcomes give a total of 9?

    A 9 needs 3+6, 4+5, 5+4 or 6+3. That is 4 cells of 36, so P(9) = 4/36 = 1/9.

  9. Twist: two coins. Is one of each 1 in 3?

    Two heads, two tails, or one of each looks like three outcomes. Tap the cells that are one of each.

    The sample space of two coins is HH, HT, TH, TT: four equally likely cells. One of each is HT and TH, so 2/4 = 1/2.

Previous lesson: Flip a Thousand Coins · Next lesson: And, Or: Overlaps Count Once · Part of the course: Probability by Simulation

Lessons are interactive and need JavaScript. Turn it on to play them.

Loading TwiddleLab