For a population distribution, $P(t),$ which is limited by some threshold value, $L,$ the functional form is often assumed to be of logistic type,
$$P\left(t\right)=\frac{L}{1+c\,e^{\,Kt}}$$Assuming the following data has been collected,
$$ \begin{array}{|c|ccccc|} \hline t & 0 & 1 & 2 & 3 & 4\\ \hline P & 200 & 400 & 650 & 850 & 950 \\ \hline \end{array}$$and taking $L=1000,$ compute, the values of $c$ and $K$ according to the least squares criterion.
A slightly more complex function than the exponential one for modeling populations and epidemics is the logistic function. In the case of a population, it describes the dynamics of a population in a resource-limited environment. In the case of an epidemiological model, it assumes that there is a maximum number of individuals $ L $ that can be infected. The differential equation that describes it is similar to the exponential but a factor appears that highlights this limitation
In the early stages of the epidemic, when there are few infected individuals
the curve behaves like an exponential. When the proportion of infected grows enough, the process slows down because there are many individuals who are no longer susceptible to infection because they have already been infected and the curve behaves like a straight line. In the last stages, the number of infected no longer grows.
Let us linearize the function to approximate
$$ P=\frac{L}{1+c\,e^{\,Kt}} \quad \Longrightarrow \quad \frac{1}{P}=\frac{1+c\,e^{\,Kt}}{L} \quad \Longrightarrow \quad \frac{L}{P}=1+c\,e^{\,Kt} \quad \Longrightarrow $$.
$$ \Longrightarrow \quad \frac{L}{P}-1=c\,e^{\,Kt} \quad \Longrightarrow \quad \ln\left(\frac{L}{P}-1\right)=\ln\left(c\,e^{\,Kt}\right) \quad \Longrightarrow $$.
$$ \Longrightarrow \quad \ln \frac{L-P}{P}=\ln c + \ln e^{\,Kt} \quad \Longrightarrow \quad \ln \frac{L-P}{P}=\ln c + K\,t \ln e \quad \Longrightarrow $$.
$$ \ln \frac{L-P}{P}=\ln c + K\,t $$If we call
$$ y_k = \ln \frac{L-P_k}{P_k}, \quad x_k =t_k, \quad a_0 =\ln c, \quad a_1=k $$we have
$$ \ln \frac{L-P_k}{P_k}\approx\ln c + K\,t_k \quad \Longrightarrow \quad y_k \approx a_0 + a_1\, x_k $$The problem is now to fit a least squares regression line
$$ P_1(x) = a_0 + a_1\, x $$to the transformed data $(x_k,y_k),\quad k = 1,\ldots,5$ with the system
We compute the elements of these matrices
and
$$ \begin{array}{ccccc} 5a_{0} & + & 10 a_{1} & = & -3.506\\ 10 a_{0} & + & 30 a_{1} & = & -17.81 \end{array} $$And the solution is $a_0 = 1.459 \quad a_1=-1.080$. As
The approximate curve is
$$ P\left(t\right)=\frac{1000}{1+4.3\,e^{-1.08t}} $$