• What is this stuff?

Roopnarine's Food Weblog

~ Ramblings and musings in evolutionary paleoecology

Roopnarine's Food Weblog

Tag Archives: mathematical model

Systems Paleoecology – Environmental Variation: Expectations and Averages

14 Tuesday Apr 2020

Posted by proopnarine in Uncategorized

≈ 5 Comments

Tags

environment, ergodic, mathematical model, paleoecology, population growth, population size, stochasticity

WHAT IS ECOLOGICAL STABILITY? In 2019 I posed this question informally to colleagues, using Twitter, a professional workshop that I lead, and a conference. Respondents on Twitter consisted mostly of ecological scientists, but the workshop included paleontologists, biologists, physicists, applied mathematicians, and an array of social scientists, including sociologists, anthropologists, economists, archaeologists, political scientists, historians and others. And this happened…

Previous posts in this series

1. Welcome Back Video
2. Introduction
3. Malthusian Populations
4. Logistic Populations
5. Logistic Populations II

6. Deviations from Equilibrium
7. r, R, and Bifurcations
8. Quasiperiodicity and Chaos
9. Chaotic Stability

Environmental Variation

The discussion to this point has treated the intrinsic demographic parameters, r, R and K as constants. However, it cannot be overstated that under the current conditions of climate change, and the interactions of multiple anthropogenic drivers of population change, great importance must be placed on understanding the potential environmental impacts on those parameters and population dynamics. The impact of direct environmental perturbations was considered briefly in an earlier post, but in reality the relationship can be, and usually is, more complicated. Our collection of environmental data is expanding at a rapid pace, enabling monitoring of variables such as air temperature, precipitation, etc. at scales ranging from meters to the entire planetary surface. Similarly, we are reconstructing environmental histories in ever more detail, ranging from sub-decadal to multimillenial timescales. Those data are revolutionizing views of the relationship between stability and the environment, but they bring their own challenges. The study and literature of that relationship are vast and growing though, and the discussions in this post and the next will therefore be limited to two important topics; the treatment of time in population dynamics, and the effect of nonlinear relationships between population dynamics and environmentally impactful factors. The topics capture two fundamentally important features of environmental variation: the inconstancy of the environment, and organismal responses to the variation.

Expectations and Averages

Imagine a population growing in a randomly varying, but stationary environment, v. We’ll call it a “noisy” environment. The environment varies from one interval of time to another, but the mean environment is constant. We refer to the mean environment as the expected environment, E(v), and its value is independent of time, i.e. E(v) is expected to have the same value no matter when the population exists. Let us assume that the population growth rate, λ, is at any given time a simple function of the value of the environment, say larger values of v increase birth rates and lower values increase death rates. We use λ to signify that we model growth rate here as independent of populations size. This model was introduced in an earlier post (Eq. 2). Then the long-term value of λ is also a simple expectation or function of the mean environment. We will express this as


Eq. 1: (expected or long-term population growth rate) = (function of the mean environment)

E(r) = f(E(v))

A crucial question is this: Is the observed population size, X(t) , equal to the expected size given E(v) and λ? Returning to one of our earlier and simplest models, the expected size of the population after elapsed time T , given an initial population size X(0) and a deterministic, average growth rate of \langle\lambda\rangle, is

Eq. 2: (deterministic population size) = (initial population size) x (the product of growth rate, multiplied by itself T times)

X_T = X_0\langle\lambda\rangle^T

Mathematical digression
X(0) is the initial population size, and \langle\lambda\rangle is the factor by which the population increases during each interval of time. Therefore, after the first interval, population size is
X_1 = X_0 \langle\lambda\rangle
because \langle\lambda\rangle is an average growth rate.
\langle\lambda\rangle = \frac{1}{N}\sum\frac{X_n}{X_{n-1}}
where N is the number of observations in your population size time series. After the second interval,
X_2 = X_1 \langle\lambda\rangle = \left ( X_0 \langle\lambda\rangle\right )\langle\lambda\rangle = X_0\langle\lambda\rangle^2
Thus, after T intervals,
X_T  = X_0 \langle\lambda\rangle^T

