Background

The aim of this final project is to estimate the growth constant for the U.S. population between 1790 and 1850. To do so, a non-linear least squares regression was applied using the nls2 package to fit an exponential growth model.To simplify the analysis, the year 1790 was set as time zero. Population data from 1790 to 1850 were analyzed, showing a clear exponential growth pattern with rapid increases over time.

Exponential Curve

# Years represented as time since 1790 (1790 = 0) (to simplify exponential calculations and avoid large numbers)
year <- c(0, 10, 20, 30, 40, 50, 60)

# Population is represented as millions
pop <- c(3.929, 5.308, 7.240, 9.638, 12.866, 17.069, 23.192)

# Plot of data with appropriate labels
plot(year, pop, xlab = "Years since 1790", ylab = "Population in millions", 
     main = "US Population Growth (1790-1850)", pch = 19)

library(nls2)
## Loading required package: proto

The curve closely fit the plotted data points on the exponential plot. By applying a non-linear model to the data, the growth constant (k) was determined.

# Exponential growth model: population = pop_ini * exp(k * year)
# Exponential Curve Fit: These parameters enable predictions of population trends during the analyzed time frame (1790–1850).
# Intercept and k values through nls2 (non-linear regression with brute force)
exp_model <- nls2(pop ~ pop_ini * exp(k * year), 
                  start = list(pop_ini = 3.9744064, k = 0.0293421))

#Summary Model
summary(exp_model)
## 
## Formula: pop ~ pop_ini * exp(k * year)
## 
## Parameters:
##          Estimate Std. Error t value Pr(>|t|)    
## pop_ini 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: 1 
## Achieved convergence tolerance: 7.207e-08
#Prediction of Population Values
pred_pop <- predict(exp_model, newdata = data.frame(year = year))

# Plot of fitted exponential curve
plot(year, pop, xlab = "Year (1790-1850)", ylab = "Population in millions", 
     main = "US Population Growth from 1790 to 1850", pch = 16)
lines(year, pred_pop, col = "royalblue", lwd = 2)

# The intercept represents the estimated population in 1790, forming the baseline for the model.
# The growth rate dictates the rate of population increase, critical for projecting future trends.
text(43, 20, paste("pop_ini =", round(coef(exp_model)["pop_ini"], 5)), col = "darkgreen")
text(43, 18, paste("k =", round(coef(exp_model)["k"], 5)), col = "darkgreen")

# Both model parameters define the behavior of the exponential curve, ensuring the model accurately fits the historical population data.
# This exponential model provides insights into the rapid population growth in the US during this period. The curve captures the trend effectively, highlighting exponential dynamics in population increases from 1790 to 1850.

Project Summary

By fitting the U.S. population growth data from 1790 to 1850 to a non-linear exponential model, the growth constant (k) was estimated to be 0.0293421. The curve demonstrated an excellent fit to the data points, supporting the accuracy of the k value. Additionally, the estimated parameter for \(A_i\), representing the initial population size at year 0, was calculated as 3.9744064. This value is very close to the actual 1790 population of 3.929, further confirming the model as a strong fit for the data.