The general exponential function equation, such as in the exponential growth of a population, is given by the equation \(N_{t}=N_{0}*e^{kt}\). The parameter \(N_{t}\) denotes some future population quantity after some time \({t}\). The variable \(N_{0}\) represents the initial population at \({t}=0\), and the constant \({k}\) value denotes the rate of increase of the particular population.
The constant \({k}\) and the intercept of the exponential curve can be determined using the nonlinear least squares method. The initial population, \(N_{0}\), was 3.929 million and the formula for NLS was expressed as:
pop ~ alpha * exp(1)^(k * years)
The variable, \(pop\), represents the population, \(N_{years}\), after each incremental time, \(years\), in decades. The parameter \(alpha\) is equivalent to \(N_{0}\), or the intercept of the exponential function curve.
years <- c(0,10,20,30,40,50,60)
pop <- c(3.929,5.308,7.240,9.638,12.866,17.069,23.192)
alpha <- 3.929
k <- 0.0295904
f <- function(years){alpha*exp(1)^(k*years)}
plot(f,0,60)
popdata <- data.frame(cbind(years,pop))
plot(years,pop,main = "Exponential Growth Curve of Human Population from Years 1790-1850", xlab = "Years", ylab = "Population (millions)")
model2 <- nls(formula = pop ~ alpha*exp(1)^(k*years),
data = popdata,
start = list(alpha = 3.929, k = 0.0295904),
trace = T)
## 0.06304241 (5.55e-01): par = (3.929 0.0295904)
## 0.04819313 (9.30e-03): par = (3.974182 0.02934206)
## 0.04818896 (1.93e-07): par = (3.974406 0.02934212)
summary(model2)
##
## Formula: pop ~ alpha * exp(1)^(k * years)
##
## Parameters:
## Estimate Std. Error t value Pr(>|t|)
## alpha 3.9744064 0.0407277 97.58 2.14e-09 ***
## k 0.0293421 0.0002023 145.02 2.96e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09817 on 5 degrees of freedom
##
## Number of iterations to convergence: 2
## Achieved convergence tolerance: 1.929e-07
lines(years,predict(model2), col = "red")
The intercept, or alpha, of the exponential function curve was evaluated at 3.974, with a standard error of ±0.041. The constant \({k}\) value was quantified at 0.0293.