Assume realistically, however, that the environment is a randomly varying one, though, and this environmental stochasticity means that there is no single value of v, but instead a distribution of values. Say that we characterize this distribution as a normal one, a mean and variance. Then, by Eq. 1, the population growth rate λ is also a distribution of values. If we assume here that Eq. 1 is a simple linear function, then r is also distributed normally, with mean \langle\lambda\rangle. A population living in that environment will have a value of r, during each interval of its history, drawn from the distribution. In that case, population size after time T is now given as

Eq. 3: (deterministic population size) = (initial population size) x (the product of observed growth rates)

X_T = X_0\prod_{t=1}^{T}\lambda_t

Surprisingly, actual population size given a varying environment is always smaller than that predicted by the mean environment (Fig. 1)!

The difference between deterministic, or expected growth rate given an environmental mean (red line), versus actual growth trajectories based on variation about the same mean (using Eqs. 4 and 5).
Fig. 1: The difference between deterministic, or expected growth rate given an environmental mean (red line), versus actual growth trajectories based on variation about the same mean (using Eqs. 4 and 5).

The mean growth rate predicts the deterministic population size in the absence of environmental variation, but the series of observed λ(t) predicts otherwise. The environment, v, is a random variable with a mean and variance, and we therefore treat population growth as a resulting random variable. The reason for the discrepancy is subtle — growth rate is now a function of environmental variation from one interval of time to the next — but the implications are important. The mean or expected growth rate, \langle\lambda\rangle, is derived from the environmental mean, and is hence an arithmetic mean,

Eq. 4: (average growth rate) = function of (averageD environmentAL VARIATION)

\langle\lambda\rangle=f[(1/T) \sum v(t)]

(because there are T observations), treating population growth as an additive process. Population growth, however, is in actuality a multiplicative process, where future population size is a multiple of initial population size and a series of randomly varying growth rates (Eq. 3) (Lewontin and Cohen, 1969). The true mean growth rate is therefore the geometric mean of the observed growth rates,

Eq. 5: (average growth rate) = (geometric average of observed growth rates)

\bar\lambda_G = \left (\prod \lambda_t\right )^{1/T}

which are themselves functions of the varying environment during a given interval of time, and not the mean environment over time (use the same logic as in the box above). You should be able to convince yourself that the geometric mean is always equal to or less than the arithmetic mean. In this case the geometric mean reflects the fact that population growth is not based on the average environment, but instead on the population’s history, that in turn reflects the manner in which the environment varies. This distinction is an important one to remember whenever dealing with historical, path-dependent processes, such as paleo-population time series, and there are many ways of saying it, e.g. the performance of an individual over time does not equal the average performance of the group, because the system is non-ergodic, i.e., time matters. Or, the observed value of a random variable is not the same as averaging the expected value over time. For our purposes here, the following is the important implication in a world of changing and increasingly variable environments.

Population size in a varying environment is not equal to expected population size in the mean environment.

Vocabulary
Arithmetic mean — Sum of a set of numbers divided by the size of the set.
Environmental stochasticity — The impact of nearly continuous perturbations on individual birth and death rates.
Ergodic — Property of a dynamic system if the behaviour of the system during a sufficiently long interval of time is typical of the system’s behaviour during other intervals of similar duration.
Geometric mean — The n^{\mathtt{th}} root of the product of a set of numbers, where n is the size of the set.
Stationary — A series is stationary if distributional parameters, such as the mean and variance, do not change over time.

References
Lewontin, R. C. and Cohen, D. (1969). On population growth in a randomly varying environment. Proceedings of the National Academy of sciences, 62(4):1056–1060.

Systems Paleoecology – r, R, and Bifurcations

30 Monday Mar 2020

Posted by proopnarine in Uncategorized

≈ 8 Comments

Tags

