Simulation practice problems with random digit tables

By Jude Wallis · Updated

These 8 problems build a simulation end to end: assigning digits in the right proportion, discarding what you have to, defining one trial exactly, running trials off a printed digit table, turning counts into an estimate, and judging whether a result is surprising.

AP Statistics: Unit 2 (topics 2.3 Estimating Probabilities Using Simulation, 2.4 Introduction to Probability). Simulation is Unit 2 topic 2.3 of the Fall 2026 AP Statistics course, which defines a probability as an event's long-run relative frequency, asks you to record the counts of simulated outcomes and the count total, and states the law of large numbers: for independent trials, the long-run relative frequency gets closer to a single value as the number of trials increases. Unit 2 carries 15 to 25 percent of the multiple-choice section.

What these 8 problems build

A simulation estimates a probability by imitating a random process many times and counting how often the event of interest happens. The AP course defines the probability of an event as its long-run relative frequency, so the estimate is simply the number of trials in which the event occurred divided by the number of trials.

Three moves decide whether a simulation is right, and every problem below tests at least one of them.

  • Assign digits in the correct proportion. Each outcome gets a share of the digits equal to its probability, the shares have to be mutually exclusive and cover every case, and any digit you cannot use has to be discarded rather than quietly handed to another outcome.
  • Define one trial precisely. A trial is one full repetition of the process being modeled, which is usually several digits rather than one. Say how many digits it takes, when a trial ends, and what you record.
  • Count and divide. The estimate is the proportion of trials in which the event occurred, and more trials means a better estimate, which the course states as the law of large numbers.

Problems 1 and 2 build digit assignments, including one that forces discards and one that has to discard repeats as well. Problems 3, 5, 6, and 7 run trials off printed digits, so you can reproduce every count by hand. Problems 4 and 8 ask the harder question: whether a simulated result is unusual enough to doubt the assumption you simulated under. Work each one before opening the steps.

For the method itself read how to simulate a random process, and the course wording is at topic 2.3 Estimating Probabilities Using Simulation. The one-line definition sits in the simulation glossary entry. Several problems here compare a simulated estimate against an exact probability, which you can confirm with the binomial probability calculator or through the complement route in probability of at least one. The rules behind those exact answers come from topic 2.4 Introduction to Probability and are drilled in probability rules practice, and the requirement that your outcome categories be mutually exclusive is the same idea covered in disjoint vs independent events.

Problem 1

A juice bar's records show that 30 percent of customers order the ginger blend. You plan to model one customer's order with a table of random digits. (a) Give a digit assignment for a single customer and say why it is correct. (b) A classmate suggests using 1, 2, and 3 for ginger, 4 through 9 for everything else, and ignoring any 0 that comes up. Find the probability that scheme actually models. (c) Give a single-digit assignment that models a 25 percent chance instead. (d) State what one trial is if the question you want to answer is the probability that at least one of the next 4 customers orders the ginger blend.

