Skip to main content
Mathematics LibreTexts

8.1.6: Estimating Probabilities Using Simulation

  • Page ID
    39015
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Lesson

    Let's simulate real-world situations.

    Exercise \(\PageIndex{1}\): Which One Doesn't Belong: Spinners

    Which spinner doesn't belong?

    clipboard_e3e0f7f61d4f5397f4850e35c28a7175a.png
    Figure \(\PageIndex{1}\)

    Exercise \(\PageIndex{2}\): Deigo's Walk

    Your teacher will give your group the supplies for one of the three different simulations. Follow these instructions to simulate 15 days of Diego’s walk. The first 3 days have been done for you.

    • Simulate one day:
      • If your group gets a bag of papers, reach into the bag, and select one paper without looking inside.
      • If your group gets a spinner, spin the spinner, and see where it stops.
      • If your group gets two number cubes, roll both cubes, and add the numbers that land face up. A sum of 2–8 means Diego has to wait.
    • Record in the table whether or not Diego had to wait more than 1 minute.
    • Calculate the total number of days and the cumulative fraction of days that Diego has had to wait so far.
    • On the graph, plot the number of days and the fraction that Diego has had to wait. Connect each point by a line.
    • If your group has the bag of papers, put the paper back into the bag, and shake the bag to mix up the papers.
    • Pass the supplies to the next person in the group.
    clipboard_e43c2b6d1d241b3ca70a5c5158fbaf8c4.png
    Figure \(\PageIndex{2}\): A graph of two connected line segments on a coordinate grid with the origin marked O. The horizontal axis is labeled day, with the numbers 0 through 24, in increments of 2, indicated. There are vertical grid lines midway between. The vertical axis is labeled fraction of days Diego had to wait with the numbers 0 point 1 through 1, in increments of 0 point 1, indicated. The first line segment begins at the point with coordinates 1 comma 0 and moves upward and to the right, ending at the point with coordinates 2 comma 0 point 5. The second line segment begins where the first line ends, and moves slightly upward and to the right, ending at the point with coordinates 3 comma 0 point 6 7.
    day Does Diego have to wait more than 1 minute? total number of days Diego had to wait fraction of days Diego had to wait
    1 no 0 \(\frac{0}{1}=0.00\)
    2 yes 1 \(\frac{1}{2}=0.50\)
    3 yes 2 \(\frac{2}{3}\approx 0.67\)
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    Table \(\PageIndex{1}\)
    1. Based on the data you have collected, do you think the fraction of days Diego has to wait after the 16th day will be closer to 0.9 or 0.7? Explain or show your reasoning.
    2. Continue the simulation for 10 more days. Record your results in this table and on the graph from earlier.
      day Does Diego have to wait more than 1 minute? total number of days Diego had to wait fraction of days Diego had to wait
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      Table \(\PageIndex{2}\)
    3. What do you notice about the graph?
    4. Based on the graph, estimate the probability that Diego will have to wait more than 1 minute to cross the crosswalk.

    Are you ready for more?

    Let's look at why the values tend to not change much after doing the simulation many times.

    1. After doing the simulation 4 times, a group finds that Diego had to wait 3 times. What is an estimate for the probability Diego has to wait based on these results?
      1. If this group does the simulation 1 more time, what are the two possible outcomes for the fifth simulation?
      2. For each possibility, estimate the probability Diego has to wait.
      3. What are the differences between the possible estimates after 5 simulations and the estimate after 4 simulations?
    2. After doing the simulation 20 times, this group finds that Diego had to wait 15 times. What is an estimate for the probability Diego has to wait based on these results?
      1. If this group does the simulation 1 more time, what are the two possible outcomes for the twenty-first simulation?
      2. For each possibility, estimate the probability Diego has to wait.
      3. What are the differences between the possible estimates after 21 simulations and the estimate after 20 simulations?
    3. Use these results to explain why a single result after many simulations does not affect the estimate as much as a single result after only a few simulations.

    Exercise \(\PageIndex{3}\): Designing Experiments

    For each situation, describe a chance experiment that would fairly represent it.

    1. Six people are going out to lunch together. One of them will be selected at random to choose which restaurant to go to. Who gets to choose?
    2. After a robot stands up, it is equally likely to step forward with its left foot or its right foot. Which foot will it use for its first step?
    3. In a computer game, there are three tunnels. Each time the level loads, the computer randomly selects one of the tunnels to lead to the castle. Which tunnel is it?
    4. Your school is taking 4 buses of students on a field trip. Will you be assigned to the same bus that your math teacher is riding on?

    Summary

    Sometimes it is easier to estimate a probability by doing a simulation. A simulation is an experiment that approximates a situation in the real world. Simulations are useful when it is hard or time-consuming to gather enough information to estimate the probability of some event.

    For example, imagine Andre has to transfer from one bus to another on the way to his music lesson. Most of the time he makes the transfer just fine, but sometimes the first bus is late and he misses the second bus. We could set up a simulation with slips of paper in a bag. Each paper is marked with a time when the first bus arrives at the transfer point. We select slips at random from the bag. After many trials, we calculate the fraction of the times that he missed the bus to estimate the probability that he will miss the bus on a given day.

    Glossary Entries

    Definition: Chance Experiment

    A chance experiment is something you can do over and over again, and you don’t know what will happen each time.

    For example, each time you spin the spinner, it could land on red, yellow, blue, or green.

    clipboard_e7abe0ec1a875462e6caa0d7b2802b3c8.png
    Figure \(\PageIndex{3}\)

    Definition: Event

    An event is a set of one or more outcomes in a chance experiment. For example, if we roll a number cube, there are six possible outcomes.

    clipboard_e436017182863c82c67e82c61c86a6f11.png
    Figure \(\PageIndex{4}\)

    Examples of events are “rolling a number less than 3,” “rolling an even number,” or “rolling a 5.”

    Definition: Outcome

    An outcome of a chance experiment is one of the things that can happen when you do the experiment. For example, the possible outcomes of tossing a coin are heads and tails.

    Definition: Probability

    The probability of an event is a number that tells how likely it is to happen. A probability of 1 means the event will always happen. A probability of 0 means the event will never happen.

    For example, the probability of selecting a moon block at random from this bag is \(\frac{4}{5}\).

    clipboard_e076decb363c6ccdb2350833e1ac20ed4.png
    Figure \(\PageIndex{5}\)

    Definition: Random

    Outcomes of a chance experiment are random if they are all equally likely to happen.

    Definition: Sample Space

    The sample space is the list of every possible outcome for a chance experiment.

    For example, the sample space for tossing two coins is:

    heads-heads tails-heads
    heads-tails tails-tails
    Table \(\PageIndex{3}\)

    Definition: Simulation

    A simulation is an experiment that is used to estimate the probability of a real-world event.

    For example, suppose the weather forecast says there is a 25% chance of rain. We can simulate this situation with a spinner with four equal sections. If the spinner stops on red, it represents rain. If the spinner stops on any other color, it represents no rain.

    clipboard_ef4bb7cf89b3b359f31c53c3b46a67b81.png
    Figure \(\PageIndex{6}\): A circular spinner divided into 4 equal parts. The top left section is red and labeled R. The top right section is blue and labeled B. The bottom right section is green and labeled G. The bottom left section is yellow and labeled Y. The spinner dial points to the section labeled G.

    Practice

    Exercise \(\PageIndex{4}\)

    The weather forecast says there is a 75% chance it will rain later today.

    1. Draw a spinner you could use to simulate this probability.
    2. Describe another way you could simulate this probability.

    Exercise \(\PageIndex{5}\)

    An experiment will produce one of ten different outcomes with equal probability for each. Why would using a standard number cube to simulate the experiment be a bad choice?

    Exercise \(\PageIndex{6}\)

    An ice cream shop offers 40 different flavors. To simulate the most commonly chosen flavor, you could write the name of each flavor on a piece of paper and put it in a bag. Draw from the bag 100 times, and see which flavor is chosen the most. This simulation is not a good way to figure out the most-commonly chosen flavor. Explain why.

    Exercise \(\PageIndex{7}\)

    Each set of three numbers represents the lengths, in units, of the sides of a triangle. Which set can not be used to make a triangle?

    1. \(7, 6, 14\)
    2. \(4, 4, 4\)
    3. \(6, 6, 2\)
    4. \(7, 8,13\)

    (From Unit 7.2.2)

    Exercise \(\PageIndex{8}\)

    There is a proportional relationship between a volume measured in cups and the same volume measured in tablespoons. 48 tablespoons is equivalent to 3 cups, as shown in the graph.

    clipboard_e18f799da877bb4efe4feb3c374f65eea.png
    Figure \(\PageIndex{7}\): A point plotted in the coordinate plane with the origin labeled O. The horizontal axis is labeled volume in tablespoons and the numbers 0 through 70, in increments of 10, are indicated. There are four evenly spaced gridlines between each indicated number. The vertical axis is labeled volume in cups and the numbers 0 through 6 are indicated. The indicated point has coordinates 48 comma 3.
    1. Plot and label some more points that represent the relationship.
    2. Use a straightedge to draw a line that represents this proportional relationship.
    3. For which value \(y\) is (\(1,y\)) on the line you just drew?
    4. What is the constant of proportionality for this relationship?
    5. Write an equation representing this relationship. Use \(c\) for cups and \(t\) for tablespoons.

    (From Unit 2.5.1)


    This page titled 8.1.6: Estimating Probabilities Using Simulation is shared under a CC BY license and was authored, remixed, and/or curated by Illustrative Mathematics.

    • Was this article helpful?