# Mathematical Modeling and Simulation of Logistic Growth
## 4 Results and Discussion
### Comparison with the Gillespie Algorithm
** (**a**) Overview of the _CM_ fitting of the experimental Gillespie \(\mu(N_{i})\) values; (**b**) difference in population (\(\Delta N\)) between Gillespie \(\mu(N_{i})\) values and _CM_ per time unit; (**c**) _CM_ histogram plot of the _head_ (short-term) raw residuals, time range: \([t_{0},2t^{*}(\sim\)184)]; (**d**) _CM_ histogram plot of the _head_+_tail_ (long-term) raw residuals, time range: \([t_{0},t_{max}(\sim\)501)]; (**e**) _CM_ histogram plot of the _tail_ (steady-state only) raw residuals, time range: \([2t^{*},t_{max}]\); (**f**) _CM_ normal probability plot of the _head_, _NRSME_ indicator: 0.01; (**g**) _CM_ normal probability plot of the _head_+_tail_, _NRSME_ indicator: 0.009; (**h**) _CM_ normal probability plot of the _tail_, _NRSME_ indicator: 0.38. Regarding the Gillespie \(\mu(N_{i})\) raw residuals, noting that the number of points under scrutiny is much greater than in our simulation, their distribution in Figure 7e,h is consistent with normality. Moreover, the long-term histogram's shape (Figure 7d), aside from the bottom-left tail clearly visible from the normal probability plot, tends toward normality. Instead, the short-term histogram (Figure 7c) is bimodal, probably in concordance with the acceleration/deceleration phases of logistic growth (a mixture of Gaussians could explain the bimodality of the frequency distribution). Not plotting the distribution of residuals and rather relying only on the NRMSE indicator would have been misleading, as the NRMSE compares the iteration means with the background continuous model population values. Indeed, a low NRMSE does not exclude the possibility that a model is biased [22]. We find that the continuous-time approach of the Gillespie algorithm yields more statistically significant \(\mu(N_{i})\) values, but does not adjust for the inherent bias of the logistic growth continuous model: being time-series data, the error terms are correlated in the sigmoid phase of growth. Two main limitations of the proposed simulation emerged from the comparison with the Gillespie implementation. The first one is synchronous updating: by checking whether or not the event of reproduction or death happens in each timestep \(t\) of length \(\Delta t\), we simultaneously increase or decrease the \(N_{i}\) counter and save the changes that take place at the end of the current iteration \(i\), making the two events mutually inclusive [23] (see Section 3.1). For example, \(u\) creatures are born and \(v\) die at timestep \(t\); if \(u\)>\(v\), then the counter is updated by adding \(u-v\); otherwise, if \(u<v\), then \(v-u\) is subtracted from \(N_{i}\). If \(u=v\), the update is zeroed by the subtraction and addition of the same amount of creatures. As a consequence, during rejection sampling, for each creature, the drawn probabilities for the reproduction rate \(R\) and death rate adjusted for crowding, \(D+cN\), against their threshold probabilities do not take into account the other creatures that were born or died in the meantime, including the possible reproduction of the creature under current testing. In this way, a bias is introduced, which [PERSON] resolves by adopting an event-driven design choice, making the two events mutually exclusive, as previously described  
Figure 8: **Discrete master equation simulation. ** (**a**) \(CM\) histogram plot of the _head_ (short-term) raw residuals, time range: \([t_{0},2t^{*}(184)]\); (**b**) \(CM\) histogram plot of the _head+tail_ (long-term) raw residuals, time range: \([t_{0},t_{max}(501)]\); (**c**) \(CM\) histogram plot of the _tail_ (steady-state only) raw residuals, time range: \([2t^{*},t_{max}]\); (**d**) \(CM\) normal probability plot of the _head_, _NRSME_ indicator: 0.04; (**e**) \(CM\) normal probability plot of the _head+tail_, _NRSME_ indicator: 0.03; (**f**) \(CM\) normal probability plot of the _tail_, _NRSME_ indicator: 0.39.  
in Section 3.2.