BIOD59H3F / EEB1420H
Homework 1; due Sept. 20, 2023, 1pm (before lab)
This homework is worth 12.5% of your final mark for BIOD59H3F students, and 10% of your final mark for EEB1420H students.
For submission, please prepare one Word-document (.docx) that contains all your answers,including all equations and all figures that you generated. Please make sure that figures are appropriately labelled, and that all figures are accompanied by captions describing what each figure shows. Please also submit an Excel-file (.xlsx) showing your work, as well as a file containing your MATLAB-code (.m). Please annotate your MATLAB-code appropriately (using the ‘%’-command), explaining what it does. Please submit all files to the course’s Teaching Assistant by the due date.
The homework is graded out of 40 points.
A – Demographic Calculations Using Spreadsheets (e.g., Microsoft Excel) and MATLAB [25 points total for this section]
1. The population of city X is currently 1,000 people. Each year, the population grows by 10%. [16 points total for this question]
a) Plot the population trajectory for the next 15 years using spreadsheet calculations (e.g., Microsoft Excel). Use the geometric model of growth, i.e. Nt+1 = λNt. [3 points]
b) Repeat (a) using MATLAB. [5 points]
c) To illustrate how population size depends on the population growth rate, λ, make a plot that
shows the population size after 15 years of growth (y-axis) as a function of the per capita population growth rate, λ (x-axis), using both spreadsheet calculations [3 points] and MATLAB [5 points].
2. Consider a population of 50 individuals. Each individual has an 80% chance of surviving to the next year. There are no births. [9 points total for this question]
a) Using a random number generator for the binomial distribution [google the appropriate commands], modify the spreadsheet from Question 1a to simulate randomly how many individuals survive in each year. Using this stochastic set-up, simulate the population trajectory ten times and show all ten trajectories in the same plot. [4 points]
b) Using a random number generator for the binomial distribution [google the appropriate commands], modify your MATLAB script. from Question 1b to simulate randomly how many individuals survive in each year. Using this stochastic set-up, simulate the population trajectory ten times and show all ten trajectories in the same plot. [5 points]
B - Building dynamic epidemic models [15 points total for this Section]
Lecture 2 shows the flow diagram and ordinary differential equations for a simple epidemic model that allows for the transition of susceptibles into the infectious class (a so-called SI-model). As written, this model does not include recovery from the disease, nor any other processes that could influence disease dynamics. Building increasingly complex models, draw a flow diagram, define appropriate parameters, and write down the ordinary differential equations for each of the following:
a) A model tracking the numbers of susceptible, infectious, and recovered people overtime.
Infectious people recover ata per capita rate ρ, and are healthy, not infectious, and immune to getting the disease again. [2 points]
b) As in (a) but with an added step of “being exposed but not yet infectious” between the S- and I- classes. [2 points]
c) As in (b) but now also tracking the number of deaths. That is,a proportion of infectious people ends up in the Recovered class, while the rest dies. [2 points]
d) As in (c) but now also tracking asymptomatic people. That is,a proportion of exposed, but not yet infectious people, becomes “infectious and symptomatic”, a proportion becomes “infectious and asymptomatic”, and a proportion becomes “not infectious and asymptomatic” . Following some period of time (that may vary between the two classes), people in both asymptomatic classes recover, and are immune to the disease. Symptomatic people may recover and be immune, or die. [4 points]
e) As in (d), but now with partial loss of immunity: people that have recovered lose immunity over time but retain a slightly higher immunity compared to susceptible people who never had been exposed. Such people can get the disease a second time but will have a lower probability of getting infected than those in the S-class. [3 points]
f) As in (e), but now with vaccinations. The vaccine grants the same partial immunity that is granted in (e) to those who had been exposed, recovered, and lost some immunity overtime. [2 points]
[Note: The models in (a) to (f) are nested. As such, you can solve (a)-(f) in two ways: Working from (a) to (f), writing down the equations and flow diagrams for each (more writing, but easier to grasp initially and harder to make a mistake; or you could start with (f), do all relations at once, and then state which parameters need to be set to zero in order to get the solutions for (a) through (e) (more concise and less writing, but you will likely find this approach harder initially]