Show the worked solution
  1. (a) Assign 0, 1, and 2 to the ginger blend and 3, 4, 5, 6, 7, 8, and 9 to every other order. All ten digits are used, each is equally likely, and 3 of the 10 go to ginger, so the scheme gives a ginger probability of 310=0.30\frac{3}{10} = 0.30, exactly the advertised rate.

  2. (a) Which three digits you pick does not matter. Assigning 4, 7, and 9 to ginger works just as well, because the digits are equally likely and it is the count, not the identity, that sets the probability.

  3. (b) Ignoring 0 means every 0 is thrown out and a new digit read, so only 9 digits stay in play: 1 through 9. Three of those nine go to ginger, giving 39=130.3333\frac{3}{9} = \frac{1}{3} \approx 0.3333, not 0.300.30.

  4. (b) That is the error to watch for. Discarding is legitimate only when the target proportion cannot be built from the digits you have. Here 0.30=3100.30 = \frac{3}{10} divides the ten digits exactly, so there is nothing to discard, and throwing a digit away inflates the ginger rate by about 0.0330.033.

  5. (c) 0.250.25 is not a multiple of 110\frac{1}{10}, so single digits cannot carry it without waste. One correct scheme: 0 and 1 are ginger, 2 through 7 are other orders, and 8 and 9 are discarded and redrawn. That leaves 8 usable digits with 2 assigned to ginger, so the probability is 28=0.25\frac{2}{8} = 0.25.

  6. (c) A discard-free alternative is to read the digits in pairs: 00 through 24 is ginger and 25 through 99 is not, which is 25100=0.25\frac{25}{100} = 0.25 with every pair usable. It burns 2 digits per customer instead of an average of 10.8=1.25\frac{1}{0.8} = 1.25, so choose whichever you would rather spend, digits or bookkeeping.

  7. (d) One trial is 4 digits, one for each of the next 4 customers, read straight off the table with repeats kept, because separate customers place separate orders and the same digit can legitimately come up twice. For each trial you record a single yes or no: yes if at least one of the 4 digits is 0, 1, or 2. One digit is one customer, not one trial, and confusing those two is the most common way this question goes wrong.

(a) 0, 1, 2 for ginger and 3 through 9 for other orders, since 310=0.30\frac{3}{10} = 0.30; (b) it models 390.3333\frac{3}{9} \approx 0.3333, because discarding 0 leaves only 9 usable digits; (c) 0 and 1 ginger, 2 through 7 other, discard 8 and 9, giving 28=0.25\frac{2}{8} = 0.25, or read pairs with 00 to 24 as ginger; (d) one trial is 4 digits, one per customer, and you record whether at least one of them is 0, 1, or 2.

Problem 2

A student garden club has 20 members, numbered 01 through 20. Four different members will be chosen at random for a seed-swap trip. You run the selection with a random digit table read in pairs. (a) Describe the assignment, including how to handle pairs outside the range and pairs that repeat. (b) Find the proportion of two-digit pairs that get discarded on the range check alone. (c) Using the digits below, read left to right in pairs and carry out one complete trial.

7 3 1 4 0 8 2 0 5 1 9 6 1 4 0 3 8 2 1 7

(d) Explain why repeats are discarded here even though they would be kept in a simulation of 4 separate customers.

Show the worked solution
  1. (a) Read the digits in pairs. A pair from 01 to 20 selects the member with that number. The pairs 00 and 21 through 99 match no member, so discard each one and read the next pair. A pair that repeats a member already chosen is also discarded, because the trip needs 4 different people. Stop as soon as 4 distinct members have been selected.

  2. (b) Two-digit pairs run from 00 to 99, which is 100 equally likely pairs, and only 20 of them, 01 through 20, select a member. So 20100=0.20\frac{20}{100} = 0.20 are usable and 80100=0.80\frac{80}{100} = 0.80 are discarded on the range check. Expect to read about 5 pairs for every member you manage to select.

  3. (c) Split the 20 digits into pairs: 73, 14, 08, 20, 51, 96, 14, 03, 82, 17.

  4. (c) Work through them in order. 73 is above 20, so discard it. 14 is in range, so member 14 is the first selection. 08 is in range, so member 8 is the second. 20 is in range, so member 20 is the third.

  5. (c) Keep going. 51 is above 20, so discard. 96 is above 20, so discard. 14 is in range but member 14 is already on the list, so discard it as a repeat. 03 is in range and new, so member 3 is the fourth selection and the trial ends.

  6. (c) The trial selected members 14, 8, 20, and 3, using the first 16 digits. The pairs 82 and 17 were never needed and stay in the table for the next trial.

  7. (d) The two situations model different processes. Here the 4 selections come from one fixed group of 20 people and nobody can go twice, so this is sampling without replacement and a repeated number is impossible in the real process. Four separate customers share no pool at all, so two of them ordering the same drink is not only possible but expected, and throwing out those repeats would distort the model.

