Compartment Models

36-467/667, Fall 2020

12 November 2020 (Lecture 21)


Compartment Models

Basic Definitions and Assumptions

Consequences of the Assumptions

Large-Population (\(n\)) Asymptotics

Epidemic Models

Sociological Application: Modeling the Spread of Novelties

Comments on the Assumptions

\(\Rightarrow\) Whether the assumptions are good matches to reality is something you need to investigate case by case, not presume!

Comment: Analogy to Epidemic Models; What to Call This

Consequences of the Model Assumptions

\[\begin{eqnarray} Y_{NA}(t+1) & \sim & \mathrm{Binom}(X_N(t), \alpha X_A(t))\\ X_A(t+1) & = & X_A(t) + Y_{NA}(t+1)\\ X_N(t+1) & = & X_N(t) - Y_{NA}(t+1)\\ \mathbb{E}\left[ X_A(t+1)|X_A(t) \right] - X_A(t) & = & X_N(t)\alpha X_A(t)\\ & = & \alpha X_A(t)(n-X_A(t)) \end{eqnarray}\]

Consequences of the assumptions

alpha <- 1e-6
n <- 1e5
xa <- vector(length=200)
xa[1] <- 1
for (t in 2:length(xa)) {
    xa[t] <- xa[t-1] + alpha*xa[t-1]*(n-xa[t-1])
plot(1:length(xa), xa, xlab="t", ylab=expression(X[A](t)), type="l")

Consequences of the assumptions

sim.diffusion <- function(n, alpha, xa.1=1, T) {
    xa <- vector(length=T)
    xa[1] <- xa.1
    for (t in 2:length(xa)) {
        xa[t] <- xa[t-1] + rbinom(n=1, size=n-xa[t-1], prob=alpha*xa[t-1])

“Conversion to Islam in the Medieval Period”

“Conversion to Islam in the Medieval Period”

“Conversion to Islam in the Medieval Period”

  1. Regress the increments \(X_A(t+1) - X_A(t)\) on \(X_A(t)(n-X_A(t))\)
  2. Fit the curve \(X_A(t)\) to the deterministic curve implied by the model
  3. Use maximum likelihood

“Conversion to Islam in the Medieval Period”



Ansary, Tamim. 2009. Destiny Disrupted: A History of the World Through Islamic Eyes. New York: Public Affairs.

Bacaër, Nicolas. 2011. A Short History of Mathematical Population Dynamics. London: Springer-Verlag.

Bulliet, Richard W. 1979. Conversion to Islam in the Medieval Period: An Essay in Quantitative History. Cambridge, Massachusetts: Harvard University Press.

———. 1994. Islam: The View from the Edge. New York: Columbia University Press.

Dawkins, Richard. 1993. “Viruses of the Mind.” In Dennett and His Critics: Demystifying Mind, edited by Bo Dahlbom. Oxford: Blackwell.

Hodgson, Marshall G. S. 1974. The Venture of Islam: Conscience and History in a World Civilization. Chicago: University of Chicago Press.

Rogers, Everett M. 2003. Diffusion of Innovations. Fifth. New York: Free Press.

Siegfried, André. n.d. Germs and Ideas: Routes of Epidemics and Ideologies. Edinburgh: Oliver; Boyd.

Sperber, Dan. 1996. Explaining Culture: A Naturalistic Approach. Oxford: Basil Blackwell.