Last time, we were able to estimate one parameter in the SIR model using one or two hand-chosen summaries.
The goal for today is to scare you — sometimes this doesn’t work, and you don’t know in advance whether it will or not.
A model in which parameters are in principle estimable is an “identifiable” model, and a model in which parameters are not in principle estimable is not.
First, how to think about named distributions (should have done this earlier)
Then, lab + debrief
We’ve been using named distributions (Bernoulli, exponential, binomial) without talking about how you should deal with those you haven’t seen before
We will talk about the mathematical definitions (PDFs and PMFs) later, when it is more directly necessary.
For now, the main things are just to know the following.
If \(Y\) is described as being a random variable drawn from some named distribution, you should understand:
\[ Y \sim N(\mu, \sigma^2) \]
Mathematical notation for the Normal usually displays the variance, \(\sigma^2\). Both R and NumPy, though, ask for the standard deviation \(\sigma\) directly, not the variance.
Passing a variance where the function expects a standard deviation can lead to incorrect estimates.
Sometimes a random variable you don’t yet understand turns out to be a deterministic function of other random variables you already do understand.
When that’s true, it’s often a good way to understand how the random variable works.
For the normal model, the simpler piece is a standard normal distribution: \[ Z \sim N(0,1), \qquad Y = \mu + \sigma Z. \]
If you understand a standard normal random variable, this allows you to understand what a generic normal distribution is: \(\mu\) shifts the standard normal draw; \(\sigma\) stretches it.
Location-scale is one instance of a pattern you’ll see many times.
For instance, the Binomial distribution is a sum of independent Bernoullis (random variables that take value either 0 or 1), and the Dirichlet distribution comes from drawing independent Gammas (random variables that take positive values) and scaling them so that they sum to 1.
\[ X_1,\ldots,X_n \overset{\text{iid}}{\sim} \operatorname{Bernoulli}(p), \qquad Y = \sum_{i=1}^n X_i \sim \operatorname{Binomial}(n,p). \]
\[ G_1,\ldots,G_K \overset{\text{ind}}{\sim} \operatorname{Gamma}(\alpha_k, 1), \qquad S = \sum_k G_k, \qquad \left(\frac{G_1}{S},\ldots,\frac{G_K}{S}\right) \sim \operatorname{Dirichlet}(\alpha_1,\ldots,\alpha_K). \]
Suppose our data model is \(Y_i \sim N(\mu, \sigma^2)\), and we are trying to estimate \(\mu\) and \(\sigma\) using SMM.
Per last time, we need to choose some summaries to use in our estimation procedure.
We will start off by using the mean and the median as our summaries.
Recall the setup from Lecture 4: choose a candidate \(\theta\), simulate from the model, and average the summaries of the simulated data:
\[ m(\theta) = \frac{1}{B} \sum_{b=1}^{B} s\big(Y_\theta^{(b)}\big), \qquad Y_\theta^{(1)},\ldots,Y_\theta^{(B)} \overset{\text{iid}}{\sim} \text{model at } \theta. \]
The general SMM objective is
\[ \hat\theta = \arg\min_\theta Q(\theta), \qquad Q(\theta) = g(\theta)^\top W\, g(\theta), \qquad g(\theta) = s(Y_{\text{obs}}) - m(\theta), \]
for some weighting matrix \(W\).
Today, \(\theta = (\mu,\sigma)\) and \(s(Y) = (\bar Y, \operatorname{median}(Y))\), and we’ll use \(W = I\) — a valid choice, though not an optimal one:
\[ Q(\mu,\sigma) = \big[s(Y_{\text{obs}}) - m(\mu,\sigma)\big]^\top \big[s(Y_{\text{obs}}) - m(\mu,\sigma)\big] \]
Open the lab notebook. You have an observed sample from a Normal distribution. Using \(s(Y) = (\bar Y, \operatorname{median}(Y))\):
Now replace the median with the empirical 60th percentile. Recompute the objective surface.
Keep your three surfaces (median, 60th, 75th percentile) — we’ll compare them directly in the debrief.
The three surfaces in the lab were simulated — \(B=100\) per grid point, grainy, no two runs identical. That leaves a fair question: is the ridge you saw a real property of the model, or an artifact of a small \(B\)?
For the Normal specifically (and only because it’s simple enough that we have the math to work it out), we know the exact population values your simulations were estimating: \(E_{\mu,\sigma}(\bar Y) = \mu\) and \(q_p(\mu,\sigma) = \mu + \sigma z_p\).
Therefore, we can show what the objective surfaces would have looked like without simulation noise.
\[ m(\theta) = E_\theta\{s(Y)\} \]
\(m(\theta)\) is the population version of the simulated average summary from Lecture 4 — what \(\overline{s(Y_\theta)}\) converges to as \(B\to\infty\).
The median panel was not identifiable in \(\sigma\). The 60th-percentile panel was weakly identifiable. The 75th-percentile panel was (comfortably) identifiable.
In the normal case, you probably had some intuition before we even did the lab that mean + median wasn’t going to work.
You also could have gone through the math that would have told you the same thing.
However, with more complicated models this won’t always be available, and so you have to just go by simulation.
Recall the SIR model is
\[ S \longrightarrow I \longrightarrow R \]
\[ \Delta I_t \mid S_t, I_t \sim \operatorname{Binomial}\!\Big(S_t, 1-(1-\beta/N)^{I_t}\Big), \qquad \Delta R_t \mid I_t \sim \operatorname{Binomial}(I_t, \gamma), \]
\[ S_{t+1} = S_t - \Delta I_t, \qquad I_{t+1} = I_t + \Delta I_t - \Delta R_t, \qquad R_{t+1} = R_t + \Delta R_t, \]
with \(\beta\) the transmission parameter, \(\gamma\) the recovery parameter, and \(R_0=\beta/\gamma\).
Last time, we assumed that we knew \(\gamma\) and tried to estimate \(\beta\) using final size and initial growth rate as summaries.
This time, we will try to use those summaries to estimate both parameters.
The first thing to do is to check whether the summary statistics change with the pairs of parameters.
The white contours (simulated final size) run almost parallel to the dashed red lines — lines of constant \(R_0=\beta/\gamma\).
Both are non-identifiability in the same formal sense (the map \(m\) is not one-to-one), but they are different failure geometries.
Final size’s contours run along lines of constant \(R_0\). Growth rate’s contours run along a visibly different direction. If that’s right:
We are reliability engineers, looking at how a particular part fails. Each manufactured unit can fail two ways — wear or corrosion — whichever happens first:
\[ T_{\text{wear}} \sim \operatorname{Exponential}(\theta), \qquad T_{\text{corrosion}} \sim \operatorname{Exponential}(\kappa\theta). \]
Corrosion is \(\kappa\) times as hazardous as wear. \(\theta\) is a shared “how harsh are the operating conditions” factor — temperature, load, usage intensity, whatever — that scales both hazards up or down equally.
Units are inspected only when they fail. Repeated across many units, you only ever find out which cause got there first — not how long the unit lasted.
\[ Y \sim \operatorname{Exponential}(\lambda) \]
In this setup, we only have one number coming out of our simulator, the wear-failure fraction, so the whole objective is built from that single summary.
Your job is: