Modeling of population prediction problem
I. Summary
This modeling is to verify and simulate Malthusian population model and Logistic model according to American demographic data, and finally determine that Logistic model is an ideal population model, and then use this model to predict China's population growth according to China census data, and finally put forward population control strategies.
2. Simulation verification of existing models
(1) Find out the existing models to describe and control population growth.
There are two basic population models:
& lt 1 & gt; Exponential growth model (Malthusian population model)
& lt2 & gt。 Hindered growth model (logistic model)
(2) The existing mathematical models are deeply analyzed and verified by computer simulation.
Table 1 American demographic data
Year (AD)
Population (millions) 1790
3.9 1800
5.3 18 10
7.2 1820
9.6 1830
12.9 1840
17. 1 1850
23.2
Year (AD)
Population (millions) 1860
3 1.4 1870
38.6 1880
50.2 1890
62.9 1900
76.0 19 10
92.0 1920
106.5
Year (AD)
Population (millions) 1930
123.2 1940
13 1.7 1950
150.7 1960
179.3 1970
204.0 1980
226.5 1990
25 1.4
& lt 1 & gt; Exponential growth model (Malthusian population model)
This model was first put forward by Malthus (1766— 1834), a British economist who studied the population problem. 1798 published a population growth model based on 100 population data for the first time.
1 Assumption: the population growth rate r is constant (that is, the population growth per unit time is directly proportional to the population at that time).
2. Modeling: Remember that the population at time t = 0 is x0 and the population at time t is x(t). X(t) can be regarded as a function of continuously differentiable because of its large quantity. The population increment from t t+δt+Δ t is:
X(t) satisfies the differential equation:
——————————————( 1)
3 Model solution: Solve the above differential equation to obtain:
——————————————(2)
4 parameter estimation of the model:
R = 0.0237 solved by linear regression (see appendix for program source code and results).
5 Simulation verification:
Substitute x0 = 3.9 and r = 0.0237 into formula (2), calculate the error, and make an image (see appendix for program source code, error and image, the red line in the image is census data, the blue line is prediction curve, and the output in the operation result is year, actual population, predicted population and error in turn).
model analysis
From the above images and calculation results, it can be seen that the predicted population of 1790- 1950 is in good agreement with the actual population, but the error is getting bigger and bigger after 1950.
According to formula (2), we can calculate:
2x0=x0e
That is, e =2.
Solve it, that is, T=50ln2≈34.6 (year).
In other words, the world population will double every 35 years.
According to 1965, the world population is 3.34 billion, and we can get:
2565438+200 trillion in 2005
2625 1800 trillion
3,600 trillion in 2660
……
If calculated according to the per capita surface area of the earth (including water surface and ships), it will be only 0.09 square meters in 2625.
/people, that is, people can only squeeze next to people. In 2660, 35 years later, the population doubled again.
Then someone will stand on someone's shoulder.
cause
The results of this model show that the population will increase exponentially, but in fact, with the population growth, natural resources, environmental conditions and other factors are increasingly limiting the population growth. If the natural growth rate of population can be regarded as a constant when the population base is small, then when the population increases to a certain number, this growth rate will decrease with the increase of population, resulting in greater error.
& lt2 & gt。 Hindered growth model (logistic model)
1 Suppose:
(a) the population growth rate r is the function (subtraction function) of the population x(t) r(x). The simplest assumption is that r (x) = R(x)= R-SX, r, S > 0 (linear function), and r is called the inherent growth rate.
(2) Considering the limitation of natural resources and environmental conditions, the annual maximum population capacity is xm.
2. Build a model:
When x = xm, the growth rate should be 0. That is, r(xm)= 0, so s = r/xm. Substitute r (x) = r (x) = r (1–x/XM) for r(x) = r-sx, and substitute the above formula (1):
————————————(3)
3 model solving:
Solve equation (3) to obtain
——————————(4)
4 parameter estimation of the model:
R = 0.0280 and XM = 3 1 1.9527 are obtained by curve fitting (see appendix for program source code and results).
5 Simulation verification:
Substitute x0 = 3.9, r = 0.0280, XM = 3 1 1.9527 into formula (2), calculate the error, and make an image (see appendix for program source code and error, the red line in the image is the census data, and the blue line is the prediction curve. The output of the operation result is year, actual population and predicted population in turn.
model analysis
From the above error calculation and images, we can see that Logistic model has been able to predict the future population very well, and it is a more accurate population model.
Three. appendix
1. Malthus population model parameter estimation program source code and running results.
Program source code: (the source code is saved in dengchang.m)
t =[ 1790 1800 18 1820 1830 1840 1850 1860 1870 1880 1880 1890 1890 65438
x =[3.9 5.3 7.2 9.6 12.9 17. 1.23.2 3 1.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 13 1.7 150.7
x0 = x( 1);
t0 = t( 1);
R = regression (log(x'/x0), t'–t0)
? Running results:
& gt& gt Deng Chang
r =
0.0237
2. Malthus population model simulation verifies some program source codes and running results.
Program source code: (the source code is saved in dengchang.m)
t =[ 1790 1800 18 1820 1830 1840 1850 1860 1870 1880 1880 1890 1890 65438
x =[3.9 5.3 7.2 9.6 12.9 17. 1.23.2 3 1.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 13 1.7 150.7
x0 = x( 1);
r = 0.0237
result = x0 * exp(r *(t '-t0));
[t' x' result (x '- result). /result * 100]
plot(t,x,' r ');
Hold on;
Plot(t, result,' b')
? Running result
& gt& gt Deng Chang
ans =
1.0e+003 *
1.7900 0.0039 0.0039 0
1.8000 0.0053 0.0049 0.0072
1.8 100 0.0072 0.0063 0.0 149
1.8200 0.0096 0.0079 0.0209
1.8300 0.0 129 0.0 10 1 0.0282
1.8400 0.0 17 1 0.0 128 0.034 1
1.8500 0.0232 0.0 162 0.0435
1.8600 0.03 14 0.0205 0.0532
1.8700 0.0386 0.0260 0.0486
1.8800 0.0502 0.0329 0.0525
1.8900 0.0629 0.04 17 0.0508
1.9000 0.0760 0.0529 0.0437
1.9 100 0.0920 0.0670 0.0373
1.9200 0. 1065 0.0849 0.0254
1.9300 0. 1232 0. 1077 0.0 144
1.9400 0. 13 17 0. 1365 -0.0035
1.9500 0. 1507 0. 1729 -0.0 129
1.9600 0. 1793 0.2 192 -0.0 182
1.9700 0.2040 0.2778 -0.0266
1.9800 0.2265 0.352 1 -0.0357
1.9900 0.25 14 0.4463 -0.0437
draw
3.Logistic model parameter estimation part of the program source code and running results.
Define the function (the source code is saved in curvefun.m)
Function f = curvefun(x, tdata)
x0 = 3.0
t0 = tdata( 1);
f = x( 1)。 / ( 1 + (x( 1))。 / x0 - 1) * exp(-x(2)。 *(tdata-t0)));
Program source code: (the source code is saved in dengchang.m)
tdata =[ 1790 1800 18 1820 1830 1840 1850 1860 1870 1880 1880 1880 1890 65438+
xdata =[3.9 5.3 7.2 9.6 12.9 17. 1 23.2 3 1.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 13 1.7 150.7
xs = [ 100,0.5];
x = lsqcurvefit('curvefun ',xs,tdata,xdata)
Running results:
& gt& gt Deng Chang
Optimization termination: relative function value
Changes are less than OPTIONS.TolFun
x =
3 1 1.9527 0.0280
4.Logistic model simulation verifies some program source codes and running results.
Program source code: (the source code is saved in dengchang.m)
t =[ 1790 1800 18 1820 1830 1840 1850 1860 1870 1880 1880 1890 1890 65438
x =[3.9 5.3 7.2 9.6 12.9 17. 1.23.2 3 1.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 13 1.7 150.7
x0 = x( 1);
t0 = t( 1);
r = 0.0280
XM = 3 1 1.9527;
Result = xm. / ( 1 + (xm。 /x0- 1)* exp(-r . *(t '-t0)));
[t' x' result (x '- result). /result * 100]
plot(t,x,' r ');
Hold on;
Plot(t, result,' b')
Running result
& gt& gt Deng Chang
ans =
1.0e+003 *
1.7900 0.0039 0.0039 0
1.8000 0.0053 0.005 1 0.003 1
1.8 100 0.0072 0.0068 0.0064
1.8200 0.0096 0.0089 0.0080
1.8300 0.0 129 0.0 1 17 0.0 107
1.8400 0.0 17 1 0.0 152 0.0 123
1.8500 0.0232 0.0 198 0.0 169
1.8600 0.03 14 0.0257 0.022 1
1.8700 0.0386 0.0332 0.0 164
1.8800 0.0502 0.0424 0.0 184
1.8900 0.0629 0.0538 0.0 170
1.9000 0.0760 0.0674 0.0 128
1.9 100 0.0920 0.0833 0.0 104
1.9200 0. 1065 0. 10 15 0.0049
1.9300 0. 1232 0. 12 15 0.00 14
1.9400 0. 13 17 0. 1428 -0.0078
1.9500 0. 1507 0. 1646 -0.0084
1.9600 0. 1793 0. 186 1 -0.0036
1.9700 0.2040 0.2064 -0.00 12
1.9800 0.2265 0.2250 0.0007
1.9900 0.25 14 0.24 14 0.004 1
draw
5. Logistic model is selected to predict the population growth in China, and some program source codes and running results are given.
Define function: (the source code is saved in curvefun.m)
Function f = curvefun(x, tdata)
x0 = 3.0
t0 = tdata( 1);
f = x( 1)。 / ( 1 + (x( 1))。 / x0 - 1) * exp(-x(2)。 *(tdata-t0)));
Program source code: (the source code is saved in dengchang.m)
tdata =[ 1908 1933 1953 1964 1982 1990 1995 2000];
xdata =[3.0 4.7 6.0 7.2 10.3 1 1.3 12.0 13.0];
xs = [ 13,0.5];
x0 = xdata( 1);
t0 = tdata( 1);
x = lsqcurvefit('curvefun ',xs,tdata,xdata);
For i = 2008: 2027
Results (i-2007) = x( 1). / ( 1 + (x( 1))。 / x0 - 1) * exp(-x(2)。 *(I-t0)));
end
Time = 2008: 2027;
[Time' Result']
? Running results:
& gt& gt Deng Chang
Optimization termination: relative function value
Changes are less than OPTIONS.TolFun
ans =
1.0e+003 *
2.0080 0.0 148
2.0090 0.0 150
2.0 100 0.0 152
2.0 1 10 0.0 154
2.0 120 0.0 157
2.0 130 0.0 159
2.0 140 0.0 16 1
2.0 150 0.0 164
2.0 160 0.0 166
2.0 170 0.0 169
2.0 180 0.0 17 1
2.0 190 0.0 174
2.0200 0.0 176
2.02 10 0.0 179
2.0220 0.0 18 1
2.0230 0.0 184
2.0240 0.0 187
2.0250 0.0 190
2.0260 0.0 192
2.0270 0.0 195