The interview problem
A marketing team sends coupons to users with the highest predicted purchase probability. Coupon recipients buy more often than nonrecipients. Does the policy increase purchases? Design an evaluation and explain how you would choose recipients if the objective is incremental profit.
Original fundamentals practice, not a reported interview. All rates and economic assumptions are hypothetical. Primary technical references retrieved September 27, 2026.
1. Ask which outcome changes because of the action
A purchase predictor estimates an outcome under the data-generating policy it observed. A targeting policy needs the difference between outcomes with and without the coupon. A user who would buy anyway can have a high conversion score and almost no incremental benefit from receiving a discount.
Let Y(1) be a user's purchase outcome if assigned the defined coupon offer and Y(0) the outcome without it. The average treatment effect is E[Y(1) − Y(0)] in the chosen eligible population and outcome window. We observe only one potential outcome per user in this experiment, so individual effects are not directly revealed by labels.
Specify the coupon value, eligibility, delivery channel and measurement window. “Received a coupon” may mean assigned, delivered, opened or redeemed; these are different variables. Begin with the effect of assignment to the offer, which corresponds to a policy the system can control.
2. Work through why conversion targeting can lose
Suppose a randomized pilot estimates outcomes in two groups defined before treatment, with at most one purchase per user in the outcome window. High-intent users purchase at 50% without a coupon and 51% with one: one percentage point of uplift. Moderate-intent users purchase at 10% without and 15% with: five points of uplift. A purchase-probability ranker prefers the first group; an incremental-purchase policy may prefer the second.
Assume contribution margin before coupon is $20 per purchase, the coupon costs $2 on every treated purchase and there are no other costs or spillovers. Per 1,000 high-intent users, expected incremental purchases are 10, worth $200, but 510 treated purchases receive $1,020 of discounts. Incremental profit is −$820.
For 1,000 moderate-intent users, 50 incremental purchases contribute $1,000, while 150 treated purchases cost $300 in discounts: incremental profit is $700. Equivalently, compare treated profit 150 × $18 with control profit 100 × $20. The calculation must include discounts to users who would have purchased anyway.
These are population expectations, not guaranteed individual outcomes. A policy should use uncertainty and business constraints as well as estimated benefit. Purchase uplift and profit uplift can rank users differently when purchase value or discount cost varies.
3. Randomize the offer, preserve assignment
Define an eligible cohort using information available before assignment, then randomize offer versus no offer. Stratify on important pre-treatment groups if useful, retaining known assignment probabilities. Use stable user or household identity when sharing coupons could cause interference. The design must account for leakage between units rather than pretending every purchase is independent.
Measure outcomes for everyone assigned, including users who never open the message. Comparing only coupon redeemers with nonredeemers conditions on post-assignment behavior and loses the simple randomized comparison. Assignment-based analysis estimates the effect of the offer policy including its real delivery and uptake rates.
Choose a primary profit metric, guardrails, sample size and stopping rule before examining outcomes. Check assignment balance and missing data. Track delayed purchases and returns using a fixed maturity window. A statistically convincing short-term lift can still pull purchases forward from next week rather than increase long-term value.
4. Explain why existing logs may not identify the effect
In the historical policy, preexisting intent affects both coupon selection and purchase. The raw recipient/nonrecipient difference combines that selection with any coupon effect. A larger predictive model does not automatically separate them.
Adjustment requires a defensible set of pre-treatment common causes, enough overlap to compare treated and untreated users in relevant contexts, and a consistent definition of treatment. If every high-intent user was treated, the data may provide no untreated comparison there. Extrapolation from a model is an additional assumption, not newly observed evidence.
Draw a causal story before adding covariates. Adjusting for a variable caused by treatment can remove part of the effect or introduce bias. For example, coupon redemption is not a baseline confounder of assignment and purchase. Domain knowledge determines the role of a variable; predictive feature importance does not.
Separate identification from estimation. First state why the target causal quantity can be recovered under the proposed assumptions, then choose a regression, weighting or other estimator. Sensitivity checks can expose fragile conclusions, but passing a placebo test does not prove that all unobserved confounding is absent.
5. Learn and test a targeting policy
Use randomized data to estimate conditional average effects, ideally targeting incremental profit directly. A group-level conditional effect is not an observed personal counterfactual, even if the model emits one score per user. Split related users appropriately and keep policy selection separate from final evaluation. Flexible heterogeneous-effect models can discover spurious subgroups when searched repeatedly on the same data.
Under a coupon budget, compare predicted net benefit with the expected cost and respect operational constraints. Do not assume the top purchase scores or largest raw treatment effects solve every budget problem. Cost may depend on redemption, and a cap on sent coupons differs from a cap on realized discount spend.
Evaluate the frozen targeting policy against a feasible baseline, such as no coupons or the existing policy, using a new controlled test when possible. Offline policy evaluation needs valid logging probabilities and support. Report overall profit, important slices, customer experience and long-term effects, not just the best-looking subgroup.
6. Handle the hard follow-ups honestly
A user sees the offer on several devices: stable identity or clustered assignment is needed. Coupons are shared: interference may require larger units or a redesigned offer. Some purchases lack identity: missingness may bias the comparison if treatment affects login behavior. A policy change alters stock availability: the isolated-user effect may not predict deployment at full scale.
If randomization is unavailable, propose an observational design only with explicit identification assumptions and limitations. Do not claim that matching, a causal library or a good fit score alone converts association into an intervention estimate. Sometimes the correct next step is a small authorized experiment to obtain missing evidence.
Foundation: distinguish purchase probability from uplift. Senior: explain the negative high-intent profit calculation. Staff: redesign the experiment when coupons change shared inventory or spread between households.
Score 0–2 each for the causal target, economic arithmetic, valid assignment analysis, identification assumptions and independent policy validation. Continue with selection bias and experimentation infrastructure.
Sources and next steps
- DoWhy: estimating causal effects — modeling, identification, estimation and robustness checks.
- DoWhy: An End-to-End Library for Causal Inference — primary research on explicit causal assumptions.
The coupon example and evaluation plan are original. A software tool can organize assumptions and estimation; it cannot establish an unknown causal structure from a successful API call.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.