Confidence interval classroom activity with dice

By Jude Wallis · Published

Each student rolls a die 50 times, counts rolls of 1 or 2, and builds a 95% confidence interval for the true proportion, which is 1/3. The class then counts the intervals that contain 1/3. The exact capture rate here is 94.9%, so one or two misses in a class of 30 is the expected result.

AP Statistics: Unit 3 (topics 3.3 Constructing a Confidence Interval for a Population Proportion, 3.4 Justifying a Claim Based on a Confidence Interval for a Population Proportion). Students construct a one-proportion z interval from their own sample (topic 3.3) and use a class set of intervals to interpret the confidence level and judge a claimed value (topic 3.4).

What the activity shows

In a real study nobody knows the parameter, so nobody can check whether a confidence interval worked. Here the parameter is known. A fair die shows a 1 or a 2 with probability p=1/3≈0.333p = 1/3 \approx 0.333. Every student estimates that proportion from 50 rolls and builds a 95% interval, and the class sees most intervals contain 1/31/3 while a few do not.

Run it after students can compute a one-proportion z interval. The point of the period is the meaning of the confidence level: 95% describes how often the method captures the parameter across many samples. It does not describe any one student's interval.

The site's confidence interval coverage simulator repeats the same experiment hundreds of times on screen. Use it at the end, after students have built an interval by hand.

Materials and timing

  • Five six-sided dice and a cup per student or pair. One die per student also works, it is only slower.
  • One calculator per student.
  • A half sheet of paper for the tally and the arithmetic.
  • Board space with a horizontal axis marked from 0 to 0.8 in steps of 0.1, and a tall vertical line drawn at 0.333.
  • Two marker colors: one for intervals that contain 0.333 and one for intervals that miss.

Plan on 45 minutes: 5 to set up and define a success, 8 to roll, 10 to compute, 10 to draw the intervals and count, and 12 for discussion. If students work in pairs, have each partner roll a separate set of 50 so the class still produces one interval per student.

Steps

  1. Define a success as a roll of 1 or 2. Ask the class for the true probability of a success and write p=1/3p = 1/3 on the board. Say plainly that a real study never gets this number, and that it is on the board only so the class can check the method.
  2. Each student shakes five dice in the cup and tips them out 10 times, for 50 rolls in all, tallying the successes after every throw. Call the total xx.
  3. Compute the sample proportion p^=x/50\hat{p} = x/50 ("p-hat").
  4. Check the large counts condition with the sample: x≥10x \ge 10 and 50−x≥1050 - x \ge 10. The rolls are independent, so no other condition is needed. A student with fewer than 10 successes still builds the interval and marks it with a star.
  5. Compute the standard error p^(1−p^)/50\sqrt{\hat{p}(1-\hat{p})/50}, multiply by z∗=1.96z^* = 1.96 for the margin of error, and write the interval as p^\hat{p} minus and plus that margin.
  6. Each student draws the interval on the board as a horizontal segment at its own height, with a dot at p^\hat{p}. Segments that cross the vertical line at 0.333 go in the first color, the others in the second.
  7. Count the segments in each color and write the capture rate as a fraction of the class.

Have students predict the count in step 7 before anyone draws. Record the predictions so the class can compare them with the result.

What students should see

With 50 rolls, the interval contains 1/31/3 exactly when the number of successes is between 11 and 23. At x=11x = 11 the interval is 0.105 to 0.335, which just reaches 0.333. At x=10x = 10 it is 0.089 to 0.311, which falls short. At x=23x = 23 the interval is 0.322 to 0.598, and at x=24x = 24 it is 0.342 to 0.618, which starts above 0.333.

The number of successes is binomial with n=50n = 50 and p=1/3p = 1/3, so the chance of landing between 11 and 23 is 0.949. That is the true capture rate of this interval at this sample size: 94.9%, close to the advertised 95% but not identical. A miss on the low side (x≤10x \le 10) has probability 0.028 and a miss on the high side (x≥24x \ge 24) has probability 0.022.

For a class of 30 independent intervals, the expected number that capture 1/3 is 28.5. The chances for each outcome are:

Intervals that missProbability
00.210
10.337
20.260
30.130
4 or more0.063

So a class of 30 sees every interval capture 1/31/3 about one time in five, and sees one or two misses most often. For a class of 24 the expected number of captures is 22.8, and all 24 capture with probability 0.287.

The intervals also differ in two visible ways. Their centers scatter around 0.333 with a standard deviation of (1/3)(2/3)/50≈0.067\sqrt{(1/3)(2/3)/50} \approx 0.067. Their margins of error differ slightly, from 0.115 at x=11x = 11 to 0.138 at x=23x = 23, because each student uses a different p^\hat{p} in the standard error. All of these values assume fair dice.

Discussion questions

  1. Before the count: how many of our intervals do you expect to contain 1/3, and why that number? Look for 95% of the class size as the reasoning, and accept that the result can differ by one or two.
  2. Point to a segment that missed. Did that student make an arithmetic error? Usually no. The arithmetic was correct and the 50 rolls were unusual. The method misses about 5% of the time by design.
  3. In a real study there is no vertical line on the board. Could the student who missed tell that from the interval alone? No. A missed interval looks exactly like a captured one, which is why the confidence level describes the method.
  4. A student writes: there is a 95% probability that 1/3 is in my interval 0.246 to 0.514. What is wrong with that sentence? The value 1/3 and the interval are both fixed numbers, so the interval either contains 1/3 or it does not. The 95% is the long-run capture rate of intervals built this way.
  5. If everyone had used 90% confidence, what would change on the board? Every segment would get shorter. Any segment that missed would still miss, and some that barely reached 1/3 would now miss. Over many classes about 10% would miss.

