Math Core

Lesson 7.5 · Probability

Simulations

Some probabilities are too hard to count and too slow or costly to test for real. What is the chance a basketball player makes at least 22 of her next 33 shots? You can't make her shoot thousands of times, but you can act it out with a coin, a number cube or random digits. That's a simulation.

What is a simulation?

Definition

Simulation

A simulation is an experiment that uses a simple random tool to model a real situation. The tool's outcomes must have the same probabilities as the real outcomes. You run many trials, then use the experimental probability as an estimate.

Choosing a random tool

Match the tool to the probability you need.

Probability of the real eventA tool that works
12\dfrac{1}{2}flip a coin: heads means the event happens
16\dfrac{1}{6} or 13\dfrac{1}{3}roll a number cube: a 11 means yes (or 11 or 22 for 13\dfrac{1}{3})
14\dfrac{1}{4}spin a spinner with 44 equal sections, one of them shaded
a percent like 30%30\% or 60%60\%pick random digits 00 to 99: let 33 digits (or 66 digits) mean yes

Random digits are the most flexible tool. Each digit from 00 to 99 has a 110\dfrac{1}{10} chance, so you can match any probability in tenths. Computers and calculators can produce long strings of random digits for you.

Running a simulation

Four steps of a simulation

  1. Choose a tool whose outcomes have the right probabilities.
  2. Define a trial: what one run of the situation looks like with your tool.
  3. Run many trials and record whether the event happened in each.
  4. Estimate: the probability is about trials where the event happenedtotal trials\dfrac{\text{trials where the event happened}}{\text{total trials}}.

Worked example: Three shots

Keisha makes 60%60\% of her shots. Use a simulation to estimate the probability that she makes at least 22 of her next 33 shots.

  1. Tool: random digits. Let 0,1,2,3,4,50, 1, 2, 3, 4, 5 mean "make" (that's 66 of 1010 digits, or 60%60\%) and 6,7,8,96, 7, 8, 9 mean "miss."
  2. Trial: one group of 33 digits stands for 33 shots.
  3. Run trials. Here are 1010 trials.
TrialDigitsMakesAt least 22?
1138138122yes
2277477411no
3305905922yes
4462862811no
5544144133yes
6696396311no
7720720722yes
8885585522yes
9919619611no
101053053033yes
  1. Estimate. The event happened in 66 of the 1010 trials, so the probability is about 610=0.6\dfrac{6}{10} = 0.6.

Ten trials give only a rough estimate. Just like any experiment, running more trials (a class might combine results to get 200200) gives an estimate you can trust more.

Common mistake

The tool must match the real probabilities, not just the number of outcomes. A shot is either a make or a miss, but you can't simulate Keisha's shots with a coin, because a coin gives a make only 50%50\% of the time, not 60%60\%.

Worked example: Guessing on a quiz

A quiz has 44 true-or-false questions. Explain how to simulate the chance that someone who guesses on every question gets all 44 right.

Each guess is right with probability 12\dfrac{1}{2}, so flip a coin: heads means a correct answer. One trial is 44 flips. Run many trials and count the ones that are all heads. Divide that count by the number of trials.

(You can check the result with the tree-diagram method: 1616 outcomes, one of them all heads, so the theoretical probability is 116\dfrac{1}{16}. A good simulation should give something close to that.)

Tip

Before you start, write down what each outcome of your tool means, like "00 to 55 = make." Deciding in the middle of the simulation makes mistakes easy.

Practice

Practice 1

A basketball team wins half of its games. Which tool is best for simulating whether the team wins its next game?

Practice 2

A bus is on time 70%70\% of the time. You want to simulate one day using a random digit from 00 to 99. How many of the ten digits should stand for "on time"?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

A class ran a simulation 5050 times. The event they were studying happened in 1818 of the trials. What is their estimate of the probability? Give your answer as a decimal.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

A carnival game is won 13\dfrac{1}{3} of the time. Which simulation does not model the game correctly?

Practice 5

To simulate families with two children, Nia flips a coin twice for each family (heads = girl, tails = boy). Her 2020 trials are below.

GB, BB, GG, BG, GB, GG, BB, BG, GB, BB, GG, GB, BG, BB, GB, GG, BG, BB, GB, BG

Based on her simulation, what is the probability that a family with two children has two girls? Give your answer as a fraction.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

A softball player gets a hit 30%30\% of the time. To simulate 33 at-bats, you use groups of 33 random digits, where 00, 11 and 22 mean a hit and 33 through 99 mean no hit. Here are 1212 trials.

482937615789206358974841663095587719482 \quad 937 \quad 615 \quad 789 \quad 206 \quad 358 \quad 974 \quad 841 \quad 663 \quad 095 \quad 587 \quad 719

Based on these trials, what is the probability that she gets at least one hit in 33 at-bats?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A simulation estimates that the probability of a traffic jam on Main Street during a school morning is 0.250.25. About how many of the 180180 school mornings in a year should have a traffic jam?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.