CPT 01: ModelingExpected Educational ResultsDifferential EquationsModeling Population DecaySimulationPre-Experiment Discussion QuestionsConduct the Experimental ProcedureRun Python Code for SimulationDifference EquationsModeling Population Decay with ImmigrationSimulationPre-Experiment Discussion QuestionsConduct the Experimental ProcedureRun Python Code for SimulationModels for Population DecayDefinition:Mathematical ModelsDefinition:CC BY-NC-SA 4.0
Author: John J Weber III, PhD Corresponding Textbook Sections:
We will conduct a simulation to construct model of a population. This population will consist of six-sided dice. In the activity, you will either gently roll all dice at the same time or simulate rolling N six-sided dice with Python.
Here is the code to simulate the rolling of 100 six-sided die. The comments explain the code.
xxxxxxxxxx9101# Import needed packages2import random, collections, numpy3#4# Initialize the pseudo-random number generator5random.seed()6#7# Simulate 100 rolls of fair six-sided dice8# Create an array of 100 integers on [1,7) and store into x9x=numpy.random.randint(1,7,100)10#11# Print the array and print the counts of the rolls12print(x, collections.Counter(x), sep="\\n\\n")The simulation of population decay will consist of the following steps:
Start with 100 dice;
Roll or simulate the roll of 100 dice;
Repeat Step 2 with the remaining die.
Prior to performing the experiment:
Record data in a two-column table similar to the table below:
| Number of Rolls (Iterations) | Number of Individuals Remaining in Population |
|---|---|
When should you stop the Experimental Procedure? Explain.
Make a conclusion about the experiment. Explain.
Present your data and conclusions to the class.
Critique each group's data and conclusions.
Create a mathematical model:
Critique each group's model.
Make sure that you change Language to Python below the bottom-right portion of the code window.
The code will count the number of each outcome. For example,
Counter({3: 22, 1: 22, 4: 18, 2: 14, 6: 13, 5: 11})
states that there where 22 threes, 22 ones, 18 fours, 14 twos, 13 sixes, and 11 fives.
We will conduct a simulation to construct model of a population. This population will consist of six-sided dice. In the activity, you will either gently roll all dice at the same time or simulate rolling N six-sided dice with Python.
You will use the Python code to simulate the rolling of 100 six-sided die.
The simulation of population decay will consist of the following steps:
Start with 100 dice;
Roll or simulate the roll of 100 dice;
Repeat Step 2 with the remaining die.
Prior to performing the experiment:
Record data in a two-column table similar to the table below:
| Number of Rolls (Iterations) | Number of Individuals in Population |
|---|---|
When should you stop the Experimental Procedure? Explain.
Make a conclusion about the experiment. Explain.
Present your data and conclusions to the class.
Critique each group's data and conclusions.
Create a mathematical model:
Critique each group's model.
Make sure that you change Language to Python below the bottom-right portion of the code window.
The code will count the number of each outcome. For example,
Counter({3: 22, 1: 22, 4: 18, 2: 14, 6: 13, 5: 11})
states that there where 22 threes, 22 ones, 18 fours, 14 twos, 13 sixes, and 11 fives.
Exponential Growth and Decay: An exponential model is used when the rate of change of the population is proportional to the population size.
Compartmental Model: A compartmental model is used when there is an inflow and outflow to a system.
Difference Equation: A difference equation is in the form: and is useful for compartmental models.
Differential Equation (DE): A model (i.e., equation) that contains derivatives (e.g., rate of change, acceleration, etc.) of an unknown function.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License [http://creativecommons.org/licenses/by-nc-sa/4.0/]
Last Modified: Sunday, 23 August 2020 19:57 EDT