Frontdoor Criterion
The front-door criterion identifies the effect of a treatment on an outcome through a mediator, even when an unmeasured common cause of the two cannot be adjusted for. Its three conditions are strict and are often judged implausible in real data.
By Joris van Huët, Founder & CEOUpdated 7 min read
What is Frontdoor Criterion?
Adjustment closes a back door only through variables you can measure. The front-door criterion covers the case where an unmeasured common cause of the treatment and the outcome spoils the direct comparison, but a measured variable, the mediator, sits on the causal path between them: the treatment changes it, and it changes the outcome.
The method turns one unanswerable question into two answerable ones. The treatment's effect on the mediator can be identified when nothing unmeasured links the two. The mediator's effect on the outcome can be identified by holding the treatment fixed, which blocks the back-door path from the mediator to the outcome. Combining the two gives the treatment's effect on the outcome.
The criterion is Judea Pearl's, from 1995. Stated formally for a treatment and an outcome in a causal graph, a set of mediators satisfies it when three things hold: it intercepts every directed path from the treatment to the outcome, no open back-door path leads from the treatment to it, and the treatment blocks every back-door path from it to the outcome. In plain terms, the whole effect runs through the mediator, the treatment and the mediator have no common cause, and any common cause of the mediator and the outcome acts on the mediator through the treatment. A causal inference textbook says setups that meet these conditions seldom show up in practice.
For illustration, suppose the diagram meets the three conditions, half of all shoppers are shown a campaign, the mediator is whether a shopper visits the store, and the outcome is a purchase. Suppose the visit rate is 0.8 if shown and 0.
2 if not, and the purchase rate is 0.6 for shown visitors, 0.4 for unshown visitors, 0.
3 for shown non-visitors and 0.1 for unshown non-visitors. Within each treatment group, then averaged over the even split, the purchase rate is 0.
5 x 0.6 + 0.5 x 0.
4 = 0.5 for visitors and 0.5 x 0.
3 + 0.5 x 0.1 = 0.
2 for non-visitors. If everyone were shown, the purchase rate would be 0.8 x 0.
5 + 0.2 x 0.2 = 0.
44, and if no one were, 0.2 x 0.5 + 0.
8 x 0.2 = 0.26, so the effect is 0.
44 - 0.26 = 0.18.
The raw rates, 0.8 x 0.6 + 0.
2 x 0.3 = 0.54 for shown shoppers and 0.
2 x 0.4 + 0.8 x 0.
1 = 0.16 for the rest, differ by 0.38, more than twice the effect, because the raw gap also contains the unmeasured common cause.
Why Frontdoor Criterion matters for ecommerce
When something that moves both a brand's spend and its sales, such as shopper intent, goes unmeasured, adjusting for the variables the brand does have cannot remove it. The front-door criterion states what a workaround would require: a measured step between the campaign and the purchase that carries the whole effect and that the unmeasured cause reaches only through the campaign. A 2024 article applies it to ride-sharing data, where an algorithm rather than the rider decides whether an authorized shared ride is actually shared. Holding a funnel metric such as visits or add-to-cart events up against the same conditions shows quickly whether it can serve. When it cannot, a randomized holdout, which needs no mediator, is the cleaner way to answer the question.
How to use Frontdoor Criterion
- Draw the diagram on one page: the treatment (for example exposure to a campaign), the outcome (orders or revenue in Shopify), the unmeasured cause you worry about (for example shopper intent) and one mediator you can measure for everyone, such as site visits or add-to-cart events in your analytics.
- Check the first condition. Ask whether any of the treatment's effect can reach the outcome without passing through the mediator, for example a shopper who sees an ad and buys later without clicking. If so, stop: the formula no longer gives the effect.
- Check the second condition. Ask whether anything could cause both the treatment and the mediator, such as intent that makes a shopper more likely to be targeted and more likely to visit. If so, stop.
- Check the third condition. Ask whether a common cause of the mediator and the outcome can act without going through the treatment, such as the same intent making a visitor more likely to buy. If so, stop.
- If all three survive, estimate the two links: the treatment's effect on the mediator, then the mediator's effect on the outcome within each level of the treatment. Combine them with the formula below. For yes or no variables, a pivot table of counts by treatment, mediator and outcome is enough.
- Judge the result. Pass: you can defend each condition from how the data were generated, such as how the campaign was targeted, and a randomized holdout, if you have one, gives a similar effect. Fail: any condition rests on hope, or the holdout disagrees. Report the number as an association, not as the effect.
Formula
P(y | do(t)) = Σ_z P(z | t) Σ_t' P(y | t', z) P(t') Where: - t: the treatment value being set, such as shown or not shown a campaign - y: the outcome value, such as a purchase - z: a value of the mediator, such as a store visit - t': a value of the treatment that the inner sum averages over - P(z | t): how likely each mediator value is when the treatment is t - P(y | t', z): the chance of the outcome given treatment value t' and mediator value z - P(t'): how common each treatment value is in the data
Both sums run over every value of the variable they index: the inner sum holds the treatment fixed while it relates the mediator to the outcome, and the outer sum weights each mediator value by how likely the treatment makes it.
Common mistakes
- Choosing a mediator that carries only part of the effect. If an ad can lead to a purchase without a click, clicks are not a valid mediator, and the formula answers a narrower question than the one asked.
- Choosing a mediator that shares an unmeasured cause with the outcome. If shopper intent raises both visits and purchases, the treatment does not block that path, and the bias the method was meant to remove comes back.
- Using a mediator that cannot occur under every treatment. The formula conditions on each combination of treatment and mediator, so a combination that never happens, such as a click by someone who was never shown the ad, leaves a term undefined.
- Treating the conditions as checkable from the data. Pearl writes that, short of experimental control, causal assumptions cannot be confirmed even in principle, and a 2022 paper shows the front-door assumptions may be tested through Verma constraints when an auxiliary variable meets mild conditions.
- Reaching for the front door when the back door can be closed. The method is for a bad path that cannot be closed. If the confounders are measured, adjusting for them closes it directly, with no mediator to defend.
Frequently asked questions
What is the front-door criterion in simple terms?
It is a test of whether you can recover a treatment's effect through a measured middle step when something unmeasured drives both treatment and outcome. If the whole effect runs through that step and the unmeasured cause reaches it only through the treatment, the two links can be estimated and combined.How is the front-door criterion different from the back-door criterion?
Back-door adjustment controls for a set of measured variables that blocks every back-door path from the treatment to the outcome. The front-door criterion is for a bad path that cannot be closed that way, so it routes the effect through a mediator instead.Can the front-door criterion be used for marketing attribution?
Only if a measured mediator meets all three conditions, which a causal inference textbook says seldom arise in practice. A funnel step such as a click fails the third condition when shopper intent drives both clicks and purchases. The one application cited in this entry comes from ride-sharing, not marketing.Can the front-door conditions be tested?
Only in part. A 2022 paper shows that if an auxiliary variable meets mild conditions, the assumptions of the front-door model may be tested through generalized equality constraints, also called Verma constraints. Pearl separately notes that, short of experimental control, causal assumptions cannot be confirmed even in principle.
Further reading
- The Effect, Chapter 9: Finding Front Doors · Huntington-Klein
- Causal Inference with Conditional Front-Door Adjustment and Identifiable Variational Autoencoder · arXiv
- The Paper of How: Estimating Treatment Effects Using the Front-Door Criterion · Oxford Bulletin of Economics and Statistics
- On Testability of the Front-Door Model via Verma Constraints · arXiv
- An Introduction to Causal Inference · International Journal of Biostatistics