(a) Pairs 01 to 20 select a member, pairs 00 and 21 to 99 are discarded, and any pair repeating a member already chosen is discarded; (b) 80100=0.80\frac{80}{100} = 0.80 of pairs are discarded on the range check; (c) members 14, 8, 20, and 3, using the first 16 digits after discarding 73, 51, 96, and the repeated 14; (d) the 4 members come from one pool without replacement, so a repeat is impossible in the real process, while 4 separate customers share no pool and can repeat freely.

Problem 3

A trading-card app advertises a 20 percent chance that a pack contains a holographic card. You want to estimate the probability that at least one of 4 packs contains a holographic card. (a) Give the digit assignment and define one trial. (b) Ten trials have been read off a digit table and grouped below, one trial per line. Carry out the count and give the estimate.

TrialDigits
15 3 1 8
27 2 6 4
30 9 4 3
46 6 2 7
54 1 5 0
68 3 9 2
72 5 7 1
89 4 3 6
91 7 8 5
103 0 6 2

(c) The exact answer is 10.8041 - 0.80^4. Compute it and compare. (d) A student counts every holographic digit in the whole block and reports 740=0.175\frac{7}{40} = 0.175. Say what that number estimates.

Show the worked solution
  1. (a) Assign 0 and 1 to a pack with a holographic card and 2 through 9 to a pack without one. That is 2 of the 10 digits, so 210=0.20\frac{2}{10} = 0.20, matching the advertised rate with no discards needed.

  2. (a) One trial is 4 digits, one per pack. Repeated digits inside a trial are kept, since 4 packs are 4 separate openings. For each trial you record yes if at least one of the 4 digits is 0 or 1, and no otherwise.

  3. (b) Scan each line for a 0 or a 1.

    TrialDigitsContains 0 or 1
    15 3 1 8yes
    27 2 6 4no
    30 9 4 3yes
    46 6 2 7no
    54 1 5 0yes
    68 3 9 2no
    72 5 7 1yes
    89 4 3 6no
    91 7 8 5yes
    103 0 6 2yes
  4. (b) Count the yes rows: trials 1, 3, 5, 7, 9, and 10, which is 6 of the 10 trials. The estimate is 610=0.60\frac{6}{10} = 0.60.

  5. (c) Take the complement. A single pack has no holographic card with probability 10.20=0.801 - 0.20 = 0.80, and 4 independent packs all miss with probability 0.8040.80^4.

  6. (c) Evaluate: 0.82=0.640.8^2 = 0.64 and 0.642=0.40960.64^2 = 0.4096, so 0.804=0.40960.80^4 = 0.4096 and 10.4096=0.59041 - 0.4096 = 0.5904.

  7. (c) The simulation gave 0.600.60 against the exact 0.59040.5904, a difference of about 0.010.01. With only 10 trials the estimate can land on nothing but 0,0.1,0.2,,10, 0.1, 0.2, \ldots, 1, so coming this close is partly luck. A few hundred trials would pin the value down reliably.

  8. (d) That student is estimating the wrong quantity. Counting holographic digits out of all 40 digits treats each single digit as its own trial, so 740=0.175\frac{7}{40} = 0.175 estimates the per-pack rate, which the app already told you is 0.200.20. The question asked about a group of 4 packs, and the unit of the trial has to match the unit of the question.

(a) 0 and 1 mean a holographic card and 2 through 9 mean none, and one trial is 4 digits with repeats kept, recording whether at least one digit is 0 or 1; (b) 6 of the 10 trials contain a 0 or a 1, so the estimate is 610=0.60\frac{6}{10} = 0.60; (c) 10.804=10.4096=0.59041 - 0.80^4 = 1 - 0.4096 = 0.5904, about 0.010.01 below the estimate; (d) 740=0.175\frac{7}{40} = 0.175 estimates the chance that a single pack is holographic, not the chance that at least one of 4 packs is.

Problem 4

