Exogeneity
Exogeneity is the assumption that an explanatory variable is uncorrelated with a model's error term, the part of the outcome the model leaves unexplained. It has to hold before a regression coefficient can be read as the effect of that variable.
By Joris van Huët, Founder & CEOUpdated 5 min read
What is Exogeneity?
In a regression, the outcome (say, weekly revenue) is explained by the variables you include plus an error term. The error term collects everything else that moves the outcome, including causes you left out. A variable is exogenous when it is uncorrelated with that error term and endogenous when it is not. If the variable you care about is endogenous, its effect is not identified: the coefficient mixes the variable's own effect with the effect of whatever it is correlated with.
Common sources of endogeneity are an omitted variable that moves both the variable and the outcome, measurement error in the variable, and simultaneity, where the two affect each other. Instrumental variables are a standard remedy: an instrument is correlated with the endogenous variable but not with the error term, so it carries its own exogeneity claim.
The word has two senses. In econometrics it means uncorrelated with the error term. In causal modeling, an exogenous variable is one whose value is determined outside the system, as the Stanford Encyclopedia of Philosophy puts it. Wikipedia calls the econometric meaning related but distinct. Randomizing a variable makes it exogenous: nothing else in the system sets it.
Exogeneity is a claim about the error term, which is not observed. The residuals a fitted regression returns are not the error term, and for ordinary least squares they are orthogonal to the included regressors, so they cannot reveal a violation. The assumption is argued from how the data came about.
For illustration, suppose a store sells 400 euros a week with 100 euros of ad spend, then doubles spend to 200 euros in two November weeks when it sells 1,000 euros a week. If the store regresses sales on spend, the slope is (1,000 - 400) / (200 - 100) = 6 euros of sales per euro of spend. Suppose the season alone would have added 300 euros: only (1,000 - 400 - 300) / (200 - 100) = 3 comes from the ads, because the season sits in the error term and moves with spend.
Why Exogeneity matters for ecommerce
A budget decision rests on a claim about cause: more spend here, this much more revenue. A regression of Shopify revenue on ad spend supports that claim only if spend is exogenous. When budgets follow the calendar, promotions or last week's sales, the same things that move revenue sit in the error term and move with spend, so the coefficient reports an association, and a budget moved on it can go the wrong way with nothing on the screen to say so. A 2019 Marketing Science paper found that observational methods often failed to reproduce randomized ad experiments, even after conditioning on extensive demographic and behavioral variables.
How to use Exogeneity
- Write the model in one line: the outcome (weekly Shopify revenue), the variable you care about (weekly spend on one channel) and the controls you can observe (promotions, price changes, email sends).
- List what else moves revenue and is not in the model, such as seasonality or a stock-out, and ask of each whether it also moves your spend. Each yes is an omitted variable correlated with the error term. Add it as a control if you can observe it.
- Ask whether revenue moves spend, as when budgets are raised after strong weeks. That is simultaneity: the two variables affect each other.
- Look for changes in spend that were not set in response to demand, such as a randomized split of regions or audiences.
- Check the result. Pass: you can name the process that set spend and it has nothing to do with expected demand. Fail: spend follows the calendar, promotions or last week's sales. Then report the coefficient as an association, not as the effect of spend.
Formula
Y = b0 + b1 X + e Cov(X, e) = 0 Where: - Y: the outcome, such as weekly revenue - X: the variable whose effect you want, such as weekly ad spend - b0, b1: the intercept and the slope on X - e: the error term, everything else that moves Y
When Cov(X, e) is zero, b1 is not mixed up with causes of Y that sit in e. When it is not zero, b1 blends the effect of X with the effect of whatever X is correlated with.
Common mistakes
- Treating a residual plot or a good fit as a test of exogeneity. Least squares residuals are orthogonal to the included regressors, so the check cannot fail.
- Mixing up the two meanings of the word. A budget set by finance, outside your spreadsheet, is determined outside the model but is still correlated with the error term if it follows the sales calendar.
- Adding controls and assuming the problem is gone. Controls help only with causes you can observe; in the 2019 comparison, observational methods often failed to match experiments even with extensive controls.
- Choosing an instrument because it sounds unrelated to sales. It must itself be exogenous, and the exclusion restriction cannot be tested directly without extra assumptions, so the claim has to be argued.
- Ignoring feedback in weekly data. If this week's sales change next week's budget, the budget is not strictly exogenous and least squares estimates are biased in finite samples.
Frequently asked questions
What does exogeneity mean in simple terms?
A variable is exogenous when nothing that also moves the outcome is tangled up with it. Formally, it is uncorrelated with the error term, the part of the outcome the model does not explain. If it is correlated, its effect is not identified.What is the difference between exogenous and endogenous variables?
In regression, an endogenous variable is correlated with the error term and an exogenous one is not. In modeling language, endogenous means determined inside the model and exogenous means determined outside it. Wikipedia calls the two meanings related but distinct.Can you test for exogeneity?
Not from the regression's own residuals, because least squares makes them orthogonal to the included regressors. The assumption is argued from how the data came about, for example from randomization. Even with an instrument, one textbook notes the exclusion restriction cannot be tested directly without extra assumptions.Is ad spend exogenous?
Not when it follows demand. If budgets rise ahead of seasonal peaks or react to sales, spend moves with factors in the error term. Field experiments at one online marketplace reported that, because search clicks and purchase intent are correlated, paid search returns were a fraction of non-experimental estimates.
Further reading
- The Effect, Chapter 13: Regression (the exogeneity assumption) · Nick Huntington-Klein
- Causal Inference: The Remix, Instrumental Variables · Scott Cunningham
- Causal Models · Stanford Encyclopedia of Philosophy
- A Comparison of Approaches to Advertising Measurement: Evidence from Big Field Experiments at Facebook · Marketing Science (via IDEAS/RePEc)
- Endogeneity (econometrics) · Wikipedia