attractor, bifurcation, ecology, mathematical model, paleoecology, population growth, resilience, theoretical ecology

WHAT IS ECOLOGICAL STABILITY? In 2019 I posed this question informally to colleagues, using Twitter, a professional workshop that I lead, and a conference. Respondents on Twitter consisted mostly of ecological scientists, but the workshop included paleontologists, biologists, physicists, applied mathematicians, and an array of social scientists, including sociologists, anthropologists, economists, archaeologists, political scientists, historians and others. And this happened…

Previous posts in this series:

1. Welcome Back Video
2. Introduction
3. Malthusian Populations

4. Logistic Populations
5. Logistic Populations II
6. Deviations from Equilibrium

In chaos, there is fertility. Anais Nin

The importance of r (and R)

The previous post outlined the circumstances in which an intrinsically stable logistic population can deviate from equilibrium, or its attractor, when perturbed by the external environment. Those deviations are brought about by either direct perturbation of the population, or an alteration of the environment’s carrying capacity (for that species). There is a third parameter, however, that determines dynamics in our models, and that is the rate of increase (r or R). It is a life-history trait determined by the evolutionary history of the species (and population), and interaction of that trait with the environment. Its influence on X(t) is generally to accelerate (or decelerate) the overall rate of population growth, with higher values causing higher overall rates. We can see this by repeating the earlier perturbation example, but with a smaller value of r (Fig. 1). The rate at which a population recovers from a disturbance is therefore determined by its intrinsic rate of increase. This is one measure of resilience. Resilience has (too many) varied meanings in ecology and other sciences, and is typically applied to communities or ecosystems, i.e. multi-population systems. In this instance, however, resilience means specifically the time taken for the system to return to equilibrium, and can therefore be applied to our population. Holling (Holling, 1973) has termed this type of resilience engineering resilience, as the concept has broad application in physics and engineering. Under this definition, populations that recover more quickly are considered to be more resilient. Thus, the rate at which a population recovers from a negative perturbation is directly proportional to its intrinsic rate of increase.

Two populations with different intrinsic rates (blue, $R=0.25$; orange, $R=0.5$; $K=100$) recovering from simultaneous and numerically equal direct perturbations. The population with the higher $r$ recovers faster to equilibrium, and thus has greater engineering resilience.
Two populations with different intrinsic rates (blue, R=0.25; orange, R=0.5; K=100) recovering from simultaneous and numerically equal direct perturbations. The population with the higher r recovers faster to equilibrium, and thus has greater engineering resilience.

Importantly, however, a population isolated from conspecific populations can never grow faster than its intrinsic rate of increase.

Bifurcations

The intrinsic rate of increase can also be a source of dynamics more complex than those presented so far. This is particularly acute in the discrete time, or difference, models because of the recursive feedback loop present in those models (i.e. X(t + 1) is a direct function of X(t)). May (1976) highlighted this using a discrete logistic model.

EQ. 1: (future population size) = [(intrinsic growth rate) x (current population size)] x (growth limited by carrying capacity)

x(t+1) = rx(t)[1-x(t)]

where x is population size standardized to a carrying capacity of 1 and is restricted to the interval 0 < x < 1, and r is the intrinsic growth rate.

May showed that very complex dynamics, such as chaos, can emerge from this very simple model of population growth with non-overlapping generations, as r is increased. The same holds true for the discrete Ricker logistic model presented earlier (Eq. 1). In that model, values of R < 2.0 yield the expected equilibrium logistic growth, but even at values as low as 1.8 < R ≤ 1.9, interesting behaviours begin to emerge — approaching the carrying capacity, population size will overshoot K very slightly before converging to it (Fig. 2A). This is a transient, pre-equilibrium excursion. At R = 2.0 the system undergoes a dramatic shift from the single-valued equilibrium point to an oscillation between two values around the carrying capacity (Fig. 2B). You will notice that the transient overshoot is preserved, and in fact the amplitude of the oscillation is initially large, but the system eventually converges to two fixed values. Those values represent a new attractor, because the system will always converge to an oscillation between them. The value R = 2.0 is a critical point at which the system is said to undergo a bifurcation, with the equilibrium now consisting of two population sizes.