A tutoring center says its scheduling software assigns each Saturday shift to one of its 8 tutors at random, so every tutor is equally likely each week. Over the last 20 Saturdays, one tutor, Rosa, worked 6 of the shifts. (a) Describe a digit assignment for one Saturday and define one trial. (b) One hundred trials were run and the number of Rosa shifts in each trial was recorded.

Rosa shifts in 20 Saturdays012345678 or more
Number of trials7202722147210

Check that the simulated mean is close to what random assignment predicts. (c) Estimate the probability that a particular tutor gets 6 or more of 20 shifts under random assignment. (d) Decide whether Rosa's 6 shifts are surprising enough to doubt the random-assignment claim, and state one limit on what the simulation can conclude.

Show the worked solution
  1. (a) Number the 8 tutors 1 through 8 and let Rosa be tutor 1. Assign digit 1 to Rosa and digits 2 through 8 to the other seven tutors, one digit each, then discard 0 and 9 whenever they appear, since there is no tutor 0 and no tutor 9.

  2. (a) The discard is what makes the scheme fair. With 0 and 9 thrown out, 8 usable digits remain and each tutor holds exactly one, so every tutor has probability 18=0.125\frac{1}{8} = 0.125 on any Saturday. Handing 0 and 9 to two of the tutors instead would give those two 210\frac{2}{10} and everyone else 110\frac{1}{10}.

  3. (a) One trial is 20 usable digits, one per Saturday, reading past any 0 or 9 without counting it. Repeats are kept, because a tutor can be picked in consecutive weeks. For each trial you record the number of 1s.

  4. (b) The mean of the 100 simulated counts is the total number of Rosa shifts divided by 100. Multiply each count by its frequency: 0×7=00 \times 7 = 0, 1×20=201 \times 20 = 20, 2×27=542 \times 27 = 54, 3×22=663 \times 22 = 66, 4×14=564 \times 14 = 56, 5×7=355 \times 7 = 35, 6×2=126 \times 2 = 12, 7×1=77 \times 1 = 7, and the last column contributes 00.

  5. (b) Add and divide: 0+20+54+66+56+35+12+7=2500 + 20 + 54 + 66 + 56 + 35 + 12 + 7 = 250, so the simulated mean is 250100=2.50\frac{250}{100} = 2.50 shifts. Random assignment predicts 20×18=2.520 \times \frac{1}{8} = 2.5 shifts, so the simulation is behaving the way it should.

  6. (c) Count the trials that matched or beat Rosa's result. Trials with 6 shifts: 2. With 7 shifts: 1. With 8 or more: 0. That is 2+1+0=32 + 1 + 0 = 3 trials out of 100.

  7. (c) The estimate is 3100=0.03\frac{3}{100} = 0.03. Under random assignment, about 3 percent of 20-Saturday stretches would hand one particular tutor 6 or more shifts.

  8. (d) An estimate of 0.030.03 sits below the 5 percent mark people usually treat as surprising, so Rosa's 6 shifts are unusual under the random-assignment claim, and that is some evidence the software is not assigning shifts the way the center describes.

  9. (d) Now state the limits. A probability of 0.030.03 is rare, not impossible, so the simulation proves nothing: roughly 3 stretches in 100 would look like this even with a perfectly fair scheduler. The estimate also carries its own uncertainty from using only 100 trials. And Rosa was singled out after her total was seen, which makes an unusual result much easier to find than it would be if a tutor had been named in advance.

(a) Digit 1 is Rosa and digits 2 to 8 are the other tutors, with 0 and 9 discarded, and one trial is 20 usable digits with the number of 1s recorded; (b) the simulated mean is 250100=2.50\frac{250}{100} = 2.50 shifts against the predicted 20×18=2.520 \times \frac{1}{8} = 2.5; (c) 2+1+0100=3100=0.03\frac{2 + 1 + 0}{100} = \frac{3}{100} = 0.03; (d) 0.030.03 is below the usual 5 percent mark, so the result is surprising and gives some evidence against the claim, but a 3 percent event still happens sometimes and Rosa was picked out after the fact.

