<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts | Afableco</title><link>https://www.afableco.com/post/</link><atom:link href="https://www.afableco.com/post/index.xml" rel="self" type="application/rss+xml"/><description>Posts</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><image><url>https://www.afableco.com/media/icon_hu60bdd511874ca5e93cfef422b006d923_42150_512x512_fill_lanczos_center_3.png</url><title>Posts</title><link>https://www.afableco.com/post/</link></image><item><title>Population growth with a time varying growth rate</title><link>https://www.afableco.com/post/population-growth-with-a-time-varying-growth-rate/</link><pubDate>Sun, 17 Oct 2021 00:00:00 +0000</pubDate><guid>https://www.afableco.com/post/population-growth-with-a-time-varying-growth-rate/</guid><description>
&lt;script src="https://www.afableco.com/post/population-growth-with-a-time-varying-growth-rate/index_files/header-attrs/header-attrs.js">&lt;/script>
&lt;p>This article considers the exponential population growth model where the population growth rate is not constant over time.&lt;/p>
&lt;p>I have just started working my way through Andrei Rogers’ &lt;em>Applied Multiregional Demography Through Problems: A Programmed Learning Workbook with Exercises and Solutions&lt;/em> &lt;span class="citation">(&lt;a href="#ref-rogers2020" role="doc-biblioref">Rogers 2020&lt;/a>)&lt;/span>. There is an exercise that has the population growth rate decline linearly over time to zero growth. In the preceeding text, the explanation only looks at a case where the growth rate is constant. I was unable to generalise this method to deal with a non-constant case.&lt;/p>
&lt;p>I pulled out my copy of &lt;em>Demographic Methods&lt;/em> &lt;span class="citation">(&lt;a href="#ref-hinde2014" role="doc-biblioref">Hinde 2014&lt;/a>)&lt;/span> to see how it presents population growth. It derives the case for constant growth using the same approach as &lt;span class="citation">&lt;a href="#ref-rogers2020" role="doc-biblioref">Rogers&lt;/a> (&lt;a href="#ref-rogers2020" role="doc-biblioref">2020&lt;/a>)&lt;/span>. So I was no further ahead.&lt;/p>
&lt;p>In this post I:&lt;/p>
&lt;ul>
&lt;li>outline the approach used in these books; and then&lt;/li>
&lt;li>describe a generalised method to derive a solution for the growth rate to vary with regard to time.&lt;/li>
&lt;/ul>
&lt;div id="constant-growth" class="section level2">
&lt;h2>Constant growth&lt;/h2>
&lt;p>The approach used in the two books moves from an annual constant rate of growth to the continuous case. Their derivation uses the following approach.&lt;/p>
&lt;p>Say we had a population growing at constant rate of &lt;span class="math inline">\(r\)&lt;/span> per annum. If the population size at the start was &lt;span class="math inline">\(P_0\)&lt;/span> then after a year the population size would be &lt;span class="math inline">\(P_1 = P_0(1+r)\)&lt;/span>. Since this can compound over time, then after year &lt;span class="math inline">\(n\)&lt;/span> the population size would be &lt;span class="math inline">\(P_n = P_0(1+r)(1+r)...(1+r) = P_0(1+r)^n\)&lt;/span>. The compounding in this formulation only happens once a year.&lt;/p>
&lt;p>In order to move to the continous case, the compunding can be spit into finer time periods. So for example, growth compounding six monthly would be &lt;span class="math inline">\(P_1 = P_0(1+\frac{r}{2})^{2}\)&lt;/span> or for n years &lt;span class="math inline">\(P_n = P_0(1+\frac{r}{2})^{2n}\)&lt;/span>. If the compounding period is reduced to shorter time periods then the equation can be generalised to &lt;span class="math inline">\(P_n = P_0(1+\frac{r}{k})^{kn}\)&lt;/span>, where &lt;span class="math inline">\(k\)&lt;/span> is the number of compounding time periods within a year.&lt;/p>
&lt;p>At this point they move to focussing on increasing &lt;span class="math inline">\(k\)&lt;/span> toward infinity and using a limit. Taking the compounding part of the formula they derive the limit as &lt;span class="math inline">\(e^r\)&lt;/span>:&lt;span class="math display">\[\lim_{k \to \infty}(1+\frac{r}{k})^{k} = e^r\]&lt;/span>&lt;/p>
&lt;p>This leads to the growth formula as: &lt;span class="math display">\[P_n = P_0e^{rn}\]&lt;/span>&lt;/p>
&lt;p>This is a rather beautiful mathematical result. To explain how &lt;span class="math inline">\(e\)&lt;/span> pops out of the above limit &lt;span class="citation">&lt;a href="#ref-hinde2014" role="doc-biblioref">Hinde&lt;/a> (&lt;a href="#ref-hinde2014" role="doc-biblioref">2014&lt;/a>)&lt;/span> takes a further step to show the binomial expansion of the &lt;span class="math inline">\((1+\frac{r}{k})^{k}\)&lt;/span> for &lt;span class="math inline">\(k=3\)&lt;/span>, to show how this looks like the power series expansion of the &lt;span class="math inline">\(e^x\)&lt;/span>.&lt;/p>
&lt;/div>
&lt;div id="constant-growth-now-with-calculus" class="section level2">
&lt;h2>Constant growth, now with calculus&lt;/h2>
&lt;p>So while above is very interesting, I was not able to generalise it to &lt;span class="math inline">\(r\)&lt;/span> changing with time. As a result, I was struggling to solve Rogers’ exercise. Stepping back, I thought the answer might involve calculus.&lt;/p>
&lt;p>My calculus is very rusty. So I turned to my old friend &lt;span class="citation">&lt;a href="#ref-thomas1988" role="doc-biblioref">Thomas and Finney&lt;/a> (&lt;a href="#ref-thomas1988" role="doc-biblioref">1988&lt;/a>)&lt;/span>. With population growth we are seeking to change the population size over time. To express this idea as a differential equation for the constant growth rate expression we would write this as: &lt;span class="math display">\[ \frac{dP(t)}{dt} = rP(t)\]&lt;/span>.&lt;/p>
&lt;p>In words, the change in the size of the population is proportional to the size of the population. With the proportion in our case being &lt;span class="math inline">\(r\)&lt;/span>. To solve this we can rearrange and then integrate. &lt;span class="math display">\[ \frac{1}{P(t)}dP(t) = r dt\]&lt;/span>&lt;/p>
&lt;p>This integrates to: &lt;span class="math display">\[ln(P(t)) + C = rt\]&lt;/span>&lt;/p>
&lt;p>Since we want &lt;span class="math inline">\(P(t)\)&lt;/span> we can raise both sides to the power of &lt;span class="math inline">\(e\)&lt;/span> to get rid of the log: &lt;span class="math display">\[P(t)e^C = e^{rt}\]&lt;/span>&lt;/p>
&lt;p>We can then move the constant &lt;span class="math inline">\(e^C\)&lt;/span> to the otherside and since at time zero the equation has to equal the starting population size we can set this to &lt;span class="math inline">\(P(0)\)&lt;/span>. This leaves us with: &lt;span class="math display">\[P(t) = P(0)e^{rt}\]&lt;/span>&lt;/p>
&lt;p>So we are now back at where we started, but now we have a nice approach for moving to a non-constant growth rate.&lt;/p>
&lt;/div>
&lt;div id="non-constant-growth" class="section level2">
&lt;h2>Non-constant growth&lt;/h2>
&lt;p>Going back to our original calculus based formula and substuting the constant &lt;span class="math inline">\(r\)&lt;/span> with a time based function &lt;span class="math inline">\(r(t)\)&lt;/span> we get:
&lt;span class="math display">\[ \frac{dP(t)}{dt} = r(t)P(t)\]&lt;/span>.&lt;/p>
&lt;p>So now we can solve this as:&lt;span class="math display">\[P(t) = P(0)e^{\int{r(t)dt}}\]&lt;/span>&lt;/p>
&lt;p>Admittedly, the &lt;span class="math inline">\(\int{r(t)dt}\)&lt;/span> looks daunting. But in solving this, all we are looking for is the area under the &lt;span class="math inline">\(r(t)\)&lt;/span> curve. In Rogers’ example, he was using a linearly declining &lt;span class="math inline">\(r(t)\)&lt;/span> and solved it using geometry — essentially he recognises that the area under of the &lt;span class="math inline">\(r\)&lt;/span> curve is half of the &lt;span class="math inline">\(r \times n\)&lt;/span> rectangle.&lt;/p>
&lt;/div>
&lt;div id="a-worked-example" class="section level2">
&lt;h2>A worked example&lt;/h2>
&lt;p>Say we have a city population that starts with 200,000 people in 2020. Let’s say the growth rate starts at 2.5% but is declining linearly to zero over 25 years - ie it is decling by 0.1 percentage points per year. What is the population size expected to be in 2045?&lt;/p>
&lt;p>Let’s solve &lt;span class="math inline">\(\int{r(t)dt}\)&lt;/span>.&lt;/p>
&lt;p>From the description &lt;span class="math display">\[r(t) = 0.025 - 0.001t\]&lt;/span>.&lt;/p>
&lt;p>So &lt;span class="math inline">\(\int_{t=0}^{25} (0.025 - 0.001t) dt\)&lt;/span> equals &lt;span class="math display">\[0.025t - \dfrac{0.001}{2}t^2 \Big|_{t=0}^{25} = 0.3125\]&lt;/span>&lt;/p>
&lt;p>So, the population size in 2045 would be &lt;span class="math inline">\(P_{2045} = 200000 e^{0.3125}\)&lt;/span> or 273,368 people.&lt;/p>
&lt;p>We can check this geometrically. If we had constant growth of 2.5% we would have had the growth component as &lt;span class="math inline">\(e^{0.025 \times 25}\)&lt;/span>, but since the area under the curve is &lt;span class="math inline">\(r(t)\)&lt;/span> is only half of the &lt;span class="math inline">\(r \times n\)&lt;/span> rectangle we could write &lt;span class="math inline">\(e^{\frac{0.025}{2} \times 25}\)&lt;/span> which equals &lt;span class="math inline">\(e^{0.3125}\)&lt;/span> giving us the same result.&lt;/p>
&lt;/div>
&lt;div id="conclusion" class="section level2">
&lt;h2>Conclusion&lt;/h2>
&lt;p>I found it quite fun to revisit calculus. I realise that introductory demography textbooks want to step away from this complexity, but I think that in this case avoiding calculus limited the class of problems that could be solved without feeling like I just had to trust the author.&lt;/p>
&lt;/div>
&lt;div id="references" class="section level2 unnumbered">
&lt;h2>References&lt;/h2>
&lt;div id="refs" class="references csl-bib-body hanging-indent">
&lt;div id="ref-hinde2014" class="csl-entry">
Hinde, A. (2014). &lt;em>Demographic &lt;span>Methods&lt;/span>&lt;/em>. &lt;span>Routledge&lt;/span>.
&lt;/div>
&lt;div id="ref-rogers2020" class="csl-entry">
Rogers, A. (2020). &lt;em>Applied &lt;span>Multiregional Demography Through Problems&lt;/span>: A &lt;span>Programmed Learning Workbook&lt;/span> with &lt;span>Exercises&lt;/span> and &lt;span>Solutions&lt;/span>&lt;/em>. &lt;span>Springer Nature&lt;/span>.
&lt;/div>
&lt;div id="ref-thomas1988" class="csl-entry">
Thomas, G.B. and Finney, R.L. (1988). &lt;em>Calculus and Analytic Geometry&lt;/em>. 7th ed. &lt;span>Reading, Mass&lt;/span>: &lt;span>Addison-Wesley Pub. Co&lt;/span>.
&lt;/div>
&lt;/div>
&lt;/div></description></item></channel></rss>