Skip to content

Posts from the ‘Methods in Mathematical Biology’ Category

MathBio HW6, due Wed April 16

1. A cooperation model.

Consider the following two-species model.

\displaystyle \dot x = x(1 - x) + a x y

\displaystyle \dot y = c y (1 - y) + c b xy

where a, b and c are positive constants.

  1. Under what circumstances is there a positive coexistence equilibrium?
  2. In the case where there exists a positive equilibrium, find ALL equilibria, determine their stability and sketch the phase plane.
  3. What does the phase plane look like when there is no positive coexistence state?

2. On the half life of one-hit wonders

Suppose that there is a band that puts out a great first album, but then they soon run out of ideas.  The first album has 15 songs, of which 5 are good. The second album has 12 songs, of which 3 are good. The last album has 10 songs, of which only 1 is good.  Use Bayes’ Theorem to answer the following questions.

  1. Suppose that a radio station picks songs at random to play and you hear one of their good songs on the radio.  What is the probability that song is from the first album?
  2. Suppose that another radio station plays only good songs and chooses from them at random.  You hear one of the band’s good songs on this station.  What is the probability the song is from the first album?

3. Think about this one carefully!

You visit a neighbor’s house.  You know the neighbor has two children. When you knock, a girl answers the door.  What is the probability that the other child is a girl?

4. Bayes’ Theorem in the news.  Find an example in the news where a test is given widely to many people where there is little to no indication that the person being tested has the condition.  Some recent examples include concerns about mammograms and prescreening for prostate cancer. In the political sphere, there has been significant criticism of testing welfare recipients for drug use.

  1. Provide a brief summary of the article you read. Be sure to point out exactly the nature of the false positives and what cost there is to taking action based on positive results.
  2. From the article or from other supporting documents, estimate the rate of false positives, the rate of false negatives and the overall rate of prevalence of the condition that is being tested for.  Based on your estimates, what is the approximate probability that a positive test is correct?
  3. Based on what you have read, do you think that current policy should change?

Some useful links:

MathBio: Gearing up for Test 2

If you a looking for problems to work on to prepare for Midterm 2, this post will be the place to look.  This will be updated several times over the next few days.

Challenge problems for discrete-time systems.

Solutions to the important parts of the Horseshoe Crab project are written up here:

Horseshow crabs 1a   Horseshoe crabs 1b

For more practice, I recommend 3.3 #5 from the book.

Challenge problems for continuous-time systems.

The first and most important place to find problems for continuous time systems is in my supplemental lecture notes:  Systems of ODEs (pdf).  See in particular problems 4, 5, 6 and 7.  Solutions are included already for 4-6.  I will post a solution to 7 on Monday.

Challenge problem on epidemics.

\dot S = - \alpha SI + \gamma R

\dot I = \alpha SI - \beta I

\dot R = \beta I - \gamma R

Set \beta = 2, \gamma = 1 and impose the constraint that S + I + R = 1.  Rewrite the system as a two dimensional system (in S and I only) and determine a condition for \alpha such that there exists an endemic equilibrium (meaning an equilibrium (S_*,I_*) where S_* > 0 and I_* > 0.  Classify the type of the endemic equilibrium.


There is an endemic equilibrium if \alpha > 2.  CHECK me on this next part!!!  I’m getting that the endemic equilibrium is a stable spiral if \alpha \in (2.0294, 35.9706)

Challenge Problem for Nullcline Analysis

Consider the following system of ODEs which are from the class of Niche Competition models introduced in class.  (Both species exhibit logistic growth models when alone and have negative mutual interactions.) In this case, we have one unknown parameter a.

\dot x = x ( 2 -x - y)

\dot y = y (a - 2x - y)

  • Sketch the x and y nullclines in three cases:  a = 1, 3, 5.  In each case, note whether there is an equilibrium in the first quadrant (a co-existence equilibrium).
  • For what values of a does this system have a coexistence equilibrium?
  • When the coexistence equilibrium exists, what is its type?


The x- and y- nullclines for this problem are pictured below.

Nullclines of the Challenge problem

Nullclines of the Challenge problem

There is only a coexistence equilibrium if a \in (2,4). This equilibrium has coordinates (x_*,y_*) = (a-2, 4-a).  After computing the Jacobian and evaluating at the fixed point, we see that the trace of the Jacobian is -2 for all values of a, while the determinant is -(a-2)(4-a) which is always negative.  We conclude that, when it exists, the coexistence equilibrium is always a saddle node.


MathBio: Midterm 2, Wednesday, April 2

Our second midterm will be Wednesday April 2.  The test will cover topics from Chapters 3 and 4.

More details will be posted soon, but the main theme is:

Qualitative Analysis of two-dimensional systems in both discrete and continuous time.

A non-exhaustive list of topics includes:

  • Biological Modeling concepts
    • Age-structured models (e.g., Juvenile-Adult)
    • Epidemic models (SIS, SIR, SIRS)
    • Multi-species models (Predator-Prey, Niche Competition, Host-Parasitoid)
  • Linear Algebra concepts
    • Writing dynamical systems as Matrix-Vector equations
    • Eigenvalues and Eigenvectors
  • Analysis of linear 2d discrete-time systems
    • The Jury Conditions for Stability
    • Computing Stable Age Structures
  • Analysis of nonlinear 2d discrete time systems
    • Finding equilibria
    • Computing the Jacobian and evaluating at the equilibria to determine stability
  • Analysis of linear continuous-time systems
    • The Trace-Determinant Plane
    • The three forms of general solutions when the eigenvales are 1) real and distinct; 2) real and repeated; 3) complex.
  • Analysis of nonlinear continuous-time systems
    • Finding equilibria
    • Using nullclines to sketch flow in the phase portrait
    • Computing the Jacobian and evaluating at the equilibria to classify type

Reminder: No office hours today, Tuesday 3/18

MathBio: Supplemental Notes for Systems of ODEs

These notes will be updated as we progress through Chapter 4 in the book.  Please keep an eye on this entry for the latest version.

Systems of ODEs (pdf).  Version 1, current as of March 17.

MathBio: Homework 5, due Wed March 19

For the following assignment, you may work in groups but the homework you turn in should be your own.

Homework 5 (pdf)

If you have questions or comments, please use the comments section of this page.

UPDATE (3/17, 3:30 pm): For 1(b) you may set m = 0.9 and determine the stable age structure.

MathBio: The Basic Horseshoe Crab Model

Horseshoe Crab Parameters

During the last class before spring break, we were visited by Daniel Sasson from the Biology Department, a horseshoe crab expert and mathematical modeling enthusiast.  We presented several versions of our models for the “Blood Harvest” we discussed in Wednesday’s class and he advised us on some parameter values that make sense.  Our general conclusions are posted above and we began simulating the code in class.  Everyone immediately noticed an annoying, but persistent explosion no matter what parameters choices were made.  Basically, the default model was given as follows.

Version 1 of the Blood Harvest Model

Version 1 of the Blood Harvest Model

  • m is the mortality rate of juveniles, assumed during class to be 70%, but later determined to be a different value (see below).
  • g is the graduation rate of juveniles to be adults. Since it takes juveniles on average 10 years to become adults, we set this to 0.1
  • f_A is the fecundity of adults.  Daniel said that each female lays 60,000 eggs, of which roughly 10,000 are fertilized and become juveniles.
  • f_B is the fecundity of bled adults.  We assume that the fecundity is about half that of healthy adults.
  • h is the fraction of healthy adults that are harvested and bled each year.  Daniel’s research indicated that roughly one-fifth of the population is bled each year.
  • r is the rate of recovery of the bled adults.  We assume that after one year all bled crabs that have not died are recovered. So r = 1 - \mu_B.
  • \mu_A is the fraction of adults that die each year.  Daniel estimated that crabs live for about ten years as adults, so we set \mu_A = 0.1.
  • \mu_B is the fraction of bled adults that die each year.  The article indicated that roughly 20% of captured crabs do not survive the process.  It was not clear whether this was measured only during the harvesting process, or if the researchers tracked the crabs through out the year to observe their long term rate of death.

As was soon pointed out by David Garcia in the comments section of the Linear 3d coding post, the problem lay in our model for the graduation rate of juveniles to adults.  Very few juveniles progress to adulthood, but the way Version 1 of the model is written, 10% of the 10,000 fertilized eggs will become adults in the next generation.  A more realistic depiction of the dynamic would say that a very large portion of juveniles die first, and then 10% of the remaining juveniles become adults. The updated model would be this.

Version 2 of the Blood Harvest Model

Version 2 of the Blood Harvest Model

