This report analyzes the exponential growth of the US population from 1790 to 1850 using programming and statistical modeling techniques. Population data was modeled with an exponential growth equation, and the parameters (initial population and growth rate) were determined using non-linear least squares (NLS2). The fit was evaluated, and the data was visualized with both the raw data points and the fitted curve. This approach highlights the utility of exponential modeling in population studies.
Population growth often follows exponential patterns, especially in the absence of resource limitations or other external factors. The US population data from 1790 to 1850 is ideal for studying such growth patterns, as it represents a period of expansion and relatively consistent growth rates.
In this analysis, we model population growth using the exponential function:
\(P(t) = P_0 \cdot e^{kt}\)
Where: - \(P(t)\) is the population at time \(t\). - \(P_0\) is the initial population. - \(k\) is the growth rate. - \(t\) is the time since the start of the observation period.
The primary goals of this analysis are: 1. To determine the parameters \(P_0\) and \(k\) using NLS2. 2. To visualize the data and the fitted model. 3. To evaluate the model’s effectiveness in describing the data.
The population data is provided for years 1790 to 1850, with 1790 set as the baseline year (year 0).
# Load data
year <- c(0, 10, 20, 30, 40, 50, 60)
pop <- c(3.929, 5.308, 7.240, 9.638, 12.866, 17.069, 23.192)
# Create a data frame
data <- data.frame(year = year, pop = pop)
# Display data
print(data)
## year pop
## 1 0 3.929
## 2 10 5.308
## 3 20 7.240
## 4 30 9.638
## 5 40 12.866
## 6 50 17.069
## 7 60 23.192
The raw population data is visualized to observe trends over time.
# Plot data
plot(data$year, data$pop, main = "US Population Growth (1790-1850)",
xlab = "Year since 1790", ylab = "Population (millions)",
pch = 16, col = "blue")
We use the NLS2 function to estimate the parameters \(P_0\) and \(k\) by fitting the exponential growth equation to the data.
library(nls2)
## Loading required package: proto
# Fit model
model <- nls2(pop ~ pop_ini * exp(k * year), data = data,
start = expand.grid(pop_ini = seq(3, 5, length.out = 10),
k = seq(0.02, 0.04, length.out = 10)),
algorithm = "brute-force")
# Extract coefficients
coef_vals <- coef(model)
pop_ini <- coef_vals["pop_ini"]
k <- coef_vals["k"]
# Display results
cat("### Model Parameters\n")
## ### Model Parameters
cat("- Initial Population (P0):", round(pop_ini, 3), "million\n")
## - Initial Population (P0): 4.111 million
cat("- Growth Rate (k):", round(k, 5), "per year\n")
## - Growth Rate (k): 0.02889 per year
The fitted curve is plotted alongside the raw data points for visual comparison.
# Generate predicted values
predicted_pop <- pop_ini * exp(k * year)
# Plot raw data and fitted curve
plot(data$year, data$pop, main = "Exponential Growth Fit",
xlab = "Year since 1790", ylab = "Population (millions)",
pch = 16, col = "blue")
lines(data$year, predicted_pop, col = "red", lwd = 2)
legend("topleft", legend = c("Data", "Fitted Curve"),
col = c("blue", "red"), pch = c(16, NA), lty = c(NA, 1))
The results demonstrate that the exponential model effectively describes the US population growth from 1790 to 1850, with an initial population of approximately 4.111 million and a growth rate of 0.02889 per year. While the fit captures the general trend, future analyses could explore more complex models to account for deviations from exponential growth in later years.
This study highlights the strengths and limitations of exponential modeling in historical population studies. Further investigation with additional data points or alternative models could provide deeper insights into population dynamics.