Measuring Price Impact

Diff-in-diff, synthetic controls, and causal forests

Tech / MarketplaceAdvanced

Causal Inference in Pricing

Randomized experiments are the gold standard for measuring the causal effect of a price change, but they are not always feasible. This topic introduces quasi-experimental methods that recover causal estimates from observational data, and examines the pitfalls that arise when standard assumptions fail in marketplace settings.

Why Causal Inference Matters for Pricing

Most pricing data is observational. Managers set prices in response to demand conditions, competitors adjust strategically, and promotions coincide with seasonal peaks. A naive regression of quantity on price confounds the causal effect of price with these endogenous factors, often producing estimates that are biased toward zero or even positive.

As Angrist and Pischke (2009) emphasize, the core challenge is that the observed outcome under treatment cannot be compared to the counterfactual outcome under control for the same unit. All credible causal methods address this by constructing a valid counterfactual.

Definition — Average Treatment Effect (ATE)

For a binary treatment Di{0,1}D_i \in \{0,1\}, the ATE is the expected difference in potential outcomes:

τ=E[Yi(1)Yi(0)]\tau = \mathbb{E}[Y_i(1) - Y_i(0)]

where Yi(1)Y_i(1) and Yi(0)Y_i(0) are the outcomes that unit ii would experience under treatment and control, respectively. The fundamental problem is that we observe at most one of these for each unit.

In pricing, the treatment is typically a price change, and the outcome is revenue, demand, or profit. The methods below differ in how they construct the missing counterfactual.

Difference-in-Differences

Difference-in-differences (DiD) exploits a natural experiment in which one group (e.g., stores in a particular region) receives a price change while a comparable group does not. By comparing the change in outcomes over time for both groups, DiD removes time-invariant confounders and common time trends.

Definition — DiD Estimator

Let TT index treated units and CC control units; let pre\text{pre} and post\text{post} denote before and after the intervention. The DiD estimate is:

τ^DiD=(YˉT,postYˉC,post)(YˉT,preYˉC,pre)\hat{\tau}_{\text{DiD}} = \bigl(\bar{Y}_{T,\text{post}} - \bar{Y}_{C,\text{post}}\bigr) - \bigl(\bar{Y}_{T,\text{pre}} - \bar{Y}_{C,\text{pre}}\bigr)

This double differencing eliminates both group-level fixed effects and common time effects.

Parallel Trends Assumption

DiD is consistent for the ATT (average treatment effect on the treated) if and only if the counterfactual trend for the treated group equals the observed trend for the control group:

E[YT(0)postYT(0)pre]=E[YC(0)postYC(0)pre]\mathbb{E}[Y_T(0)_{\text{post}} - Y_T(0)_{\text{pre}}] = \mathbb{E}[Y_C(0)_{\text{post}} - Y_C(0)_{\text{pre}}]

When this assumption is violated, the DiD estimate inherits a bias equal to the differential trend between the two groups.

Regional Price Change

A retailer raises the price of a product by 10% in its Western region while holding prices constant in the Eastern region. If both regions were on the same demand trajectory before the change, DiD attributes the post-change divergence in sales to the price increase. Use the interactive chart below to see how violating parallel trends biases this estimate.

Regression Discontinuity

Regression discontinuity design (RDD) applies when treatment is assigned by a threshold rule on a continuous running variable. In pricing, such thresholds arise naturally: quantity discount breakpoints, shipping-zone boundaries, loyalty tier cutoffs, and regulatory price ceilings.

Definition — Sharp RDD

Given a running variable XiX_i and a cutoff cc, treatment is deterministic: Di=1(Xic)D_i = \mathbf{1}(X_i \geq c). The causal effect at the cutoff is:

τRDD=limxcE[YiXi=x]limxcE[YiXi=x]\tau_{\text{RDD}} = \lim_{x \downarrow c}\, \mathbb{E}[Y_i \mid X_i = x] - \lim_{x \uparrow c}\, \mathbb{E}[Y_i \mid X_i = x]

Identification rests on the assumption that all other determinants of YY vary smoothly through the cutoff, so the discontinuity in the outcome must be caused by the treatment.

The practical challenge is choosing the bandwidth for the local linear regression on each side of the cutoff. A wide bandwidth uses more data (lower variance) but risks capturing curvature in the underlying relationship (higher bias). The interactive chart below lets you explore this tradeoff.

Quantity Discount Threshold

An e-commerce platform offers a 15% discount for orders above 50 units. Customers just below the threshold face the full price; those just above receive the discount. The RDD compares average spending for customers narrowly below and above 50 units. If the only thing that changes at 50 is the discount, the gap in spending at that point identifies the causal effect of the price reduction.

Heterogeneous Treatment Effects