Problem 5

A bakery's quality log says 60 percent of its sourdough loaves pass the crust check. The head baker wants to estimate the probability that 8 or more loaves in a batch of 10 pass. (a) Design a simulation using a table of random digits: give the digit assignment, define one trial, say what you record, and say how the estimate is computed. (b) Run 5 trials on the digits below, one trial per line.

TrialDigits
13 7 1 5 9 0 4 8 2 6
22 0 5 3 1 4 7 6 0 8
31 4 0 2 5 3 9 7 0 4
48 6 3 7 2 9 5 1 6 0
50 5 2 1 8 4 0 6 9 7

(c) Give the estimate these 5 trials produce and explain why the baker should not report it. (d) Name the assumption the digit assignment makes about the loaves within a batch.

Show the worked solution
  1. (a) Digit assignment: 0, 1, 2, 3, 4, and 5 mean the loaf passes the crust check, and 6, 7, 8, and 9 mean it does not. That is 6 of the 10 digits, so the pass probability is 610=0.60\frac{6}{10} = 0.60, and no digit needs to be discarded.

  2. (a) One trial is 10 consecutive digits, one for each loaf in a batch of 10. Repeated digits are kept, since 10 loaves are 10 separate checks.

  3. (a) What you record: count the digits from 0 to 5 in the trial, which is the number of loaves that passed, then record yes if that count is 8, 9, or 10, and no otherwise.

  4. (a) Repeat for a large number of trials, at least a few hundred. The estimate is the number of yes trials divided by the number of trials.

  5. (b) Count the pass digits, 0 through 5, in each line.

    TrialDigitsPasses8 or more
    13 7 1 5 9 0 4 8 2 66no
    22 0 5 3 1 4 7 6 0 87no
    31 4 0 2 5 3 9 7 0 48yes
    48 6 3 7 2 9 5 1 6 05no
    50 5 2 1 8 4 0 6 9 76no
  6. (b) Check two lines digit by digit. Trial 1: 3 passes, 7 fails, 1 passes, 5 passes, 9 fails, 0 passes, 4 passes, 8 fails, 2 passes, 6 fails, for 6 passes, short of 8. Trial 3: 1, 4, 0, 2, 5, and 3 all pass, 9 and 7 both fail, then 0 and 4 pass, for 8 passes, which reaches the mark.

  7. (c) One trial in five said yes, so these trials give 15=0.20\frac{1}{5} = 0.20.

  8. (c) The baker should not report it, because 5 trials cannot resolve a probability. The estimate can only come out as 00, 0.20.2, 0.40.4, 0.60.6, 0.80.8, or 11, so it is coarse before it is even inaccurate. The law of large numbers is what fixes this: as the number of trials grows, the proportion of yes trials settles toward the true probability, and a few hundred trials would give the baker a number worth acting on.

  9. (d) The assignment reads each loaf as an independent draw with the same pass probability of 0.600.60. If loaves in one batch share an oven position, a dough, or a bake time, a bad batch could fail together, and then the digits would understate how often a batch comes out very good or very bad.

(a) 0 to 5 pass and 6 to 9 fail, giving 610=0.60\frac{6}{10} = 0.60; one trial is 10 digits (one batch), you record whether 8 or more digits fall in 0 to 5, and the estimate is the proportion of yes trials over several hundred trials; (b) passes of 6, 7, 8, 5, and 6, so only trial 3 reaches 8; (c) 15=0.20\frac{1}{5} = 0.20, which is unusable because 5 trials allow only six possible answers; (d) that the 10 loaves are independent with a constant pass rate of 0.600.60.

Problem 6

A city bike-lane survey classifies every rider as a commuter (45 percent), a recreational rider (35 percent), or a delivery rider (20 percent). You want to estimate the probability that at least 2 of 6 randomly chosen riders are delivery riders. (a) Give a digit assignment and define one trial. (b) A classmate proposes single digits: 0 to 4 for commuters, 5 to 7 for recreational riders, and 8 and 9 for delivery riders. Find the three probabilities that scheme actually models. (c) Run 2 trials on the digits below, reading in pairs, six pairs per line.

