Generalize · Chapter 11 of 12
Likelihood, forecasting, and transportability
Objective: Connect likelihood, dependent-data forecasting, predictive coverage, and the assumptions needed to transfer an effect.
What changes when the next observation comes next month or from a different workplace?
Likelihood · GLM · Time series · Conformal · Transport
Before you begin: Conditional expectation (chapter 2), variance and estimation (chapter 4), potential outcomes (chapter 5), and the distinction between prediction and intervention (chapter 1).
About 35 minutes, plus the exercises.
Forecasting and generalization
A firm wants next month’s demand forecast, an employee’s probability of leaving, and the effect of exporting its training program to a new division. Each request concerns an unobserved outcome. The required arguments differ.
A forecast conditions on information available now. A probability model assigns a distribution to an outcome. Transferring a treatment effect asks whether a causal relationship learned in one population applies in another. A model can do the first two well while failing at the third.
Likelihood adds a distributional commitment
For a binary outcome , suppose independent observations satisfy
The logistic model belongs to the generalized linear model family. Its link maps a probability into log odds. Conditional on covariates, the log-likelihood is
Differentiating yields the score and Hessian . The Hessian is negative semidefinite. With appropriate rank and existence conditions, optimization identifies the maximum; complete separation can prevent a finite maximum from existing.
A coefficient shifts log odds, not probability by a constant amount. Starting at , doubling the odds changes odds from to , hence probability to . For a continuous covariate entering linearly, the probability derivative is . It depends on the covariates. A causal interpretation still requires a design; the link function provides none.
If the observations are dependent, multiplying their marginal conditional probabilities need not be the joint likelihood. Conditional-mean estimation may remain useful under justified quasi-likelihood and dependence-robust conditions, but the independence-based uncertainty calculation needs reconsideration.
An AR(1) forecast
Consider a synthetic output series following
where innovations are independent and independent of the past. Its stationary solution is , with variance . This infinite series explains why the stability restriction matters.
Iterating forward dates gives
The conditional mean forecast and forecast-error variance, with parameters known, are
Independence eliminates covariance terms in the variance sum. Gaussian innovations make the forecast error Gaussian, giving an approximately 95% predictive interval . Parameter-estimation uncertainty is absent from this known-parameter calculation.
At , , , and , next month’s forecast is 108 with interval . The two-month forecast is 106.4 and its error variance is . Further forecasts move toward 100 while predictive variance approaches the stationary variance of 25.
from math import sqrt
mu, last, phi, sigma = 100, 110, 0.8, 3
for h in (1, 2):
forecast = mu + phi**h * (last - mu)
sd = sigma * sqrt(sum(phi**(2*j) for j in range(h)))
print(h, forecast, tuple(round(v, 2) for v in
(forecast - 1.96*sd, forecast + 1.96*sd)))
These are intervals for future observations. An interval for the stationary mean concerns a different random quantity and a different estimator.
Temporal validation
Forecast evaluation should imitate deployment: train through a date, predict subsequent dates, advance the training window, and repeat. Never let future labels, later revisions, or full-sample normalization enter an earlier forecast. A downloaded time-series snapshot can contain revised historical values unavailable at the original forecast date.
Serial dependence also changes precision. For a stationary process with autocovariance , the sample-mean variance is
The usual expression drops all off-diagonal terms. Persistent positive correlations can make that omission severe. Structural breaks create a further problem: tomorrow’s conditional relationship may no longer resemble the historical one, even with a careful time split.
Coverage without a full outcome model
Split conformal prediction uses a fitted predictor and an independent calibration sample. Let calibration scores be , with scores. Set and let be the th smallest score, using if . Predict with .
If calibration and test observations are exchangeable conditional on the training data, the test score’s rank gives marginal coverage at least . Ties can make coverage conservative. The guarantee averages over the new covariates; it does not promise coverage at every or a causal confidence interval.
Ordinary chronological dependence or distribution shift can break exchangeability. Applying the formula to a time series does not restore its guarantee. Angelopoulos and Bates explain the basic result and its scope.
Generalizing trial results
Let denote trial participation and the target population, and let be the treatment assigned in the trial. Within the trial, randomization and consistency give , where is an observable regression. To identify target potential-outcome means through
we additionally need conditional mean exchangeability across participation, , and trial support throughout the target covariate distribution. Consistency, trial treatment positivity, and the trial’s treatment-identification conditions still apply. Dahabreh and coauthors develop a formal generalization framework.
Different division cultures may alter training effects even after measured adjustment. Spatial spillovers can also change the intervention itself. Reweighting addresses observed population composition under assumptions; it cannot manufacture missing support or policy invariance.
Exercises
1. With , what happens to the known-parameter forecast and variance at every positive horizon?
Work through the solution
The forecast is and the error variance is . The latest deviation contains no predictive information. The horizon sum contains only its term, equal to one.
2. Twenty percent of the target employees have job roles absent from the trial. Can weighting the trial alone identify their treatment effects?
Work through the solution
No. Trial-participation positivity fails for those roles. A target-wide effect requires new evidence or explicit extrapolation restrictions. An effect for the supported target subpopulation is a different, potentially defensible target.
Further reading
Hansen’s Econometrics supplies likelihood and dependent-data foundations. Keep the conformal and transport references beside their assumptions: a portable algorithm does not imply a portable guarantee.
Time-Series Econometrics carries dependent data through fifteen lectures, from persistence and ARMA models to forecasting, state-space filtering, cointegration, and volatility.
Write the claim and the assumption doing the most work. Saved only in this browser on this device; avoid sensitive information. Private browsing or clearing site data can erase it.
Notes are optional.
“Explored” records your choice, not a score or a claim of mastery.