Estimating Ad Impact Without Randomization
Statistics & ExperimentsModel answerLast updated
Design a plan to measure ad effectiveness using observational data when random assignment is impossible, accounting for selection bias and confounding.
You need to measure whether showing ads increases user conversions, but you cannot randomly assign ad exposure. Users self-select into seeing ads based on their characteristics—demographic attributes like age and education, as well as behavioral patterns.
Design a complete analytical approach to estimate the causal effect of ad exposure on conversion rates. Your plan should address:
-
Causal structure: Identify what variables create confounding and which adjustment variables would eliminate bias. Explain your reasoning graphically.
-
Propensity modeling: Describe how you would model the probability of ad exposure and use it to create balanced comparison groups, either through matching or weighting.
-
Effect estimation: Provide the mathematical formulation for at least two estimators, including one that is robust to model misspecification.
-
Quality checks: Specify the diagnostics you would run to validate that your adjustment succeeded in creating comparable groups, and how you would handle extreme weights.
-
Robustness: Explain how you would assess whether unmeasured confounders could invalidate your conclusions.
-
Bias traps: Identify variables you should not adjust for and explain why.
-
Uncertainty: Describe how to correctly quantify confidence intervals given the estimation procedure.
Additionally, discuss alternative approaches like difference-in-differences or variance reduction techniques, and when each would be appropriate.
Hints
Hint 1
Start by defining a clear time reference: which variables are measured before exposure and which come after?
Hint 2
Balance diagnostics matter more than propensity model predictive accuracy—you want groups that look similar, not perfect prediction.
Hint 3
Some outcome models combined with propensity models give you two chances to be correct instead of one.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Defining the Causal Question
The goal is to estimate the average treatment effect (ATE): the expected difference in conversion rates if everyone saw ads versus if no one did. Call ad exposure $A$ (1 if exposed, 0 otherwise) and conversion $Y$ (binary). We want $E[Y(1) - Y(0)]$, the difference in potential outcomes.
Three conditions must hold for identification:
- Consistency: exposure is well-defined with no interference between users
- Conditional ignorability: after adjusting for covariates $Z$, exposure is as-if random: $Y(a) \perp A \mid Z$
- Overlap: every user profile has nonzero probability of both exposure states: $0 < P(A=1 \mid Z) < 1$
Establish a clear index date. All adjustment variables must be measured strictly before this date.
Causal Structure and Adjustment
A causal diagram clarifies the confounding:
- Demographics (age, education, income) influence both ad targeting algorithms and baseline purchase propensity
- Historical behavior (past activity, prior purchases, engagement patterns) drives both ad delivery and future conversion
- Post-exposure actions (clicks, dwell time, interactions) are mediators—they transmit part of the ad effect
- Downstream outcomes that depend on both exposure and conversion are colliders—conditioning on them induces spurious associations
A valid adjustment set must include both demographics and behavioral history measured pre-exposure. Demographics alone are insufficient because ad delivery systems use rich behavioral targeting.
The adjustment set should not include post-exposure mediators. Controlling for clicks or engagement would block the causal pathway you're trying to measure. Similarly, avoid colliders that could introduce selection bias.
Propensity Score Approach
Model the exposure probability $e(Z) = P(A=1 \mid Z)$ using the pre-exposure covariates. Options include:
- Logistic regression with flexible terms (splines, interactions) for interpretability
- Gradient boosting for better fit, validated via calibration curves
The propensity model's job is to achieve balance, not maximize prediction. Very high discrimination (AUC near 1) actually indicates poor overlap—the treated and control groups are too different.
Inverse probability weighting reweights observations so the weighted sample mimics a randomized trial. Stabilized weights reduce variance:
$$w_i = \frac{A_i \cdot \bar{A}}{e(Z_i)} + \frac{(1-A_i) \cdot (1-\bar{A})}{1-e(Z_i)}$$
where $\bar{A}$ is the overall exposure rate.
Matching is an alternative: pair each exposed user with similar unexposed users based on propensity score distance, using a caliper to enforce closeness. This estimates the effect on the treated population specifically.
Statistical Estimators
Weighted estimator (Hájek form with stabilized weights):
$$\hat{\tau}_{IPW} = \frac{\sum_i A_i w_i Y_i}{\sum_i A_i w_i} - \frac{\sum_i (1-A_i) w_i Y_i}{\sum_i (1-A_i) w_i}$$
This is consistent when the propensity model is correct.
Augmented inverse probability weighting (AIPW): Fit outcome models $\mu_a(Z) = E[Y \mid A=a, Z]$ for each exposure level, then compute:
$$\hat{\tau}_{AIPW} = \frac{1}{n}\sum_i \left[\mu_1(Z_i) - \mu_0(Z_i) + \frac{A_i(Y_i - \mu_1(Z_i))}{e(Z_i)} - \frac{(1-A_i)(Y_i - \mu_0(Z_i))}{1-e(Z_i)}\right]$$
This estimator has a critical advantage: it remains consistent if either the propensity model or the outcome models are correct. When machine learning models are used, employ cross-fitting—train models on separate folds to avoid overfitting bias.
Balance Diagnostics
Overlap assessment: Plot propensity score distributions for exposed and unexposed groups. Look for regions where one group has density but the other doesn't.
Standardized mean differences: For each covariate, compute:
$$SMD = \frac{\text{mean}{exposed} - \text{mean}{control}}{\sqrt{(\text{var}{exposed} + \text{var}{control})/2}}$$
After weighting, all SMDs should be below 0.1. Display these in a "Love plot" showing before/after balance improvement.
Effective sample size: Large weights concentrate influence on few observations. Calculate:
$$ESS = \frac{(\sum w_i)^2}{\sum w_i^2}$$
If ESS drops to a small fraction of the sample, results are driven by outliers.
Weight trimming: When weights are extreme, either cap them (introduces bias) or exclude units with propensity near 0 or 1 (changes the target population to those with good overlap). Document what population your estimate applies to after trimming.
Sensitivity to Unmeasured Confounding
Even with careful adjustment, an unmeasured confounder could remain. Quantify robustness:
Rosenbaum bounds (for matched designs): Ask how strong an unmeasured confounder would need to be to change conclusions. Increase the assumed confounding strength until significance disappears. Report: "Results hold unless a hidden factor increased exposure odds by more than 2× while also affecting conversion."
E-value: For the observed effect size, calculate the minimum strength of association an unmeasured confounder would need with both exposure and outcome to explain away the result.
Negative controls: Test your method on outcomes known to be unaffected by the ads (e.g., pre-period conversions). A well-specified method should show near-zero effects on these placebo outcomes.
Variance Estimation
Standard errors must account for the estimation of propensity scores:
- For AIPW with cross-fitting, use the influence function variance
- For IPW, bootstrap the entire procedure including propensity model fitting—treating weights as fixed underestimates uncertainty
- If data has structure (users nested in regions, multiple observations per user), cluster standard errors accordingly
Report both absolute lift (percentage point change) and relative lift (percent change), each with 95% confidence intervals. State clearly which population the estimate applies to (all users, or those with overlap after trimming).
Alternative Approaches
Difference-in-differences: Appropriate when exposure switches on at a specific time for some units but not others (e.g., regional rollout), and you have pre/post data. The key assumption is parallel trends—absent the intervention, outcomes would have evolved similarly. DiD removes time-invariant confounding even without measuring all confounders.
CUPED (controlled experiments): Useful when you do have randomization but want to reduce variance. Regress outcomes on pre-treatment covariates, then analyze residuals. This preserves unbiasedness while shrinking confidence intervals. In observational settings, CUPED alone doesn't address confounding.
Choose DiD when you have panel structure and a clear temporal threshold. Choose pure covariate adjustment (propensity methods) when exposure varies continuously across users without a clean temporal break.
Common Mistakes
- Including post-treatment variables (clicks, engagement) as covariates, which blocks the causal effect
- Using demographics alone when behavioral targeting is present
- Ignoring extreme weights and reporting estimates driven by a handful of users
- Claiming causal effects without sensitivity analysis
- Reporting standard errors that don't account for propensity score estimation
- Forgetting to specify which population (ATE, ATT, or overlap) the estimate targets
A strong analysis acknowledges limitations explicitly, quantifies sensitivity to violations, and presents diagnostics transparently alongside the main estimate.