A/B Testing a Marketplace Feature End to End
Statistics & ExperimentsModel answerLast updated
Design a two-sided marketplace experiment, diagnose a sample ratio mismatch, reconcile conflicting metrics into a value view, and decide launch vs. iterate.
Context
A travel marketplace wants to help date-flexible guests find a stay within budget. The proposed feature is a "Flexible Date Matrix" that appears on search results pages and displays prices and availability for a ±3-day window around the guest's chosen dates.
You are the data scientist responsible for the experiment: designing it, monitoring it while it runs, and giving product leadership a launch recommendation.
What to cover
1. Design and randomization
- Write a falsifiable hypothesis connecting the feature to guest behavior.
- Choose the randomization unit (guest user ID, cookie/device, city/market, or listing) and discuss interference, network effects, and cross-device experience consistency.
- Explain how you set sample size and how long the test runs, given weekly seasonality.
2. Metrics and data integrity
- Primary metric(s): one or two that capture direct success.
- Guardrails: at least two host-side, operational, or business-health metrics that must not degrade.
- Instrumentation: how you validate logging and check for sample ratio mismatch (SRM) before reading any results.
3. Reading the results
After a 14-day run with 2,000,000 visitors split 50/50, you observe:
- Observed assignment: 994,200 Control vs. 1,005,800 Treatment.
- Search-to-booking conversion: +1.6% relative lift,
p = 0.008. - Average booking value (ABV): −2.1% relative,
p = 0.03. - 7-day host cancellation rate: +0.4 percentage points,
p = 0.04. - p95 page load latency: +140 ms,
p < 0.001.
Address:
- Run an SRM check. Is the split acceptable? What do you do if it fails?
- Separate statistical from practical significance given the conflicting signals (more bookings, smaller baskets, more cancellations).
- Name the heterogeneous effects or segments you would dig into to explain why ABV and cancellations moved.
- Give a final call — Launch, Do Not Launch, or Iterate — and the next experiment you would prioritize.
Answer in prose; no code is required.
Hints
Hint 1
Do the SRM test before you interpret a single metric — a skewed split makes every downstream number suspect.
Hint 2
Convert conversion and basket size into one value-per-visitor number so the trade-off becomes a single sign.
Hint 3
Remember that ABV is a ratio conditional on booking; a composition shift can move it without any guest spending less.
Hint 4
A guardrail breach is a launch blocker even when the primary metric looks good.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
A/B Testing a Marketplace Feature End to End
This question checks whether you can run an experiment end to end — and whether you resist a significant headline metric when the rest of the picture is bad. Three moves matter most: catching the SRM before reading results, converting the conflicting metrics into one value metric, and recommending Iterate rather than Launch.
1. Design and randomization
Hypothesis. Showing prices and availability across a ±3-day window lets date-flexible guests find an affordable stay faster, so we expect higher search-to-booking conversion without reducing booking value or worsening host outcomes. That last clause makes the hypothesis falsifiable.
Randomization unit: guest user ID, with a cookie/device fallback for logged-out traffic that gets stitched to the user ID on login.
| Unit | Upside | Downside |
|---|---|---|
| User ID | Consistent experience across devices; matches the decision-maker | Needs a logged-out fallback; shared inventory still leaks across arms |
| Cookie/device | Covers anonymous traffic | One person can land in both arms; contamination dilutes the effect |
| Market/city | Removes inventory interference | Few units, high variance, long runs or switchback designs |
| Listing | Natural for host-facing features | Wrong fit — this feature lives in guest search |
Analyze triggered users only: those who reached a search results page with dates entered, which is when the matrix could render. Fire the trigger in both arms — a counterfactual event in control — so the trigger population is comparable.
Sample size. For binary conversion, per arm n ≈ 2(z_{1−α/2} + z_{1−β})² · p(1−p) / δ². With a 10% baseline, a 2% relative MDE (δ = 0.002), α = 0.05, power 0.8: 2(1.96+0.84)² ≈ 15.7, so n ≈ 15.7 × 0.09 / 4e−6 ≈ 353k per arm. CUPED with pre-period search and booking behavior as covariates typically cuts variance 20–40%.
Duration. Run in whole weeks, at least two, so weekday/weekend patterns cycle evenly. Divide required traffic by daily triggered users for the number of days; extend so bookings and 7-day cancellations have time to mature, and freeze each user's metric window. Avoid holiday periods or explicitly note their non-representativeness.
2. Metrics and instrumentation
Primary metrics. Search-to-booking conversion per triggered user, and net booking value per triggered user (gross booking value minus cancelled value) as the decision metric. The second one is the key design choice: it fuses volume and basket size into a single number that cannot be gamed by trading one for the other.
Guardrails. 7-day host cancellation rate, p95 search page latency, customer support contacts per booking, guest refund rate, plus host-side health such as occupancy concentration and host ratings.
Integrity checks before analysis. A/A test on the assignment service; chi-square SRM test on assigned and triggered counts; confirm the matrix-render event fires only in treatment while the counterfactual fires in control; check that search→booking→cancellation joins succeed at the same rate in both arms; verify pre-period covariate balance.
3. Reading the results
Step 1 — SRM. Expected 1,000,000 per arm; observed 994,200 vs 1,005,800. With n = 2,000,000, χ² = 5,800²/1,000,000 × 2 ≈ 67.3 on 1 df — roughly 8σ, p ≈ 1e−16. The 0.58-point deviation looks trivial but is decisive at this scale. SRM detected: every downstream metric is untrustworthy. Likely causes: bots reacting to a heavier page, redirect or reload behavior, trigger logging that fires differently per arm, or cookie churn caused by the new page. Halt interpretation, diagnose, fix, rerun. Do not reweight your way around it; report results as directional at most.
Step 2 — statistical vs. practical significance. Suppose the data were valid. Conversion and ABV compose into 1.016 × 0.979 ≈ 0.995 — gross value per visitor is about −0.5%, so more bookings at smaller baskets nets out negative. Cancellations: +0.4pp on a ~2% baseline is roughly a 20% relative increase, removing about 0.4% more booked value and adding rebooking support, host penalties, and lost guest trust. Net completed value lands near −0.9% before secondary costs. The +140 ms p95 latency is a guardrail breach and independently suppresses conversion on mobile. And with four-plus metrics, p = 0.03 and p = 0.04 are fragile under Holm or Benjamini–Hochberg — treat them as warnings needing confirmation. Note also that ABV is a ratio conditional on booking; compute its variance with the delta method or bootstrap, because treatment converting marginal, lower-budget guests lowers average ABV even if no individual spends less.
Step 3 — segments to investigate. Whether guests booked shifted dates versus their originals (tests the "cheaper dates" mechanism); trip length and check-in day of week; listing price tier; new vs. returning bookers (mix shift vs. cannibalization); Instant Book vs. Request-to-Book; host calendar freshness and sync source (stale adjacent-date availability is a prime cancellation suspect); market demand tier; lead time and device. Predeclare these and correct for multiplicity; treat findings as hypotheses, not conclusions.
Step 4 — recommendation: Iterate. The test is invalid on SRM, and even at face value net value is negative with two guardrail failures. But the feature clearly moves behavior, so the mechanism is worth saving. Priority follow-up: fix the SRM; lazy-load the matrix asynchronously to cut latency; surface only fresh, confirmed availability or Instant-Book-eligible listings; target guests with flexible intent; rerun with net booking value per user as primary and explicit non-inferiority margins on cancellations (e.g., ≤ +0.1pp) and latency.
Common mistakes: reading metrics before the SRM check; adjusting for SRM instead of fixing it; declaring victory on the conversion lift; ignoring that a guardrail breach blocks launch; and forgetting the ratio nature of ABV.