# Mathematical Modeling and Simulation of Logistic Growth
## 4 Results and Discussion
### Comparison with the Gillespie Algorithm  
An overall view of population growth according to the theoretical continuous model (\(CM\)) superimposed with the weighted iteration mean \(\mu(N_{i})\) values of 1000 Gillespie simulation runs is given in Figure 7a. The number of Gillespie iterations required to match the tail behavior of \(CM\), stopping at 501 iterations as in our simulation, was around 200,000: as explained in Section 3.2, with [PERSON]'s being an event-driven approach, its iterations actually represent the number of events that ensures that the stopping time mean across all the performed simulations is approximately 501, aligning with the \(CM\) and proposed simulation unit timesteps, while also allowing an easier graphical assessment. The distribution of raw residuals, shown in Figure 7b, is computed by subtracting the \(CM\) value of \(N_{i}\) at the current time \(t\) from the corresponding Gillespie \(\mu(N_{i})\) value (95% CIs are not available for Gillespie iteration means due to the time and computational costs of the bootstrap method applied to the required number of iterations). The maximum raw residual of Gillespie is around \(-27\) (Figure 7a), a value lower than that in our simulation against the underlying discrete model and in the theoretical continuous model against its discrete version. This may be explained by Gillespie correctly accounting for the inherent fluctuations and correlations that are necessarily ignored in the deterministic formulation. In addition, this algorithm never approximates infinitesimal time increments \(dt\) by finite timesteps \(\Delta t\), in harmony with population levels that change suddenly and sharply with time [6]. However, the similar V shape in the short-term residuals (Figure 7b) confirms the presence of an unavoidable bias, probably depending on the intrinsic symmetry of the sigmoid. To further investigate this discrepancy in the residuals, we divided logistic growth into the three time windows of short-term or head \([t_{0},2t^{*}]\), long-term or head + tail \([t_{0},t_{max}]\), and only steady-state or tail \([2t^{*},t_{max}]\), respectively, given how the iteration means and variances of the proposed simulation behaved in the first and second windows (cf. Figure 4 of Section 4.1). The distribution of the raw residuals was observed for Gillespie through the histogram plots of Figure 7c-e. Figure 8a-c refer to our simulation. The same rationale was applied to the normal probability plots: Figure 7f-h are relative to Gillespie and Figure 8d-f match the proposed simulation. Regarding our simulation of the discrete master equation, the short-term histogram (Figure 8a) shows greater multi modality than the long-term histogram (Figure 8b), reflecting the deletion of tail \(\mu(N_{i})\) values. The long-term histogram (Figure 8b) is indeed extremely left-skewed, and the smaller bars match the sigmoid growth outliers. The corresponding Figure 8d,e normal probability plots resemble a symmetric distribution of residuals, as the V shape of Figure 5b and the significant horizontal deviation from the reference line of Figure 8e are in agreement with the long histogram tail. The short-term and long-term residuals of our simulation do not exhibit a normal distribution. Only the last window (Figure 8c,f) seems to have a close-to-normal distribution. Figure 7: **Gillespie simulation.