TrialDigits
10 7 6 2 9 1 3 8 4 5 8 3
25 4 2 0 7 6 0 9 3 3 6 8

(d) Say why you cannot report an estimate from part (c), and say how many trials you would run.

Show the worked solution
  1. (a) Single digits cannot carry 45 percent or 35 percent, since neither is a multiple of 110\frac{1}{10}, so read the table in pairs. Assign 00 through 44 to commuters, which is 45 of the 100 pairs, or 0.450.45; 45 through 79 to recreational riders, which is 35 pairs, or 0.350.35; and 80 through 99 to delivery riders, which is 20 pairs, or 0.200.20.

  2. (a) Check that the assignment covers everything exactly once: 45+35+20=10045 + 35 + 20 = 100 pairs, so every pair from 00 to 99 lands in exactly one category and nothing has to be discarded. The three categories are mutually exclusive and cover every rider, which is what a valid assignment requires.

  3. (a) One trial is 6 pairs, so 12 digits, one pair per rider. Repeats are kept, since 6 riders are 6 separate people. Record the number of pairs falling in 80 through 99, then note whether that count is 2 or more.

  4. (b) Count the digits in each block. Digits 0 to 4 is 5 of the 10 digits, so 510=0.50\frac{5}{10} = 0.50 for commuters. Digits 5 to 7 is 3 digits, so 310=0.30\frac{3}{10} = 0.30 for recreational riders. Digits 8 and 9 is 2 digits, so 210=0.20\frac{2}{10} = 0.20 for delivery riders.

  5. (b) The delivery share happens to be right, but commuters are overstated by 0.050.05 and recreational riders understated by 0.050.05. For this one question, which only counts delivery riders, the scheme would still give the right answer; for any question touching the other two categories it would not, and a scheme that is only accidentally right is not worth using.

  6. (c) Split line 1 into pairs: 07, 62, 91, 38, 45, 83. Classify each one. 07 is in 00 to 44, a commuter. 62 is in 45 to 79, recreational. 91 is in 80 to 99, delivery. 38 is a commuter. 45 is the first pair of the recreational block, so recreational. 83 is delivery. That is 2 delivery riders, so trial 1 records yes.

  7. (c) Split line 2 into pairs: 54, 20, 76, 09, 33, 68. Classify each one. 54 is recreational, 20 is a commuter, 76 is recreational, 09 is a commuter, 33 is a commuter, and 68 is recreational. That is 0 delivery riders, so trial 2 records no.

  8. (d) Two trials give an estimate of 00, 0.50.5, or 11 and nothing else, which carries no real information about a probability. Run at least a few hundred trials, then divide the number of yes trials by the number of trials. For reference, the exact answer here is 10.866(0.2)(0.85)=10.2621440.393216=0.344641 - 0.8^6 - 6(0.2)(0.8^5) = 1 - 0.262144 - 0.393216 = 0.34464, and the 2-trial estimate of 0.50.5 is nowhere near it.

(a) Pairs 00 to 44 are commuters, 45 to 79 recreational, and 80 to 99 delivery, with one trial being 6 pairs and the count of pairs from 80 to 99 recorded; (b) 0.500.50 commuter, 0.300.30 recreational, and 0.200.20 delivery, so two of the three are wrong; (c) trial 1 has 2 delivery riders and records yes, trial 2 has 0 and records no; (d) 2 trials allow only the values 00, 0.50.5, and 11, so run several hundred; the exact probability is 0.344640.34464.

Problem 7

A packaging machine jams on 1 out of every 3 startups. You want to estimate the probability that it jams at least twice in the next 5 startups. (a) Explain why no assignment of the ten digits can give a probability of exactly 13\frac{1}{3}, and give an assignment that does. (b) Say what fraction of digits your scheme discards and roughly how many digits one trial needs. (c) Run 4 trials on the digits below, reading left to right and running straight on into the next trial.