Transitions of a discrete logistic function with increasing $R$. Values of $R$, from upper plot to lower: 1.9, 2.0,
Transitions of a discrete logistic function with increasing R. Values of R, from upper plot to lower: 1.9, 2.0. K=100, and X(0)=1.0. The upper plot illustrates a quasiperiodic series, while the lower plot is chaotic. Each series was iterated for 30 generations. Plots on the left show population size, while on the right they plot the attractor for the entire series.

The amplitude of the oscillations grows as R increases, and the system eventually undergoes further bifurcations, e.g. where the population oscillates between four fixed points. Is the population still stable? The determination of stability now depends on two factors, the first of which is the timescale at which the population is observed. Population sizes and the attractor are repeating cycles, with X(t) cycling (or “orbiting”) between an ordered set of points. Therefore, if the length of time over which X is observed exceeds the period of the attractor, one will observe the system repeating itself, but if it is shorter, the question of stability remains open unless the underlying dynamical law is known. Second, the observation of multiple cycles allows a complete description of the system’s dynamics, and one could then conclude that the system is confined to a compact subset of the phase space. Most importantly, one would conclude that the system is deterministic and predictable. Recall that deterministic means that the entire future trajectory of the system is knowable, given the law by which the system evolves or unfolds over time, i.e. the dynamic equation and the initial condition of the system (X(0)). This is a very Newtonian system which will continue in this manner unless or until acted upon by an external force. The system is as stable as it was when it possessed a simple equilibrium, the only difference being that the attractor now traces a fixed trajectory in phase space comprising multiple values rather than occupying a single point. We can therefore refine our definition of stability.

Intrinsic stability: An intrinsically stable population expresses a finite set of infinitely repeating values.

This definition encompasses both our earlier simple equilibrium, and our newer oscillatory equilibria. It also encompasses further bifurcations that the system undergoes as R is increased, e.g. to a four point attractor.

Vocabulary
Bifurcation — The point at which a (nonlinear) dynamic system develops twice the number of solutions that it had prior to that point.
Engineering resilience — The time taken for a system displaced from equilibrium to return to equilibrium.

References
Holling, C. S. (1973). Resilience and stability of ecological systems. Annual review of Ecology and Systematics, 4(1):1–23.
May, R. M. (1976). Simple mathematical models with very complicated dynamics. Nature, 261(5560):459–467.

Systems Paleoecology – Logistic Populations II

25 Wednesday Mar 2020

Posted by proopnarine in Ecology, paleoecology, Scientific models, Uncategorized

≈ 10 Comments

Tags

ecology, logistic growth, mathematical model, paleoecology, population growth

WHAT IS ECOLOGICAL STABILITY? In 2019 I posed this question informally to colleagues, using Twitter, a professional workshop that I lead, and a conference. Respondents on Twitter consisted mostly of ecological scientists, but the workshop included paleontologists, biologists, physicists, applied mathematicians, and an array of social scientists, including sociologists, anthropologists, economists, archaeologists, political scientists, historians and others. And this happened…

Previous posts in this series:

1. Welcome Back Video
2. Introduction
3. Malthusian Populations

4. Logistic Populations

The logistic equation, covered in the previous post, is a differential equation, where time is divided up into infinitesimal bits to model the growth and size of X (“infinitesimal” knots your stomach? I cannot recommend Steven Strogatz’s “Infinite Powers” enough!). We can also simulate the logistic model in discrete time to get a better feeling for it, where X(t + 1) is population size in the next “time step” or generation. This approach is instructive because anyone can play with the calculations using a calculator or spreadsheet! Here is an example of a discrete version of logistic growth, the Ricker difference equation (Ricker, 1954).