The methods above estimate an average treatment effect. But pricing decisions often benefit from knowing who responds most to a price change. Athey and Imbens (2016) introduced causal trees, and Wager and Athey (2018) extended the idea to causal forests: ensemble methods that partition the covariate space to discover heterogeneous treatment effects.

Definition — Conditional Average Treatment Effect (CATE)

The CATE measures how the treatment effect varies as a function of observable covariates XX:

τ(x)=E[Yi(1)Yi(0)Xi=x]\tau(x) = \mathbb{E}[Y_i(1) - Y_i(0) \mid X_i = x]

A causal forest estimates τ(x)\tau(x) by growing an ensemble of trees that split on covariates to maximize heterogeneity in treatment effects, rather than prediction accuracy.

Asymptotic Normality of Causal Forests (Wager & Athey, 2018)

Under honesty (using separate data for splitting and estimation) and regularity conditions, the causal forest estimate τ^(x)\hat{\tau}(x) is asymptotically normal:

τ^(x)τ(x)σ^(x)dN(0,1)\frac{\hat{\tau}(x) - \tau(x)}{\hat{\sigma}(x)} \xrightarrow{d} \mathcal{N}(0,1)

This enables pointwise confidence intervals for the treatment effect at any covariate value, providing both an estimate and a measure of uncertainty.

For pricing, causal forests can reveal that a promotion has a large effect on price-sensitive segments but negligible impact on loyal customers, informing targeted pricing strategies.

Marketplace Interference

Standard causal inference assumes the Stable Unit Treatment Value Assumption (SUTVA): one unit’s treatment does not affect another unit’s outcome. In marketplace pricing experiments, this assumption routinely fails.

Definition — SUTVA Violation in Pricing

When a treated seller lowers its price, demand shifts away from control sellers. The control group’s outcomes are contaminated by the treatment, creating interference:

Yicontrol=Yi(0)+δ(Di)Y_i^{\text{control}} = Y_i(0) + \delta(D_{-i})

where δ(Di)\delta(D_{-i}) captures the spillover from other units’ treatment assignments. The naive difference-in-means estimator conflates the direct treatment effect with this interference term.

The bias is proportional to the treatment fraction: as more sellers receive the treatment, each control seller faces greater spillover effects. This creates a systematic overestimate of the treatment effect, because the control group’s demand is artificially depressed.

Marketplace Price Experiment

A marketplace platform randomly assigns 50% of sellers to receive a 10% fee reduction, expecting them to lower prices. The naive analysis compares treated sellers’ sales to control sellers’ sales. But control sellers lose customers to the newly cheaper treated sellers, making the treatment appear more effective than it truly is. Cluster randomization by geographic market mitigates this by ensuring all sellers within a local market are in the same group.

Best Practices

1. Pre-registration

Specify the primary outcome, sample size, analysis method, and subgroups before looking at the data. Pre-registration prevents p-hacking and makes the analysis credible to stakeholders.

2. Multiple Testing Correction

Pricing experiments often test effects across products, regions, and customer segments simultaneously. Without correction (e.g., Bonferroni or Benjamini-Hochberg), the false discovery rate inflates rapidly. If testing mm hypotheses at level α\alpha, the probability of at least one false positive is:

P(at least one false positive)=1(1α)mP(\text{at least one false positive}) = 1 - (1 - \alpha)^m

With m=20m = 20 tests at α=0.05\alpha = 0.05, this exceeds 64%.

3. Sensitivity Analysis

All quasi-experimental methods rest on untestable assumptions (parallel trends, smoothness at the cutoff, SUTVA). Sensitivity analysis asks how strong an unobserved confounder would need to be to overturn the result. If a modest confounder could explain the entire effect, the evidence is fragile.

4. Cluster Randomization for Marketplaces

When interference is expected, randomize at the cluster level (geographic markets, time blocks, or platform sub-networks). This ensures that spillovers occur within treatment or control clusters, not between them, substantially reducing bias as shown in the interference chart above.

5. Complement Experiments with Structural Models

Causal inference methods identify local effects near the observed variation. To extrapolate to untested price points or counterfactual market structures, pair experimental estimates with structural demand models. The experiment validates the model; the model extends the experiment’s reach.

References

  • Angrist, J. D. & Pischke, J.-S. (2009). Mostly Harmless Econometrics: An Empiricist’s Companion. Princeton University Press.
  • Athey, S. & Imbens, G. W. (2016). “Recursive partitioning for heterogeneous causal effects.” Proceedings of the National Academy of Sciences, 113(27), 7353–7360.
  • Wager, S. & Athey, S. (2018). “Estimation and inference of heterogeneous treatment effects using random forests.” Journal of the American Statistical Association, 113(523), 1228–1242.