6 4 0 9 5 2 7 1 3 0 8 6 4 9 2 5 0 1 7 3 8 0 6 4

(d) Give the estimate and compare it with the exact probability 1(23)55(13)(23)41 - \left(\frac{2}{3}\right)^5 - 5\left(\frac{1}{3}\right)\left(\frac{2}{3}\right)^4.

Show the worked solution
  1. (a) Any assignment that uses all ten digits gives each outcome a probability of the form k10\frac{k}{10} for some whole number kk. Since 13=0.3333\frac{1}{3} = 0.3333\ldots is not k10\frac{k}{10} for any whole kk, no such assignment is exact: 310=0.30\frac{3}{10} = 0.30 is too low and 410=0.40\frac{4}{10} = 0.40 is too high.

  2. (a) Discarding fixes it. Assign 1, 2, and 3 to a jam, assign 4, 5, 6, 7, 8, and 9 to a clean startup, and discard every 0. That leaves 9 usable digits with 3 of them meaning a jam, so the probability is exactly 39=13\frac{3}{9} = \frac{1}{3}.

  3. (b) One digit in ten is a 0, so 110=0.10\frac{1}{10} = 0.10 of the digits are discarded and 0.900.90 are usable. To collect 5 usable digits you need about 50.90=5.6\frac{5}{0.90} = 5.6 digits on average, so plan on roughly 6 digits per trial and accept that trials vary in length.

  4. (b) One trial is 5 usable digits, one per startup, ignoring any 0 you read past. Repeats are kept, since 5 startups are 5 separate events. Record the number of digits from 1 to 3, then note whether that count is 2 or more.

  5. (c) Trial 1 reads 6, 4, then a 0 that is skipped, then 9, 5, 2. The five usable digits are 6, 4, 9, 5, and 2, and only the 2 falls in 1 to 3, so trial 1 has 1 jam and records no.

  6. (c) Trial 2 picks up where trial 1 stopped: 7, 1, 3, then a skipped 0, then 8, 6. The usable digits are 7, 1, 3, 8, and 6, and both the 1 and the 3 are jams, so trial 2 has 2 jams and records yes.

  7. (c) Trial 3 reads 4, 9, 2, 5, then a skipped 0, then 1. The usable digits are 4, 9, 2, 5, and 1, and the 2 and the 1 are jams, so trial 3 has 2 jams and records yes.

  8. (c) Trial 4 reads 7, 3, 8, then a skipped 0, then 6, 4. The usable digits are 7, 3, 8, 6, and 4, and only the 3 is a jam, so trial 4 has 1 jam and records no. Every trial here happened to use exactly 6 digits because each block of 6 contained exactly one 0, which will not usually be the case.

  9. (d) Two of the 4 trials recorded yes, so the estimate is 24=0.50\frac{2}{4} = 0.50.

  10. (d) Compute the exact value. (23)5=32243=0.1317\left(\frac{2}{3}\right)^5 = \frac{32}{243} = 0.1317 to four decimal places, and (23)4=1681=0.1975\left(\frac{2}{3}\right)^4 = \frac{16}{81} = 0.1975, so 5×13×0.1975=1.6667×0.1975=0.32925 \times \frac{1}{3} \times 0.1975 = 1.6667 \times 0.1975 = 0.3292. Then 10.13170.3292=0.53911 - 0.1317 - 0.3292 = 0.5391. The 4-trial estimate of 0.500.50 lands in the right neighborhood, which at this trial count is luck rather than evidence.

(a) Every all-digit assignment gives a probability of the form k10\frac{k}{10} and 13\frac{1}{3} is not one of those, so assign 1, 2, 3 to a jam and 4 to 9 to a clean startup and discard 0, giving 39=13\frac{3}{9} = \frac{1}{3}; (b) 0.100.10 of digits are discarded and a trial needs about 50.90=5.6\frac{5}{0.90} = 5.6 digits; (c) jam counts of 1, 2, 2, and 1, so trials 2 and 3 record yes; (d) 24=0.50\frac{2}{4} = 0.50 against the exact 10.13170.3292=0.53911 - 0.1317 - 0.3292 = 0.5391.