EQ. 1: (FUTURE POPULATION SIZE) = (CURRENT POPULATION SIZE) x (EXPONENTIAL REPRODUCTION LIMITED BY CARRYING CAPACITY AS IN THE LOGISTIC MODEL)

X_{t+1} = X_{t}e^{R\left (1-\frac{X_{t}}{K}\right )}

r has been replaced by R, the main difference between the logistic equation and Eq. 1 being that, because we no longer measure time as continuous but instead step discretely from one generation to the next, we measure the intrinsic rate of increase as the “net population replacement rate”. The population again, after an initial interval of near-exponential growth, settles down to a fixed value at K (Fig. 1). Both the continuous and discrete logistic patterns of population growth are, by all definitions, stable populations in equilibrium. They are stable because, at least within the scope of the models, once a population attains its carrying capacity there is no more variation of population size. This brings us to our first definition of stability.

Stability: An absence of change.

Discrete time logistic growth, showing population sizes per discrete generation. X(0) = 1 and K = 100. R = 1.0.
Discrete time logistic growth, showing population sizes per discrete generation. X(0) = 1 and K = 100. R = 1.0.

In the following sections we will cover a real-world example of logistic growth, and then go through the derivation of the logistic function itself.

An Example of Logistic Growth

The state of Washington in the United States employed a program of harbor seal (Phoca vitulina) culling during the first half of the twentieth century. The seals were considered to be direct competitors to commercial and sport fishermen. The state sponsored monetary bounties for the killing of seals until 1960, by which time seal populations must have been reduced significantly below historical levels. Additional relief arrived for the seals in 1972 with passage of the United States Marine Mammal Protection Act. Monitoring of seal populations along the coast, estuaries and inlets of Washington, primarily by the Washington Department of Fish and Wildlife, and the National Marine Mammal Laboratory provided a time series of seal population size, spanning the beginning of recovery in the 1970’s to the end of the century (Jeffries et al., 2003). Population sizes from one region of the coastal stock, the “Coastal Estuaries”, show a logistic pattern of growth (Fig. 2). The function fitted to the data (using a nonlinear least squares regression) is y = 7511.541/[1 + exp[−0.265(x − 1980.63)]] (r-squared = 0.98; p < 0.0001; note that “r-squared” is the coefficient of correlation, not our intrinsic rate of increase). Given an initial population size of X(0) = 1,694 in year 1975, the function yields estimates of r = 0.265 and K = 7,511. This excellent example of logistic growth in the wild, or recovery in this case, was unfortunately brought to us courtesy of the ill-informed belief that the success of human commercial pursuits necessitate, or even benefit from, the destruction of wild species.

Logistic recovery of a harbor seal (Phoca vitulina) in Washington state, U.S.A., after the cessation of culling and passing of the Marine Mammal Protection Act. Orange circles are observed population sizes, the blue line is the fitted logistic curve, and the red horizontal line is the estimate carrying capacity.
Logistic recovery of a harbor seal (Phoca vitulina) population in Washington state, U.S.A., after the cessation of culling and passing of the Marine Mammal Protection Act. Orange circles are observed population sizes, the blue line is the fitted logistic curve, and the red horizontal line is the estimate carrying capacity.

Deriving the logistic equation
Equation 1 in the previous post is the logistic growth rate of the population, but it is not the logistic function itself. That function is obtained by integrating the growth rate dX/dt, and the process is instructive because, as illustrated in later sections, our ability to do so with more complicated dynamic equations is quite limited.

