Design paper
Causal inference for commerce decisions: a design for treatment-effect estimation
Abstract
Commerce teams decide on free shipping, checkout changes, recommendations and payment retries using dashboards that show association, not effect. We describe a design for a causal estimation pipeline that asks what an intervention changed rather than what happened alongside it. The design rests on the potential-outcomes framework, states its identifying assumptions in a causal graph, uses randomised experiments wherever they are possible, and falls back to propensity-score, doubly robust and double machine-learning estimators on observational data when they are not. Heterogeneous effects are estimated with causal forests and meta-learners, and region-wide changes with Bayesian structural time-series counterfactuals. We map each component to the problem it addresses and the published work behind it, give a worked table of the identification strategy for five common interventions, and set out the checks a deployment would need before any effect is reported. We report no effects of our own. This is a design proposal, not a measured result.
Method. Design paper: the pipeline is argued from the cited literature; we report no measurements of our own. Table 2 is a worked assignment of identification strategies, not data.
1Context and motivation
Commerce teams make a steady stream of decisions about interventions: whether to offer free shipping, whether to remove a checkout step, which products to recommend, whether to show a payment-retry prompt. Most of the evidence they use comes from dashboards, funnel reports and segment comparisons. These describe what happened alongside an intervention. They do not say what the intervention changed.
The gap matters because the conditions around an intervention are rarely held still. A promotion launches in the same week as a traffic campaign; a new payment method becomes available in one region while a carrier changes its rates; a checkout change ships to the devices that already convert most often. In each case a naive before-and-after or treated-versus-untreated comparison mixes the effect of the intervention with the effect of everything that moved with it.
This paper describes the pipeline we propose for estimating the causal effect of such interventions in a commerce setting. We describe the design and the reasons for each part of it, drawing on the published literature in statistics, econometrics and machine learning. We do not report its effects, because we have not measured them.
2Foundations
2.1Potential outcomes
The design uses the potential-outcomes framework. For each unit (a session, a shopper or a store) and each treatment, there is an outcome that would occur under the treatment and one that would occur without it; the causal effect is the difference between the two1. Only one of the two is ever observed for a given unit, which is the fundamental problem of causal inference, and every method in this paper is a way of filling in the missing one under stated assumptions2.
Randomisation is the cleanest way to fill it in, because random assignment makes treated and untreated groups comparable in expectation. Where randomisation is not possible, carefully controlled non-randomised data can still be used to estimate causal effects, but only under further assumptions1, 3.
2.2Causal graphs
Every decision the pipeline supports has a written causal graph. The graph states which variables are thought to cause which, which confounders must be adjusted for, and which assumptions cannot be tested from data alone4. We treat the graph as a reviewed artefact, owned by the team that owns the decision, rather than as something inferred automatically.
2.3Average and heterogeneous effects
The average treatment effect answers whether an intervention helps on average. Many commerce decisions need more: whether it helps the shoppers it would be shown to, and whether some groups are harmed. The conditional average treatment effect, the expected effect given a unit's observed characteristics, answers that question. Estimating it is harder than prediction because no unit's individual effect is ever observed, so the usual cross-validation against observed outcomes does not apply directly5. Uplift modelling, as it is called in marketing, addresses the same estimand; it has its own literature of tree-based and meta-learning methods that overlaps with the causal-inference one6.
3Design principles
The design follows six principles.
- Experiment first. If an intervention can be randomised at reasonable cost, it is randomised, and the experiment is the estimate of record7.
- Assumptions are written down. An observational estimate is published only with its causal graph and the assumptions it relies on4.
- Estimators are doubly protected. Observational estimates use estimators that remain consistent if either the treatment model or the outcome model is correct8.
- Heterogeneity comes with uncertainty. Effects per group are reported with confidence intervals, not as point scores9.
- Overlap is checked, not assumed. Units that had almost no chance of receiving the treatment, or almost no chance of not receiving it, are excluded from the estimate and reported as excluded3.
- Privacy is a design input. Released aggregates carry calibrated noise where the audience is broad10.
4Architecture
The pipeline has five components, plus a review step before any estimate is used.
4.1Data inputs
The pipeline reads the same event stream as the rest of the analytics stack: exposure to an intervention (which variant, offer or prompt a unit saw), the outcomes of interest (conversion, order value, return, repeat purchase at fixed horizons), and the covariates that the causal graph names as confounders. Typical confounders in this setting are device class, traffic source, region, prior purchase history, which payment methods were available, and whether shipping to the shopper's address was possible. Each record carries the timestamp of exposure so that covariates are taken from before treatment and outcomes from after it.
4.2Treatment assignment model
For observational estimates, the pipeline fits a model of the probability that a unit received the treatment given its covariates. Adjusting for this single score is sufficient to remove the bias from all the observed covariates it is built from, which allows matching, subclassification or weighting on one number instead of many11. The model class is a design choice; we use a flexible learner and check calibration and the overlap of scores between treated and untreated units before any estimate is computed.
4.3Effect estimators
Three families of estimator sit in this layer.
- Doubly robust estimation of average effects. The estimator combines the treatment model with a model of the outcome; it is consistent if either is correctly specified, which gives two chances at a valid inference rather than one8.
- Double machine learning. When the set of confounders is large, flexible learners fit the nuisance models and the target effect is estimated with orthogonal moments and cross-fitting, which removes the regularisation bias that plugging machine-learning predictions into a regression would otherwise carry12.
- Heterogeneous effects. Causal trees with honest sample splitting give valid inference on effects within data-driven subgroups5. Causal forests extend this to an estimate for each unit, with pointwise consistency and asymptotically normal sampling distributions, so confidence intervals can be reported9. Meta-learners, including the X-learner, build effect estimators from any supervised learner and adapt to structure such as a smooth or sparse effect; the X-learner is suited to the common commerce case where far fewer units are treated than untreated13.
4.4Counterfactuals for region-wide changes
Some interventions cannot be randomised at the unit level: a new payment method enabled for a whole country, a change in tax treatment, a carrier switch. For these the pipeline builds a counterfactual time series of what the outcome would have been without the change, from untreated regions and pre-period data, using a Bayesian structural time-series model. That approach estimates how the effect evolves over time and gives posterior intervals for it14.
4.5Serving and experimentation
Effect estimates are exposed to decision systems as versioned artefacts: an estimate, its interval, the causal graph and estimator that produced it, and the data window. A decision system that wants to target an intervention by estimated effect reads these artefacts; it does not retrain them. New targeting policies go through a randomised holdout before they replace an existing policy, so the experiment remains the final check on the observational work7.
Table 1 summarises the components, the problem each addresses and the evidence behind it.
| Component | Problem it addresses | Evidence |
|---|---|---|
| Potential-outcomes definitions per decision | "Effect" used loosely for association | 1, 2 |
| Written causal graph | Unstated or untestable confounding assumptions | 4 |
| Randomised experiments where feasible | Confounding in observational comparisons | 7 |
| Propensity score with overlap check | Many observed confounders; units with no comparable controls | 11, 3 |
| Doubly robust estimator | Misspecified treatment or outcome model | 8 |
| Double machine learning with cross-fitting | Regularisation bias from high-dimensional nuisance models | 12 |
| Honest causal trees and causal forests | Average effects hide groups that are harmed or not helped | 5, 9 |
| X-learner for imbalanced treatment | Few treated units relative to controls | 13 |
| Bayesian structural time-series counterfactual | No unit-level randomisation for region-wide changes | 14 |
| Calibrated noise on released aggregates | Re-identification from published statistics | 10 |
Source: our design, with the works cited in the table.
5Identification by intervention
The interventions in the original scope differ in how their effects can be identified. Table 2 assigns each to a strategy. It is a worked design table, not data: it records the choice we would make and why, and every row would need to be checked against the actual assignment process in a deployment.
| Intervention | Unit of assignment | Primary strategy | Fallback when randomisation is not possible | Main confounder to adjust for |
|---|---|---|---|---|
| Free-shipping threshold | Session or shopper | Randomised experiment | Doubly robust estimate with propensity overlap check | Basket value before exposure |
| Removing a checkout step | Session | Randomised experiment | None; ship only behind an experiment | Device class |
| Price ending change | Product and region | Randomised experiment by product | Structural time-series counterfactual | Concurrent promotions |
| Recommendation strategy | Shopper | Randomised experiment with heterogeneous effects | Double machine learning on logged exposure | Prior engagement |
| Payment-retry prompt | Failed payment attempt | Randomised experiment | Doubly robust estimate | Decline reason and payment method |
Source: our design.
Two patterns follow from the table. First, every row has a randomised primary strategy, because each of these interventions can in principle be assigned at random at the session, shopper or product level7. Second, the fallbacks differ by the structure of the problem: an intervention applied to a whole region needs a time-series counterfactual14, whereas one applied to individual shoppers with logged exposure can use unit-level adjustment8, 12.
6Illustrative scenarios
The scenarios below are hypothetical. They show how the components would interact; they are not results.
Free shipping where shipping costs bite. A store that offered free shipping only to shoppers in regions with high delivery costs would see higher conversion there, but those regions might also differ in device mix and traffic source. An experiment within each region would separate the two. If the store also wanted to know which shoppers respond, a causal forest on the experiment's data would estimate the effect by basket value and region, with an interval for each9.
A payment method enabled for one country. If a new local payment method were enabled nationwide on one date, no shopper-level control group would exist. The pipeline would build the counterfactual conversion series from comparable countries and the pre-period, and report the estimated effect with its posterior interval over the weeks after launch14. A concurrent national holiday in that country only would break the comparison, and the causal graph would have to say so.
Regulation as a confounder. Strong customer authentication rules change checkout friction in some jurisdictions. A checkout simplification tested across jurisdictions would therefore have different effects by jurisdiction partly because of the regulatory step, not because shoppers there respond differently. The causal graph would carry the regulatory regime as a variable and the effect would be estimated within each regime4.
7Evaluation before any effect is reported
Before the pipeline's estimates could be used to target interventions, a deployment would need to pass the checks below.
- Overlap and balance. Propensity distributions for treated and untreated units overlap, and covariates are balanced after weighting or matching11, 3.
- Agreement with experiments. Where both an experiment and an observational estimate exist for the same intervention, the two are compared; a persistent gap is evidence of unmeasured confounding.
- Placebo tests. The estimator is run on a period or outcome where the intervention cannot have had an effect, and should find none.
- Out-of-sample heterogeneity checks. Subgroup effects found in one sample are re-estimated in a held-out sample before they are used for targeting5.
- Targeting validated by holdout. A policy that targets by estimated effect is compared with random targeting in a controlled experiment7.
8Ethics, fairness and privacy
Targeting by estimated effect allocates interventions unevenly by design. The pipeline reports estimated effects by device class and region so that an operator can see whether a policy withholds a benefit, such as a shipping offer, from groups that would also gain from it. Demographic attributes are not used as model inputs. Aggregates released outside the analytics team carry noise calibrated to the sensitivity of the statistic10, and small cells are suppressed.
9Limitations
- No measurements. We have not measured any effect with this pipeline. Every benefit implied by the design is a hypothesis to be tested with the checks above.
- Unmeasured confounding. Observational estimates are only as good as the causal graph and the covariates recorded. Confounders that are not observed remain, and no estimator in this design removes them4, 3.
- Overlap. Where treatment assignment is nearly deterministic, for example a feature shown only on one platform, there are no comparable controls and no observational estimate is possible.
- Interference. The potential-outcomes setup assumes one unit's treatment does not change another's outcome. Shared inventory, referral and price comparison can break that assumption in commerce.
- Small stores. Stores with little traffic or few distinct treatments will not have enough data for heterogeneous effect estimates; they would see average effects at most.
- Non-stationarity. An effect estimated in one season or market condition may not hold in the next. Structural time-series counterfactuals also degrade when the control series are themselves hit by a shock.
- Operator use. How operators read intervals and act on subgroup estimates is a human-factors question this design does not answer.
10Conclusion
We have described a pipeline for estimating the causal effect of commerce interventions: definitions in potential outcomes, a written causal graph for each decision, randomised experiments as the default, doubly robust and double machine-learning estimators where experiments are not possible, causal forests and meta-learners for heterogeneous effects, and structural time-series counterfactuals for region-wide changes. Each part rests on published methods, summarised in Table 1. The design has no evidence yet of its own accuracy. The next step is to run it on an intervention that also has a randomised experiment, and compare the two.
References
- 1
Rubin, D. B. (1974). Estimating causal effects of treatments in randomized and nonrandomized studies. Journal of Educational Psychology, 66(5). doi.org/10.1037/h0037350
- 2
Holland, P. W. (1986). Statistics and causal inference. Journal of the American Statistical Association, 81(396). doi.org/10.1080/01621459.1986.10478354
- 3
Imbens, G. W., & Rubin, D. B. (2015). Causal inference for statistics, social, and biomedical sciences: An introduction. Cambridge University Press. doi.org/10.1017/CBO9781139025751
- 4
Pearl, J. (2009). Causality: Models, reasoning, and inference (2nd ed.). Cambridge University Press. doi.org/10.1017/CBO9780511803161
- 5
Athey, S., & Imbens, G. (2016). Recursive partitioning for heterogeneous causal effects. Proceedings of the National Academy of Sciences, 113(27). doi.org/10.1073/pnas.1510489113
- 6
Gutierrez, P., & Gérardy, J.-Y. (2017). Causal inference and uplift modelling: A review of the literature. Proceedings of The 3rd International Conference on Predictive Applications and APIs, PMLR 67. proceedings.mlr.press/v67/gutierrez17a.html
- 7
Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy online controlled experiments: A practical guide to A/B testing. Cambridge University Press. doi.org/10.1017/9781108653985
- 8
Bang, H., & Robins, J. M. (2005). Doubly robust estimation in missing data and causal inference models. Biometrics, 61(4). doi.org/10.1111/j.1541-0420.2005.00377.x
- 9
Wager, S., & Athey, S. (2018). Estimation and inference of heterogeneous treatment effects using random forests. Journal of the American Statistical Association, 113(523). doi.org/10.1080/01621459.2017.1319839
- 10
Dwork, C., McSherry, F., Nissim, K., & Smith, A. (2006). Calibrating noise to sensitivity in private data analysis. Theory of Cryptography: Third Theory of Cryptography Conference, TCC 2006, Lecture Notes in Computer Science 3876, Springer. doi.org/10.1007/11681878_14
- 11
Rosenbaum, P. R., & Rubin, D. B. (1983). The central role of the propensity score in observational studies for causal effects. Biometrika, 70(1). doi.org/10.1093/biomet/70.1.41
- 12
Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., & Robins, J. (2018). Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21(1). doi.org/10.1111/ectj.12097
- 13
Künzel, S. R., Sekhon, J. S., Bickel, P. J., & Yu, B. (2019). Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the National Academy of Sciences, 116(10). doi.org/10.1073/pnas.1804597116
- 14
Brodersen, K. H., Gallusser, F., Koehler, J., Remy, N., & Scott, S. L. (2015). Inferring causal impact using Bayesian structural time-series models. The Annals of Applied Statistics, 9(1). doi.org/10.1214/14-AOAS788
Cite this paper
Tanqory Research (2025). Causal inference for commerce decisions: a design for treatment-effect estimation. Tanqory. https://tanqory.com/research/20250717-causal-inference-commerce