Problem 8

A community solar program received 500 applications, 200 of them from renters, and awarded 25 panel subsidies by what it describes as a fair lottery. Only 5 of the 25 winners are renters. A housing group wants to know whether that is surprising under a fair lottery. (a) Give a digit assignment and justify the proportion. (b) Define one trial and say exactly what to record. (c) The first trial used the 25 digits below. Find the number of renters it produced.

8 2 5 0 9 3 6 1 7 4 0 8 2 9 5 3 6 0 4 7 1 9 8 2 5

(d) Across 200 trials, 6 produced 5 or fewer renters. Estimate the probability and say what it means. (e) Decide what the housing group can and cannot conclude, and name the approximation the digit assignment makes.

Show the worked solution
  1. (a) Find the renter share of the applicant pool: 200500=0.40\frac{200}{500} = 0.40. Assign digits 0, 1, 2, and 3 to a renter and digits 4 through 9 to a non-renter. That is 4 of the 10 digits, so the scheme gives 410=0.40\frac{4}{10} = 0.40 with no discards.

  2. (b) One trial is 25 digits, one for each of the 25 subsidies awarded. Record the number of digits from 0 to 3, which is the simulated number of renters among the winners, and note whether that count is 5 or fewer, since 5 is what actually happened.

  3. (c) Walk the 25 digits in order and count the ones from 0 to 3. The digits are 8, 2, 5, 0, 9, 3, 6, 1, 7, 4, 0, 8, 2, 9, 5, 3, 6, 0, 4, 7, 1, 9, 8, 2, 5. The ones that count are the 2 in position 2, the 0 in position 4, the 3 in position 6, the 1 in position 8, the 0 in position 11, the 2 in position 13, the 3 in position 16, the 0 in position 18, the 1 in position 21, and the 2 in position 24.

  4. (c) That is 10 renters in this trial. Since 10 is far above 5, the trial does not count toward the tally in part (d). Ten is also exactly what to expect, because 25×0.40=1025 \times 0.40 = 10.

  5. (d) The estimate is the proportion of trials that matched or beat the real result: 6200=0.03\frac{6}{200} = 0.03.

  6. (d) Read it in context. If the lottery treated renters like a random draw at 40 percent, about 3 percent of 25-winner lotteries would produce 5 or fewer renters. Getting 5 is not impossible under fairness, only uncommon.

  7. (e) What the group can say: 0.030.03 is below the 5 percent mark usually treated as surprising, so the outcome is unusual under the fairness assumption, and that is evidence worth pursuing. What they cannot say: the simulation does not show the lottery was rigged, since about 3 in 100 fair lotteries look like this and the simulation identifies no mechanism. A simulation can only tell you how often chance alone produces a result this extreme.

  8. (e) Name the approximation. The 25 winners are drawn without replacement from 500 applicants, so the draws are not truly independent, yet the digit scheme treats each of the 25 as an independent draw at 0.400.40. That is defensible here because 25 is 5 percent of 500, inside the 10% condition that the sample be no more than a tenth of the population, since 2550010=5025 \le \frac{500}{10} = 50.

(a) Digits 0 to 3 are renters and 4 to 9 are not, matching 200500=0.40\frac{200}{500} = 0.40; (b) one trial is 25 digits, and you record the count of digits from 0 to 3 and whether it is 5 or fewer; (c) 10 renters, which is also the expected count 25×0.40=1025 \times 0.40 = 10; (d) 6200=0.03\frac{6}{200} = 0.03, so about 3 percent of fair lotteries would give 5 or fewer renters; (e) the result is surprising but not proof, and the scheme approximates without-replacement draws as independent, which the 10% condition permits since 2550010=5025 \le \frac{500}{10} = 50.