The logistic growth rate is first re-written to eliminate the X/K ratio (makes it easier to proceed)
\frac{dX}{dt} = rX\left ( 1-\frac{X}{K}\right )
\Rightarrow K\frac{dX}{dt} = rX\left ( K-X\right )
and then re-arranged to separate variables,
\frac{K\, dX}{X\left ( K-X\right)} = r\,dt
The logistic function is derived by integrating both sides, but doing so with the left hand side (LHS) requires simplification using partial fractions (some of you might remember those from high school math; or not).
\frac{K}{X\left ( K-X\right)} = \frac{A}{X} + \frac{B}{K-X}
\Rightarrow K = X\left ( K-X\right ) \left [ \frac{A}{X} + \frac{B}{K-X} \right ]
\Rightarrow K = A(K-X) + BX
\Rightarrow K = AK - X(B-A)
The solutions to the final equation are A=1 and B-A=0, yielding B=1. Therefore
\frac{K}{X\left ( K-X\right)} = \frac{1}{X} + \frac{1}{K-X}
Now if we wish to integrate our logistic differential equation,
\int \frac{K\, dX}{X\left ( K-X\right)} = \int r\,dt,
we can substitute our partial fractions solution and proceed as follows.
\Rightarrow \int \left ( \frac{1}{X} + \frac{1}{K-X}\right ) dX = \int r\,dt
\Rightarrow \int \frac{1}{X}\, dX + \int \frac{1}{K-X}\, dX = \int r\,dt
And if you recall our integration of the Malthusian Equation, the solution is
\Rightarrow \ln{\vert X\vert} - \ln{\vert K-X\vert} = rt + C
\Rightarrow \frac{K-X}{X} = e^{-rt-C}
Let A=e^{-C}, a constant. Then
\frac{K}{X} - 1 = Ae^{-rt}
\Rightarrow \frac{K}{X} = Ae^{-rt} + 1
\Rightarrow X(t) = \frac{K}{Ae^{-rt}+1}
which is the equation for logistic population growth! Whew.

References
Jeffries, S., Huber, H., Calambokidis, J., and Laake, J. (2003). Trends and status of harbor seals in Washington State: 1978-1999. The Journal of Wildlife Management, 67:207–218.
Ricker, W. E. (1954). Stock and recruitment. Journal of the Fisheries Board of Canada, 11:559–623.

A Welcome Back Video!

20 Friday Mar 2020

Posted by proopnarine in Uncategorized

≈ 13 Comments

Tags

COVID-19, extinction, food webs, mathematical model, Network theory, Permian-Triassic extinction, social distancing, virtual teaching

Well, it certainly has been a very long time since my last post. Like many of you, however, I find myself impacted by the COVID-19 pandemic. My short story is that I stopped my commute to work at the California Academy of Sciences more than two weeks ago because, let’s just say that I would probably not fare too well if I became infected. Then on Thursday March 12th the decision was made to close the Academy to the public, we closed to most staff at 8 am on Monday, March 16th, and by that afternoon counties in the San Francisco Bay Area had announced shelter-in-place orders.

As countries across the globe move toward the circumstances in which China found itself by early January, and take more or less appropriate and necessary actions, the disruption to our lives and societies is unprecedented for many (NOW, however, is a great time to reflect on the hardships that have been inflicted globally in recent years on refugees and immigrants). Myself and many of my colleagues have spent hours (online) this week brainstorming ideas of how to help. We are scientists, and although some of us work on crises of various sorts, we are not all biomedical researchers or epidemiologists. Nevertheless, there has been a veritable explosion of virtual offerings intended to help the teachers, professors, kids and parents who are struggling to cope with cancelled classes, closed schools, and prematurely terminated school years. I think that I can contribute here in a small way. Over the next few weeks I will use this blog to roll out a primer that I’ve been working on. It is the basis for a book, but right now I would rather just give it away. I will discuss it in more detail in an upcoming post. In the meanwhile, however, here is a new video from the Academy highlighting some of our ongoing work. I hope that you enjoy it. And please everyone, be safe, be civic, be thankful for all the amazing health care workers around the world, and be anti-social.

Blog Stats

  • 66,357 hits

Categories

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,373 other followers

Copyright

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Blog at WordPress.com.

  • Follow Following
    • Roopnarine's Food Weblog
    • Join 1,373 other followers
    • Already have a WordPress.com account? Log in now.
    • Roopnarine's Food Weblog
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...