Differences
This shows you the differences between two versions of the page.
| — | en:ecovirt:roteiro:den_ind:di_ed_base [2022/09/19 16:43] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | BASE | ||
| + | |||
| + | ====== Density-independent population dynamics with demographic stochasticity ====== | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | The deterministic models of population dynamics do not consider the variability in individual fitness. For example, when we use the discrete growth model | ||
| + | |||
| + | Nt+1=1,5×Nt | ||
| + | |||
| + | we suppose that, for each time interval, the average balance between births and deaths is around 3 over 2, causing an increase of 50% in the population size. This can happen if half of the individuals die without generating offspring and the other half survive and give birth to 2 young each. It is also possible that all of the original population dies, but one individual have 1.5×Nt offspring before dying. | ||
| + | |||
| + | The reasoning is the same for all of the other deterministic models. In the exponential growth model | ||
| + | N(t)=N0ert | ||
| + | |||
| + | the population growths by a rate of ert, due to the instantaneous growth rate r, which is no more and no less than the balance of the birth and death rates. | ||
| + | |||
| + | In short, the population rates are averages that result from a large number of arrangements between births and deaths in a population, most of them with fitness variations. The simple fact that the rates are not integers should hint that there is variation, as a birth rate of 0.5 / yr indicates that some individuals reproduce and others don't, as babies don't come in halves! | ||
| + | |||
| + | The // | ||
| + | |||
| + | ===== Only deaths ===== | ||
| + | |||
| + | Let's start with a population of N0 individuals in which there are no births and no migration. Individuals die at a //per capita// [[ecovirt: | ||
| + | |||
| + | N(t)=N0e(births−deaths)t = N0e−0,693t | ||
| + | |||
| + | With this mortality rate, this model predicts that the population is halved for each year((in other words, the half-life of the population is one year. The half-life and [[ecovirt: | ||
| + | |||
| + | For this to happen, half of the individuals die and half remains alive. Does that mean that our mortality rate is not the same for everyone? To keep the homogeneity premise (and to keep our model simple) we can say that the // | ||
| + | |||
| + | But there is an important difference now: in our new model, chance plays a role in varying the population size around the average: | ||
| + | |||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | Let's suppose we have just 2 individuals. Each of them has a 50% of chance of survival for each year. Assuming that the probabilities are independent, | ||
| + | * Both individuals die, with probability 0.5×0.5=0.25 | ||
| + | * One individual die and the other survives, with probability 2×0.5×0.5=0,5((we double the probabilities product because this result can happen in two different ways: individual A survives and B dies **or** individual A dies and B survives)) | ||
| + | * Both individuals die, with probability 0.5×0.5=0.25 | ||
| + | </ | ||
| + | |||
| + | |||
| + | This shows that our stochastic((we use this word as a synonym for " | ||
| + | |||
| + | But [[http:// | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | // | ||
| + | p(t)=e−μt | ||
| + | </ | ||
| + | |||
| + | So, we expect to see p(t)N0 individuals on t. In other words, the expected population size((which is the same as the population projections average, E[N(t)])) is the same as the model with no stochasticity: | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | E[N(t)] = p(t)N0 = N0e−μt | ||
| + | </ | ||
| + | |||
| + | This shows that, **on the average**, the model with stochasticity results in the same projections as the deterministic one. But how much variation is there around this average? In other words, what is the probability that each other value should occur? | ||
| + | |||
| + | ==== Distribution of probabilities for the population sizes ==== | ||
| + | |||
| + | How to calculate the chance of each population size occurring? This brings us to the concept of // | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | P(N(t)=N0) = p(t)N0 | ||
| + | </ | ||
| + | |||
| + | For small population sizes, this probability may be high, as our example with N0=2 and p(t=1)=0,5 shows: | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | P(N(t)=2) = 0,52 = 0,25 | ||
| + | </ | ||
| + | |||
| + | |||
| + | But when the population is large, the chances that all individuals will survive are very small. The same applies to the probability that all will die, which is | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | P(N(t)=0) = (1−p(t))N0 | ||
| + | </ | ||
| + | |||
| + | The reasoning is analogous to wonder what are the chances of having only heads or only tails in a number of coin tosses. All other values between these extremes are possible, and each of them corresponds to a probability given by: | ||
| + | |||
| + | <WRAP center round box 60%> | ||
| + | P(N(t)=n) = (N0n) p(t)n(1−p(t))(N0−n) | ||
| + | </ | ||
| + | |||
| + | |||
| + | This is the [[http:// | ||
| + | |||
| + | ====== The binomial distribution | ||
| + | |||
| + | You should see a new window with the graph of the number of successes (in our case, survivors), from zero to N0, and their respective probabilities, | ||
| + | |||
| + | Arrange the windows so that the chart window and the options are side by side. Now you can evaluate the effect of changing the two parameters of the binomial: number of attempts and the probability of success. Try some values and propose general rules on its effects by clicking '' | ||
| + | |||
| + | * Keep the number of attempts at 10 and make the probability of success go from 0 to 1 in steps of 0.2. | ||
| + | * Keep the probability of success at 0.5 and increase the number of attempts as 2, 5, 10, 100, 1000. | ||
| + | |||
| + | |||
| + | ==== Question ==== | ||
| + | |||
| + | For a population under only deaths stochastic dynamic with a mortality rate μ=0.693 and initial size N0=10: | ||
| + | - What is the survival probability for t=1, t=2 and t=3? | ||
| + | - Make the graphs of the probability distributions of the population sizes in these 3 times | ||
| + | |||
| + | |||
| + | ====== Computer simulation ====== | ||
| + | |||
| + | So far we have seen some theoretical properties of population dynamics with demographic stochasticity: | ||
| + | - There are more than one possible population size at every time; | ||
| + | - When there is only deaths the probability of population sizes for each time follow a binomial distribution; | ||
| + | - The average population size for each time corresponds to the value predicted by the model without stochasticity (deterministic). | ||
| + | We will now test in practice these properties, and find out some more, simulating populations with the stochastic dynamics of deaths. | ||
| + | |||
| + | |||
| + | ====== Parâmetros ====== | ||
| + | |||
| + | We will simulate populations with demographic stochasticity in continuous time, with the following parameters: | ||
| + | |||
| + | ^ Option ^ parameter ^ definition ^ | ||
| + | ^'' | ||
| + | ^'' | ||
| + | ^'' | ||
| + | ^'' | ||
| + | ^'' | ||
| + | ^'' | ||
| + | |||
| + | |||
| + | Let's simulate ten populations for our first example, up to the time of 5. To do this, change the parameters accordingly: | ||
| + | < | ||
| + | tmax = 5 | ||
| + | nsim = 10 | ||
| + | N0 = 2 | ||
| + | b = 0 | ||
| + | d = 0;693 | ||
| + | </ | ||
| + | |||
| + | You should see a graph like this: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | The colored lines are the trajectories of each of the ten populations, | ||
| + | |||
| + | ==== Population half-life ==== | ||
| + | |||
| + | The expected half-life in our simulation is about one year, but note how some populations took much more time as the others to fall from 2 to 1 individuals, | ||
| + | |||
| + | We can test this by simulating several populations with initial size N0=20 and averaging the time they take to reach N=10. Set the simulation to: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | The graph will be covered with lots of lines, but we are interested in the value of //Halving time//. Is it near the theoretical value? Now change the population initial size to 80, keeping the other options unchanged and run the simulation again. | ||
| + | |||
| + | === Questions === | ||
| + | |||
| + | - What is the effect of the initial size on the mean and standard deviation of the population halving times? | ||
| + | - How can you explain the results that you found? | ||
| + | |||
| + | ======Population size distribution====== | ||
| + | |||
| + | The population size at the end of the simulations (t=2) is variable. We know that the possible values run from zero to N0 (in our case, 20). The expected probability distribution for these values is a binomial with N0 trials and success probability of p(t)=e−0.693×2=0.25. You can make a graph of this distribution using the // | ||
| + | |||
| + | Now let's compare the theoretical distribution graph with our simulations results. Make a graph for the proportion of simulations that ended with each different size by running the following commands: | ||
| + | |||
| + | < | ||
| + | ## gets the final population sizes | ||
| + | sim1.Nt <- sapply(sim1, | ||
| + | ## transforms it into a contingency table | ||
| + | sim1.tab <- table(factor(sim1.Nt, | ||
| + | ## opens a new graphical window | ||
| + | x11() | ||
| + | ## makes the graph with the realized proportions for each population size | ||
| + | plot(sim1.tab/ | ||
| + | </ | ||
| + | |||
| + | Compare both graphs. Is there a good agreement? If you want to superpose both graphs, run: | ||
| + | |||
| + | < | ||
| + | ## expected probabilities | ||
| + | (sim1.esp <- dbinom(0: | ||
| + | lines(0: | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== Population average size ===== | ||
| + | |||
| + | We already have saved a thousand simulated populations, | ||
| + | |||
| + | < | ||
| + | mean(sim1.Nt) | ||
| + | </ | ||
| + | |||
| + | ====Question==== | ||
| + | |||
| + | Is this average size near the expected value? | ||
| + | |||
| + | ====== Births and deaths ====== | ||
| + | |||
| + | What can we expect from a population in which both deaths and births are stochastic? The resulting model is an extension of the following, but now there is a probability that the population will grow. Let's use **Ecovirtual** to see what changes. | ||
| + | |||
| + | ===== Computer simulations ===== | ||
| + | |||
| + | Run a simulation of 200 populations with initial size 1 and birth rate equal to twice the death rate. Set the following options: | ||
| + | |||
| + | < | ||
| + | # save results in sim2 object | ||
| + | tmax = 20 | ||
| + | nsim = 200 | ||
| + | N0 = 1 | ||
| + | b = 0.2 | ||
| + | d = 0.1 | ||
| + | </ | ||
| + | |||
| + | |||
| + | The population sizes will now oscillate in a [[en: | ||
| + | |||
| + | |||
| + | |||
| + | ===== Mean population size ===== | ||
| + | |||
| + | Just like our last model, the expected population size is | ||
| + | |||
| + | E[N(t)]=N0ert | ||
| + | |||
| + | where r is the instantaneous growth rate, that is, the difference between the birth and death rates. Once again, we have saved the simulation results in an R object, from which we can figure out the average population sizes. To do this, run the following commands: | ||
| + | |||
| + | |||
| + | < | ||
| + | sim2.Nt <- sapply(sim2, | ||
| + | mean(sim2.Nt) | ||
| + | </ | ||
| + | |||
| + | === Question === | ||
| + | Does the observed mean population size agree with the theoretical? | ||
| + | |||
| + | |||
| + | ===== Population size distribution ===== | ||
| + | |||
| + | But we already know that the average of a variable does not tell us the whole story. As with any stochastic model, we don't have a single possible value for the population size at each time, but a set of possible values and their corresponding frequencies. Make a histogram of the final population sizes by running the following code: | ||
| + | |||
| + | < | ||
| + | sim2.tab <- table(factor(sim2.Nt, | ||
| + | levels=0: | ||
| + | plot(sim2.tab, | ||
| + | </ | ||
| + | |||
| + | In the model with stochastic deaths, we have seen that the probabilities of finding each population size at each time followed a binomial distribution. In a model with deaths and births, the probabilities follow another distribution, | ||
| + | |||
| + | What matters most here is the probability of population size zero, that is, the probability of extinction. In our simulations, | ||
| + | |||
| + | === Questions === | ||
| + | - With a stochastic population model in which the birth rate is greater than the death rate, what is the effect of the following over the extinction probability? | ||
| + | - Simulation time? | ||
| + | - Initial population size? | ||
| + | - Ratio between both rates? | ||
| + | - Compare your conclusions with those obtained if the births and deaths are equivalent, as done in the [[en: | ||
| + | |||
| + | ====== To learn more ====== | ||
| + | * Renshaw, E. (1991). Modelling biological populations in space and time Cambridge University Press. //This tutorial is inspired on the second chapter of this book, which is a great introduction for stochastic models of births and deaths//. | ||
| + | |||
| + | * Akçakaya H.R., Burgman M.A & Ginzburg, L.V. (1999). [[http:// | ||
| + | |||
| + | * [[http:// | ||