# Mathematical Modeling and Simulation of Logistic Growth
## 1 Introduction  
As defined in [1], _population ecology_ studies the relationships between a group of individual organisms of the same species and their environment, i.e., a particular area, taking into consideration biotic (living) and abiotic (non-living) components of the ecosystem. In general, a population can be measured in terms of its _size_, or the total number of individuals. In particular, the _density_, or the number of individuals per unit volume or unit area, plays a key role when competition for resources, such as food, water, sunlight and living space, affects population growth [1].  
In this paper, we consider the discrete-time event simulation of _density-dependent_ population growth, limited by a specific habitat _carrying capacity_, which is outlined in [1] as the maximum sustainable population that preserves the environment's living conditions, without causing its degradation. Motivated by recent papers about the applicability of the logistic growth model to evaluate the mutation proportion in epidemics [2] and study the COVID-19 pandemic along with other infectious diseases [3, 4], we were interested in the model's development and constraints and how they could be translated into tunable parameters in a simulated system, so far populated by synthetic replicable creatures, potentially representing an organism or pathogen.  
Logistic growth is indeed an essential analytical model for ecologists and demographers that can be extended to stock markets and forecasting [5]; online deterministic simulators ([[https://www.biointeractive.org](https://www.biointeractive.org)]([https://www.biointeractive.org](https://www.biointeractive.org)), accessed on 14 February 2025) are availableto explore logistic growth from a theoretical point of view, and stochastic simulations are presented in the context of biological evolution ([[https://www.youtube.com/@PrimerBlobs](https://www.youtube.com/@PrimerBlobs)]([https://www.youtube.com/@PrimerBlobs](https://www.youtube.com/@PrimerBlobs)), accessed on 14 February 2025). The Gillespie algorithm [6] has become the standard for the generation of time evolution trajectories of finite populations over continuous time [7], and it was employed as a reference to evaluate the performance of our simulation.  
Our aim is to present a reproducible pipeline of work, from the mathematical modeling of the logistic growth master equation to its translation into a stochastic simulation, along with its subsequent parameter tuning and output analysis. Specifically, we shed light on the discrepancies between continuous and discrete growth, and between deterministic and stochastic growth, which tend to be implicit and scattered across the available literature and experiments. We adopt an interdisciplinary approach, bridging mathematics, statistics, computer science and, tangentially, biology, combined with a step-by-step imprint, to help a potential researcher to overcome the complexity and pitfalls of logistic growth modeling.  
The specific contributions of our work are as follows:  
* The implementation of a straightforward simulation of the logistic growth model, characterized by parameters that explicitly match the underlying mathematical variables and parameter ranges; these variables can be easily modified by the user, taking into account repeatability purposes and limited computational resources via the customizable setting of the number of simulations and iterations within a single simulation scenario;
* The definition of a basic simulation framework that can be tailored to investigate real-world empirical systems, making use of the extensive and reproducible testing performed on a non-specific synthetic population across extreme living conditions;
* The assessment of the limits of the proposed system trough a detailed comparison with the state-of-the-art Gillespie algorithm in terms of statistical significance and residual analysis.