Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 10, No. 3, 2024 87 Using MATLAB to Make Population Prediction Analysis Songming Wang1, a 1Changjun High School of Changsha City, Changsha, 410023, China aWangsm0317@163.com Abstract: Through the curve fitting and interpolation function of matlab software, based on the demographic data in the Statistical Yearbook of Hunan Province from 2000 to 2020, the total population, birth rate and death rate of Hunan Province were predicted, and the data and images were obtained, showing intuitive results. This study uses the two forecasting methods to obtain images and compare them to enrich the population forecasting methods, which has great theoretical and research significance for the population development trend of the future society and the formulation of correct and reasonable population planning schemes. Keywords: Fitting interpolation total population forecast Birth rate forecast death rate forecast. 1. Background Population issue is one of the most important issues facing our country in the 21st century. The study of population question is of great significance both in understanding China's current economic development status and in predicting future economic development. Population forecasting is one of the core tasks for a provincial administrative unit to carry out economic development planning. Population forecast is one of the most basic contents of population forecast, aiming at revealing the size of the future population. 2. Research Situation The total population of our country grows by inertia. According to the seventh National Population census, China's population in 2020 (refers to the population of 31 provinces, autonomous regions and municipalities directly under the Central Government and active military personnel, excluding Hong Kong, Macao and Taiwan residents and foreigners living in 31 provinces, autonomous regions and municipalities directly under the central Government) is 1,411.78 million, an increase of 72.05 million compared with 1,339.72 million in 2010. An increase of 5.38%. Since the founding of the People's Republic of China, China's population has maintained a growing trend. Although China's fertility rate has been reduced to below the replacement level in the 1990s and continues to this day, the total population will still maintain a growth for some time due to the population inertia brought about by the reduction of population mortality rate and the high fertility rate in the early days of the founding of the People's Republic of China. The permanent population of Hunan Province is 66,444,900, compared with 65,70.08 million in 2010 (the sixth national census data, the same below), an increase of 744,100, an increase of 1.13%, the average annual growth rate of 0.11%, down 0.09 percentage points from the average annual growth rate of 0.20% in the last decade. 3. Introduction Most of the predecessors used workfile for population analysis, and few people used MATLAB for analysis. This paper uses MATLAB programming and curve fitting and interpolation methods to forecast the population of Hunan Province in the next 10 years, and analyzes and compares the predicted results. From the perspective of programming modeling, this study will use curve fitting and interpolation methods to provide predicted value and expected value analysis to compare the predicted value and the actual value. Through scientific and reasonable population forecasting, we can understand the population size and age structure in a certain period in the future, which helps the authorities to understand the future labor resources of the country, do a good job in labor distribution and balance, allocate social resources with maximum efficiency, formulate more reasonable plans for social welfare, culture, education and health, urban development and construction, and realize the virtuous circle of the whole society 4. Literature Review In the study of Fu Yanru [1], the author believes that the long-term population prediction level of the LOGISTIC model depends on the determination and selection of model parameters, so as to improve the accuracy of prediction. It is not only necessary to simulate a large number of measured parameters, but also to verify the actual demographic data dating back over the years. By using MATLAB platform and combining the demographic data of China from 1990 to 2008, the author constructed a polynomial fitting model, a near-term population forecasting model and a Fourier series fitting model, which corrected the model parameters, corrected the control errors of the medium and long-term population forecasting, and improved the accuracy of the forecasting model In the study of Yi Liang [2], the author combined the prediction principle of curve fitting, grey system theory and interpolation method respectively, and realized the prediction of China's population development in the next 15 years through MATLAB programming, and analyzed and compared the prediction results, so as to find a more reasonable prediction method. By using curve fitting, grey system theory and interpolation method to forecast and compare the population of our country in the next 15 years, the author finds that the prediction effect of curve fitting method is the best for the short time period of population 88 prediction, but for the long time of population prediction, the effect of grey prediction method is better. In the study of Chen Xia and Xiao LAN [3], the author introduced the harvest function into the Logistic growth model. Therefore, a new improved model is established, and the relevant unknown parameters in the model are estimated by using the least square method. Through curve fitting and data comparison, the improved model is applied to China's population prediction, and good results are obtained, which provides certain reference value for China's population prediction in the future. In the research of Sheng Yinan and Gu Danan. The author briefly introduces the principle of Bayesian stratified probability population forecasting method and gives an example of the results of Bayesian stratified probability population forecasting by taking China as an example. There is no doubt that the classical deterministic forecasting method of demography has played an important role in the past population forecasting. However, since this method divides the population change trend into different plans for forecasting, and only gives the future population development trend under a certain scenario, it cannot give the possible probability of each population prediction plan, nor can it explain the uncertainty of population development. The probabilistic population forecasting method fully takes into account the influence of various uncertainties on population development. Based on the population transition theory, the United Nations Population Division uses a Bayesian hierarchical model to construct the prior probabilities of the distribution of each indicator in each country. By using Markov chain Monte Carlo method, series correlation model and other methods, the historical data of each country from 1950 to the present are used as data sources to predict the total fertility rate, birth life expectancy and total population. These practices have greatly enriched the data and improved the science and reliability of the forecast In 1696, Professor G.King, a British sociologist, first proposed population forecasting [4], which opened the door of population forecasting by constructing some very simple digital models and carrying out modular population forecasting. Then the English scholar Malthus After collecting population data for more than a hundred years and attempting quantitative analysis, he concluded that the net population growth constant was acceptable The Malthus growth model was proposed . Because it is simple and convenient and improves the prediction accuracy in the short term, Many simple population forecasts use this model, but the model regards the net growth rate as a constant, which is obviously not consistent with the long-term development trend of population growth In 1938, Dutch mathematician P.F.Verhulst constructed the Logistic retarded growth model [5]. Its core idea is to assume that the number of individual species will show an exponential growth trend under natural conditions. With the increase of the number of individuals, the marginal distribution of per capita resources will decrease, and the growth rate will gradually slow down and eventually approach a fixed value. This model makes population prediction more standardized and reasonable, so it is still widely used today. In 1945, Leslie proposed the Leslie Matrix, which led to the famous prediction model, the Leslie Matrix Model [6]. This model can be comprehensively tested Considering multiple factors, the matrix is constructed after the age distribution, number, birth rate and death rate of the population are obtained Predict the age distribution and quantity of the population, and can evolve according to the time period to achieve dynamic iteration, which is in 1960 In the study of Australian population data, the results are in good agreement with the real situation, thus verifying the accuracy of the model in forecasting. 5. Curve Fitting and Cubic Spline Interpolation Theory Knowledge 5.1. Curve fitting The establishment of curve fitting model is to use the least square method, according to the experimental data (xi, y) (i= 1,2,... , n), to find the function (f x), after many unknown parameters in the undetermined function (f x) or function (f x), such that the function (f x) is at the point x (i i= 1,2,... The function value (f x) at n) is minimized by the sum of squares of the deviations r= n Σi = 1 r 2 i = n Σi = 1 ((f xi) -yi) 2 from each observed data point i yi respectively. That is, the data point (xi, y) is required to coincide with the predicted data point i (xi, (f x)), which is also called data fitting method. Here we choose the polynomial fitting method to fit the experimental data. Let (f x) =a0+a1x+a2x2 +... +amxm. For the selection of fitting frequency m, the best fitting effect is when the error between the fitting result and the experimental data is minimal. With the help of the principle of least square method and matlab programming, the selection of fitting times m is realized. Achieve population projections. 5.2. Interpolation model Interpolation is based on the known data points (xi, y), i i= 1,2,... n, find a function (f x) such that the function (f x) has i (f x) i =yi at a known data point (xi, y) to predict the function value yi at an unknown point xi. Here we choose polynomial interpolation to give the value of the prediction function at the unknown point. That is, find a polynomial of degree n P (n x) =a0+a1x+a2x2 +... +anx (the number n n+1 determines a polynomial of degree n) such that the polynomial P (nx) satisfies the condition Pn (x) i= yi, i= 0,1, ..., n. In general, when there are fewer interpolation nodes, the interpolation interval [min {xi}, max{xi} is small, and the unknown point xi belongs to the inside of the interpolation interval, the predicted value is relatively accurate; when the unknown point xi belongs to the outside of the interpolation interval, it is difficult to ensure that a certain precision can be achieved. In order to avoid these problems, we can adopt the segmented interpolation method. According to the above method and matlab programming to achieve the population prediction. 6. Total Population Forecast 6.1. Fitting curve 89 Figure 1. The simulation was carried out using the fitting method 6.2. Interpolation curve Figure 2. The method of interpolation is used to simulate. Figure 3. Fit the model data graph Figure 4. Use interpolation model data graph 7. The Birth Rate Prediction (Y Is the Birth Rate) 7.1. Cubic spline interpolation model Figure 5. The birth rate is simulated by cubic spline interpolation 7.2. Least square fitting model Figure 6. The least square method is used to simulate the birth rate 8. Population mortality prediction 8.1. Cubic spline interpolation model ( Y is the death rate) Figure 7. The population mortality rate was simulated using cubic spline interpolation 90 8.2. Least square fitting model Figure 8. The least square method was used to simulate the population mortality rate 9. Conclusion The prediction of the fitting model is more in line with the trend of population development. For the data predicted by the interpolation method, the prediction is more accurate in a short period of time, but when the prediction time is longer, there will be a large deviation. To sum up, both for population prediction model has reached the useful effect, the trend of the simulated roughly the same comprehensive above images and related data, can be concluded that the future population growth trends of hunan province, the population increase will give a variety of effects of hunan province. Positive impact: population growth means that more research foundation, to promote scientific and technological breakthroughs and innovation of science and technology. Population growth will expand the market of hunan province, to speed up the economic construction of hunan province, to promote rapid economic development. Population increase at the same time will bring in hunan province of resources will be more, to improve the level of education and scientific research quality. Negative effects: the population means that in hunan life will have greater competitive pressure both academic and employment. Population increase can cause further deterioration in hunan province environment, air pollution, water pollution and so on. Population increase will cause pressure to the resources and the public service in hunan province, such as transport, health care, housing, etc. References [1] Fu, Y. (2010) Applied research based on the matlab curve fitting. Computer Method, 56-58. [2] Yi, L. (2008) Population prediction method based on matlab analysis. Population Forecast, 66-71 [3] Chen, X., Xiao, L. (2020) The improvement of logistic model with Chinese population forecast. Population Forecast, 239- 243. [4] Allen, L.J., Allen, E.J. (2003) A comparison of three different stochastic population models with regard to persistence time. Theor Popul Biol, 64(4):439-49. [5] Wang, Z., Dang, Y., Wang, Y. (2007) A new grey Verhulst model and its application. IEEE International Conference on Grey Systems and Intelligent Services, 571-574 [6] Leslie. (1945) Scenario Analysis in Population Projection. International Institute for Applied Systems Analysis, 08:543- 545.