I wrote up some code to simulate Version 2.  blood_harvest.R

In the simulation depicted below, the annual fraction of juvenile deaths has been increased to 9/10.  Furthermore, to establish the dynamics before bleeding, the harvest parameter is set to zero. You will note that there is still exponential growth, but it is much slower.

The carnage of the Blood Harvest reduced to three innocuous looking curves.

The carnage of the Blood Harvest reduced to three innocuous looking curves.

Your next homework assignment will involve two parts (an explicit description will be posted Wednesday):

  • You will determine what combinations of the juvenile death fraction m and harvest capture fraction h lead to exponential growth and decay.
  • To introduce the possibility of a stable existence equilibrium, we will introduce logistic growth somewhere in the model and once again analyze circumstances under which the extinction equilibrium is unstable.

Though you are only required to analyze the basic models, I encourage groups with other models to analyze those in parallel to this model.  I will judge the extended models and will pick the best two, which will then presented to Daniel Sasson in a follow-up session.

MathBio: R Code for Linear Structured Systems

Code for simulating linear 3d systems:  linear3d.R

Plot Example

MathBio: Horseshoe Crabs and the Blood Harvest

The Blood Harvest

A Crabbian Dystopia.

On Wednesday my friend Daniel Sasson passed along a fascinating story from The Atlantic, The Blood Harvest, about the blood of horseshoe crabs. I will leave it to the article to explain the why’s, but it turns out that scientists regularly capture horseshoe crabs, drain them of 30% of their blood, and then return them to the ocean where they presumably recover and proliferate.

The story doesn’t seem to be quite so straightforward though.  A recent study showed that 18% of captured crabs do not survive the process, and furthermore, those that do survive are less able to swim to shore to reproduce.  This immediately leads to the question, what is the critical amount of blood harvesting scientists can do without endangering the horseshoe crab population.  Furthermore, if a reduction in harvesting must be made, one might ask whether it is more important to collect fewer crabs or to collect the same number, but bleed them less.

As part of a two-day in-class experiment, we broke up into groups to first develop mathematical models describing the life cycle of horseshoe crabs, and on Friday we will look to analyze these models. Given a common set of assumptions about the basic parameters, it will be interesting to see if our various groups come up with similar or disparate recommendations.

Here is a gallery of chalkboards featuring each of our models:

crabs6 crabs5 crabs4 crabs3 crabs2crabs1


MathBio: Homework 4, Due Wed Feb 26

One problem, due Wed Feb 26


(Logan and Wolesenksy, 3.3 #2)

In 1998, van der Meijden described the following model connecting the cinnabar moth and ragweed.  The life cycle of the moth is as follows.  It lives for one year, lays its eggs on the plant, and dies. The eggs hatch the next spring.  The number of eggs is proportional to the plant biomass the preceding year, or

E_{t+1} = aB_t.

The plant biomass the next year depends on the biomass the current year and the number of eggs according to

B_{t+1} = k e^{-cE_t / B_t}.

  • Explain why the last equation is a reasonable model (plant biomass vs eggs and biomass vs biomass).
  • What are the dimensions of k, c and a?
  • Rewrite the model equations in terms of the “rescaled” variables X_t = B_t / k and Y_t = E_t /ka.  Define b=ac.  What are the dimensions of X_t, \, Y_t and b?
  • Find the equilibrium and determine a condition on b for which the equilibrium is stable.
  • If the system is perturbed from equilibrium, describe how it returns to equilibrium in the stable case. (This means:  is the dominant eigenvalue real or complex?  If it is complex, this means there are decaying oscillations toward the equilibrium.)


One further note about the suggested problem, 3.3 #1.  It appears that there is a typo either in the statement of the problem or in the given solution.  If the statement of the problem is correct, then the projection matrix seen at the top of page 376 should be

\left( \begin{array}{cc} 2 & -2 \\ -1 & 1 \end{array}\right).

Otherwise, the model should be

\Delta P_t = - P_t - 2Q_t, \quad \Delta Q_t = - P_t.

As a hint, keep in mind that this is equivalent to our usual form

P_{t+1} = - 2 Q_t
Q_{t+1} = -P_t + Q_t.

For practice, it’s worth doing the problem both ways and comparing the outcomes.


UPDATE:  Here are the solutions to 3.3 #2 (b) – (e):  Solutions, HW4 (pdf)