Year – cohort reference year (1950, 1960, 1970, 1980, 1990)
cohort – birth cohort label
n_child – children ever born, with 12 representing the 12+ top-coded category
n_women – number of women in that cohort/count cell
1.2 Prepare the fertility data by generations
We focus on U.S. women aged 50-59, who are considered to have completed their fertility. The Census data include observations from 1960, 1970, 1980, and 1990. Women who were aged 50-59 in 1950 are observed as ages 60-69 in the 1960 Census. We therefore prepare fertility data for U.S. women aged 50-59 in 1950, 1960, 1970, 1980, and 1990, corresponding to the 1891-1900, 1901-1910, 1911-1920, 1921-1930, and 1931-1940 birth cohorts, respectively.
Here we establish statistical models for the fertility distribution and sibling distribution. The fertility distribution describes the number of children per family, while the sibling distribution describes the number of siblings per person.
2.1 Fertility distribution
We model the number of children per family using a Poisson distribution and a zero inflated negative binomial distribution (ZINB), respectively.
2.1.1 Poisson distribution
The Poisson distribution is a common model for count data, particularly when the mean and variance are equal. However, it may not be suitable for fertility data, which often exhibit zero-inflation and overdispersion (variance greater than the mean). The Poisson distribution with mean fertility (\(\mu\)) is defined as: for a count \(k \geq 0\), \[P(num_{child}=k)=e^{-\mu}\frac{\mu^k}{k!},\] denoted by \(Poisson(\mu)\). The mean and variance of \(Poisson(\mu)\) are both \(\mu\).
2.1.2 Zero inflated negative binomial distribution
The zero inflated negative binomial distribution with parameters mean fertility (\(\mu\)), dispersion/size (\(\theta\)), and zero‑inflation probability (\(\pi_0\))—denoted as \(ZINB(\mu, \theta, \pi_0)\)—is defined as: for a count \(k \geq 0\), \[P(num_{child}=k)=\begin{cases}
\pi_0 + (1-\pi_0)p^{\theta} & \text{if } k=0, \\
(1-\pi_0)\binom{k+\theta-1}{k}(1-p)^k p ^{\theta} & \text{if } k \geq 1,
\end{cases}\] where \(p = \frac{\theta}{\mu+\theta}\) represents the success probability of the negative binomial distribution.
According to the definition of the negative binomial distribution, the mean and variance of \(NB(\mu,\theta)\) are given by \(\mu\) and \(\mu + \frac{\mu^2}{\theta}\), respectively. Therefore, the mean and variance of \(ZINB(\mu, \theta, \pi_0)\) are defined by \(\mu(1-\pi_0)\) and \(\mu(1-\pi_0) + \frac{\mu^2(1-\pi_0)}{\theta}+\mu^2\pi_0(1-\pi_0)\), respectively.
2.2 Sibling distribution
The sibling distribution can be derived from the fertility distribution. For any count \(k \geq 0\), the probability that an individual has \(k\) siblings is proportional to the probability that their mother has \(k+1\) children, multiplied by the number of ways the individual could be one of those children. Therefore, the sibling distribution satisfies: \[P(num_{sib}=k) \propto (k+1)P(num_{child}=k+1).\]
2.2.1 Derivation of sibling distribution
If the fertility distribution is \(Poisson(\mu)\), then the sibling distribution is given by: for a count \(k \geq 0\), \[P(num_{sib}=k) \propto (k+1)e^{-\mu}\frac{\mu^{k+1}}{(k+1)!} = e^{-\mu}\frac{\mu^{k+1}}{k!}\propto e^{-\mu}\frac{\mu^k}{k!},\] which is also a Poisson distribution with mean \(\mu\).
If the fertility distribution is \(ZINB(\mu, \theta, \pi_0)\), then the sibling distribution is given by: for a count \(k \geq 0\), \[\begin{align*}
P(num_{sib}=k) & \propto (1-\pi_0)(k+1)\binom{k+\theta}{k+1}(1-p)^{k+1} p^{\theta} \\
& = (1-\pi_0)(k+1)\frac{(k+\theta)!}{(k+1)!(\theta-1)!}(1-p)^{k+1} p^{\theta} \\
& \propto \frac{\theta(1-p)}{p} \frac{(k+\theta)!}{k!\theta!}(1-p)^k p^{\theta+1} \\
& \propto \binom{k+\theta}{k}(1-p)^k p^{\theta+1}, \\
\end{align*}\] where \(p = \frac{\theta}{\mu+\theta}\). Therefore, the sibling distribution is a negative binomial distribution with parameters mean fertility (\(\frac{\mu(\theta+1)}{\theta}\)), dispersion/size (\(\theta+1\)), denoted as \(NB(\frac{\mu(\theta+1)}{\theta}, \theta+1)\). The variance is \(\frac{\mu(\theta+1)}{\theta} + \frac{\mu^2(\theta+1)}{\theta^2}\).
3 Model fitting
3.1 Fit the Poisson and ZINB models
Code
fit_fert <-function(dat) {## Poisson model pois <-glm(n_child ~1, family = poisson, data = dat)## Zero‑inflated negative binomial model zinb <-zeroinfl(n_child ~1|1, data = dat, dist ="negbin")tibble(Model =c("Poisson", "ZINB"),mu =c(exp(coef(pois)[1]), ## log‑link → exp() gives meanexp(zinb$coefficients$count[1])),size =c(Inf, ## dispersion θ; Inf = Poisson zinb$theta),pi0 =c(0, ## zero‑inflation prob.plogis(zinb$coefficients$zero[1])) )}param_fert <- fertility_data %>%group_by(Year) %>%group_modify(~fit_fert(.x)) %>%ungroup()# Write the fitted parameters so downstream notebooks read them instead of# hard-coding the values.write.csv(param_fert, file.path(output_path, "fertility_parameters.csv"), row.names =FALSE)
3.2 Estimated fertility parameters
Code
kable(param_fert, digits =3, caption ="Fertility‑model parameter estimates for women aged 50‑59 (1950, 1960, 1970, 1980, 1990)")
Fertility‑model parameter estimates for women aged 50‑59 (1950, 1960, 1970, 1980, 1990)
Year
Model
mu
size
pi0
1950
Poisson
2.818
Inf
0.000
1950
ZINB
2.943
2.372
0.043
1960
Poisson
2.429
Inf
0.000
1960
ZINB
2.458
2.088
0.012
1970
Poisson
2.377
Inf
0.000
1970
ZINB
2.547
3.578
0.067
1980
Poisson
2.855
Inf
0.000
1980
ZINB
3.036
6.947
0.060
1990
Poisson
3.047
Inf
0.000
1990
ZINB
3.224
19.792
0.055
3.3 Compare the mean and variance from the models and data
Mean and variance of fertility and sibling distributions from the fitted models and data.
distribution
Year
mean_data
mean_poisson
mean_zinb
variance_data
variance_poisson
variance_zinb
fertility
1950
2.818
2.818
2.818
6.689
2.818
6.668
fertility
1960
2.429
2.429
2.429
5.513
2.429
5.359
fertility
1970
2.377
2.377
2.377
4.675
2.377
4.473
fertility
1980
2.855
2.855
2.855
4.787
2.855
4.620
fertility
1990
3.047
3.047
3.047
4.160
3.047
4.083
sibling
1950
4.192
2.818
4.184
8.891
2.818
9.376
sibling
1960
3.699
2.429
3.635
8.515
2.429
7.915
sibling
1970
3.344
2.377
3.259
7.057
2.377
5.579
sibling
1980
3.532
2.855
3.473
6.346
2.855
4.991
sibling
1990
3.412
3.047
3.387
5.026
3.047
3.938
3.4 Model evaluation
Based on the table of mean and variance, we can see that the fertility data exhibits overdispersion (variance greater than mean). The Poisson Model assumes equal mean and variance, which does not fit the data well. The ZINB Model accounts for overdispersion and zero-inflation, providing a better fit to the data. The ZINB model’s mean and variance estimates for both fertility and sibling distributions align more closely with the observed data.
4 Simulations of fertility and sibling distributions
In this section, we simulate the fertility and sibling counts based on the Poisson and ZINB distributions, respectively. We then compare the empirical mean and variance of the simulated sibling data with the theoretical values derived from Section 2.
4.2 Compare sibling counts from simulations with theoretical values
We run simulations for fertility means of 1.5, 2.0, 2.5, 3.0, 3.5, and 4.0 for both Poisson and ZINB models. Additionally, in ZINB models, we set the dispersion parameter \(\theta\) to 4, and the zero-inflation probability \(\pi_0\) to 0.05.
We compare the empirical mean and variance of sibling counts from the simulated data with the theoretical values. The comparison shows that the theoretical values align closely with the simulated results, confirming the correctness of our derivation.
Code
means =c(1.5, 2.0, 2.5, 3.0, 3.5, 4.0)size =4pi0 =0.05cal_mean_var_simulated <-function(sim_data) { sib_counts <- sim_data$sib_counts mean_sib =mean(sib_counts) var_sib =var(sib_counts)tibble(Mean_Sibling = mean_sib,Variance_Sibling = var_sib )}# Poisson Modelsimulated_poisson <-lapply(means, function(mu) {simulate_fert_sib("Poisson", mu, Inf, 0)})simulated_poisson_results <-lapply(simulated_poisson, cal_mean_var_simulated) %>%bind_rows() %>%mutate(Fertility_Parameter =sapply(means, function(mu) paste0("Fertility Mean = ", mu)),Value_Type ="Simulated Poisson") %>% dplyr::select(Fertility_Parameter, Value_Type, everything())threo_possion_results <-tibble(Fertility_Parameter =sapply(means, function(mu) paste0("Fertility Mean = ", mu)),Value_Type ="Theoretical Poisson",Mean_Sibling = means,Variance_Sibling = means)poisson_results <-bind_rows(simulated_poisson_results, threo_possion_results) %>%arrange(Fertility_Parameter) %>%mutate(Value_Type =factor(Value_Type, levels =c("Theoretical Poisson", "Simulated Poisson")))kable(poisson_results, digits =3, caption ="Mean and Variance of Sibling counts from simulations and theoretical values based on Poisson distribution.")
Mean and Variance of Sibling counts from simulations and theoretical values based on Poisson distribution.
Fertility_Parameter
Value_Type
Mean_Sibling
Variance_Sibling
Fertility Mean = 1.5
Simulated Poisson
1.505
1.572
Fertility Mean = 1.5
Theoretical Poisson
1.500
1.500
Fertility Mean = 2
Simulated Poisson
1.991
1.998
Fertility Mean = 2
Theoretical Poisson
2.000
2.000
Fertility Mean = 2.5
Simulated Poisson
2.514
2.471
Fertility Mean = 2.5
Theoretical Poisson
2.500
2.500
Fertility Mean = 3
Simulated Poisson
2.989
2.976
Fertility Mean = 3
Theoretical Poisson
3.000
3.000
Fertility Mean = 3.5
Simulated Poisson
3.486
3.480
Fertility Mean = 3.5
Theoretical Poisson
3.500
3.500
Fertility Mean = 4
Simulated Poisson
3.982
3.906
Fertility Mean = 4
Theoretical Poisson
4.000
4.000
Code
# ZINB Modelsimulated_zinb <-lapply(means, function(mu) {simulate_fert_sib("ZINB", mu/(1-pi0), size, pi0)})simulated_zinb_results <-lapply(simulated_zinb, cal_mean_var_simulated) %>%bind_rows() %>%mutate(Fertility_Parameter =sapply(means, function(mu) paste0("Fertility Mean = ", mu)),Value_Type ="Simulated ZINB") %>% dplyr::select(Fertility_Parameter, Value_Type, everything())mean_var_zinb <-lapply(means, function(mu) cal_mean_var("ZINB", mu/(1-pi0), size, pi0)) %>%bind_rows()threo_zinb_results <-tibble(Fertility_Parameter =sapply(means, function(mu) paste0("Fertility Mean = ", mu)),Value_Type ="Theoretical ZINB",Mean_Sibling = mean_var_zinb$Mean_Sibling,Variance_Sibling = mean_var_zinb$Variance_Sibling)zinb_results <-bind_rows(simulated_zinb_results, threo_zinb_results) %>%arrange(Fertility_Parameter) %>%mutate(Value_Type =factor(Value_Type, levels =c("Theoretical ZINB", "Simulated ZINB")))kable(zinb_results, digits =3, caption ="Mean and Variance of Sibling counts from simulations and theoretical values based on ZINB distribution.")
Mean and Variance of Sibling counts from simulations and theoretical values based on ZINB distribution.
Fertility_Parameter
Value_Type
Mean_Sibling
Variance_Sibling
Fertility Mean = 1.5
Simulated ZINB
1.930
2.751
Fertility Mean = 1.5
Theoretical ZINB
1.974
2.753
Fertility Mean = 2
Simulated ZINB
2.590
3.773
Fertility Mean = 2
Theoretical ZINB
2.632
4.017
Fertility Mean = 2.5
Simulated ZINB
3.271
5.266
Fertility Mean = 2.5
Theoretical ZINB
3.289
5.454
Fertility Mean = 3
Simulated ZINB
3.915
6.461
Fertility Mean = 3
Theoretical ZINB
3.947
7.064
Fertility Mean = 3.5
Simulated ZINB
4.555
7.676
Fertility Mean = 3.5
Theoretical ZINB
4.605
8.847
Fertility Mean = 4
Simulated ZINB
5.031
8.304
Fertility Mean = 4
Theoretical ZINB
5.263
10.803
4.3 Visualize sibling distributions
We generate discrete probability distributions for sibling counts based on both Poisson and ZINB models, with the y-axis representing the number of siblings and the x-axis representing the probability of having that many siblings. The fertility mean is set to 2.5, and the ZINB model has a dispersion parameter of 4 and a zero-inflation probability of 0.05.