This code simulates the global human population from Year 2019 to the saturated year with the Discrete-time Markov Chain (after imposing the maximum number of population), and compares the results calculated with T-Function in Ref[1]. Data from Ref[2] is also shown for comparison reasons.
References:
[1] Rein Taagepera,"A world population growth model: Interaction with Earth's carrying capability and technology in limited space", Technological Forecasting & Social Change 82 (2014) 34-41.
[2] https://www.kaggle.com/theworldbank/global-population-estimates