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**:

- 3.1 – Mathematical Modeling

**Objective 1–1**: I can model population decay using a difference equation.**Objective 1–2**: I can model population decay using a differential equation.**Objective 1–3**: I can use technology to solve models of population decay.

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.

`xxxxxxxxxx`

9101`# Import needed packages`

2`import random, collections, numpy`

3`#`

4`# Initialize the pseudo-random number generator`

5`random.seed()`

6`#`

7`# Simulate 100 rolls of fair six-sided dice`

8`# Create an array of 100 integers on [1,7) and store into x`

9`x=numpy.random.randint(1,7,100)`

10`#`

11`# Print the array and print the counts of the rolls`

12`print(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;

- Any die that shows an odd number, then this
*individual*has passed from the population and is removed from the population. - Record the number of individuals remaining in the population.

- Any die that shows an odd number, then this
Repeat Step 2 with the remaining die.

**Prior** to performing the experiment:

- Make a prediction, i.e., describe what you think will happen.
- Provide assumptions (simple, non-compound assumptions) that will support your prediction.
- Share your predictions and assumptions to the class.
- Critique the predictions and assumptions.

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.

- Explain how you know your conclusion is plausible.
- Compare your prediction with your results.
- Indicate which assumptions actually played a role in the experiment.

Present your data and conclusions to the class.

Critique each group's data and conclusions.

Create a mathematical model:

- Let be the number of iterations.
- Let be the number of dice, [
*individuals*], remaining after each iteration. - Create the mathematical model.
- Describe the reasonableness of your mathematical model for . Explain.
- How would you measure how
*successful*your mathematical model describes . Explain.

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;

- Any die that shows an odd number, then this
*individual*has passed from the population and is removed from the population. - Add 10 additional dice
*individuals*who immigrate into the population. - Record the number of individuals remaining in the population.

- Any die that shows an odd number, then this
Repeat Step 2 with the remaining die.

**Prior** to performing the experiment:

- Make a prediction, i.e., describe what you think will happen.
- Provide assumptions (simple, non-compound assumptions) that will support your prediction.
- Share your predictions and assumptions to the class.
- Critique the predictions and assumptions.

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.

- Explain how you know your conclusion is plausible.
- Compare your prediction with your results.
- Indicate which assumptions actually played a role in the experiment.

Present your data and conclusions to the class.

Critique each group's data and conclusions.

Create a mathematical model:

- Let be the number of iterations.
- Let be the number of dice, [
*individuals*], remaining after each iteration. - Create the mathematical model, i.e., .
- Describe the reasonableness of your mathematical model for . Explain.
- How would you measure how
*successful*your mathematical model describes . Explain.

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