Extension

Change the confidence level. Students rebuild their interval from the same count with z∗=1.645z^* = 1.645 for 90% confidence. The interval now contains 1/31/3 only when xx is between 12 and 22, and the exact capture rate falls to 90.1%. Students who rolled 11 or 23 successes watch their own interval switch from a capture to a miss: at x=11x = 11 the 90% interval is 0.124 to 0.316. In a class of 30 the expected number of captures drops from 28.5 to 27.0.

Change the sample size. Groups of four pool their rolls into one sample of 200 and build a single 95% interval. Near p^=1/3\hat{p} = 1/3 the margin of error is about 0.065, half of the 0.131 it was at 50 rolls, because quadrupling nn halves the standard error. The exact capture rate at n=200n = 200 is 94.8%, so the interval is narrower and the capture rate has not moved in any way a class could detect.

Scale it up. Open the confidence interval coverage simulator, set the true proportion to 0.33, the sample size to 50 and the level to 95%, and draw a few hundred intervals. Students can also check their hand arithmetic with the confidence interval calculator.

Errors to watch for

Using 1/3 in the standard error. Some students notice that pp is on the board and compute (1/3)(2/3)/50\sqrt{(1/3)(2/3)/50}. A confidence interval is built for the case where pp is unknown, so its standard error uses p^\hat{p}.

Reading the interval as a statement about p^\hat{p}. The interval always contains the student's own p^\hat{p}, since it is centered there. The question on the board is whether it contains pp.

Calling a miss a mistake. Check the arithmetic of a missed interval in front of the class. When it holds up, the class has seen a correct procedure produce a wrong answer, which is what a 95% method does about one time in twenty.

Treating this class's capture rate as the confidence level. A class that gets 30 out of 30 has not shown the method works 100% of the time. Thirty intervals is a small sample of the method's behavior.

Example interval that captures 1/3

Example data, not from a real class: a student counts 19 successes in 50 rolls. Build the 95% confidence interval and decide whether it contains 1/3.

  1. Sample proportion: p^=19/50=0.38\hat{p} = 19/50 = 0.38.

  2. Large counts: 19 successes and 31 failures, both at least 10.

  3. Standard error: 0.38(0.62)/50=0.004712≈0.0686\sqrt{0.38(0.62)/50} = \sqrt{0.004712} \approx 0.0686.

  4. Margin of error: 1.96(0.0686)≈0.13451.96(0.0686) \approx 0.1345.

  5. Interval: 0.38−0.1345=0.24550.38 - 0.1345 = 0.2455 to 0.38+0.1345=0.51450.38 + 0.1345 = 0.5145.

  6. Compare with the true value: 0.2455<0.333<0.51450.2455 < 0.333 < 0.5145, so this interval captures pp.

The interval is about 0.246 to 0.514 and it contains 1/3. In context: we are 95% confident that the interval from 0.246 to 0.514 captures the true probability that a die shows a 1 or a 2.

Example interval that misses

Example data, not from a real class: another student counts 24 successes in 50 rolls. Build the 95% interval, decide whether it contains 1/3, and find how often a result this high or higher happens.

  1. Sample proportion: p^=24/50=0.48\hat{p} = 24/50 = 0.48.

  2. Standard error: 0.48(0.52)/50=0.004992≈0.0707\sqrt{0.48(0.52)/50} = \sqrt{0.004992} \approx 0.0707.

  3. Margin of error: 1.96(0.0707)≈0.13851.96(0.0707) \approx 0.1385.

  4. Interval: 0.48−0.1385=0.34150.48 - 0.1385 = 0.3415 to 0.48+0.1385=0.61850.48 + 0.1385 = 0.6185.

  5. The lower end, 0.3415, is above 0.333, so the interval misses pp.

  6. For a fair die the count is binomial with n=50n = 50 and p=1/3p = 1/3, and P(X≥24)≈0.022P(X \ge 24) \approx 0.022. About 2 students in 100 land this high.

The interval is about 0.342 to 0.618 and it does not contain 1/3. Every step was done correctly. The sample was unusually high, which happens with probability about 0.022.

Frequently asked questions

How many intervals should miss in my class?

The capture rate for this setup is 94.9%, so expect about 5% of the class to miss: between one and two intervals in a class of 30. Zero misses happens with probability 0.210 and three or more with probability 0.193, so neither result means something went wrong.

What if every interval captures 1/3?

That happens about one time in five with 30 students. Say so, then combine results with another section or run the coverage simulator so students see misses appear once there are enough intervals.

Can students flip coins instead of rolling dice?

Yes. With 50 flips and heads as the success, the true proportion is 0.5 and the 95% interval contains it when the number of heads is between 19 and 31. The exact capture rate for that setup is 93.5%, a little further below 95% than the dice version.

What should a student do with fewer than 10 successes?

Build the interval anyway and star it on the board. The chance that one student gets fewer than 10 successes is about 0.013, so in a class of 30 there is roughly a 32% chance it happens to someone. Every such interval misses 1/3, and so does one from exactly 10 successes, which passes the check. The miss comes from an unusually low count, so use it to discuss unusual samples.

Why is the true capture rate 94.9% and not exactly 95%?

The interval uses a normal approximation for a count that can only take whole-number values. The capture rate is the total binomial probability of the counts 11 through 23, and that total is 0.949. The 95% level is the approximate target of the method.