Designing a Two-Sided Marketplace Experiment
Statistics & ExperimentsModel answerLast updated
Design a rigorous causal experiment for a two-sided platform feature, handling network interference through cluster randomization and spillover measurement.
You're launching a new feature on a two-sided platform that connects supply and demand (for example, a ride-hailing app, food delivery service, or freelance marketplace). The feature will affect user behavior on at least one side of the marketplace.
Design a statistically sound experiment to measure the causal impact of this feature. Your design must address network interference: users in treatment and control share the same supply pool, creating spillover effects that violate standard A/B testing assumptions.
Provide a complete experimental design covering:
-
Randomization unit – Should you randomize users, suppliers, geographic regions, or something else? Justify your choice.
-
Spillover management – How will you contain interference? How will you quantify what leaks across boundaries?
-
Metrics – Define your success metric and guardrails. Explain how you'll aggregate and compute them given your randomization unit.
-
Sample size and power – Walk through the power calculation, accounting for clustering effects. How long will the experiment run?
-
Variance reduction – What techniques will you use to improve precision and handle confounds like novelty effects or seasonal patterns?
-
Validation – What checks will you run to detect interference, verify your assumptions, and ensure valid causal inference?
-
Adaptation for different conditions – How does your design change if the supply side has excess capacity?
Present a concrete rollout timeline and analysis strategy.
Hints
Hint 1
Standard user-level randomization fails when treated and control users compete for the same supply—the control group's outcomes are contaminated by treatment assignment.
Hint 2
Geographic clustering can isolate interference, but you need enough independent clusters for adequate statistical power, and you must validate that cross-cluster spillover is minimal.
Hint 3
A saturation design with varying treatment intensities lets you separately estimate direct effects, spillover effects, and the bias introduced by interference.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer: Two-Sided Marketplace Experiment Design
Core Challenge
In a two-sided marketplace, standard A/B tests break down because treatment creates interference. If you boost demand from treated users, they consume more supply, degrading service for control users. This violates SUTVA (stable unit treatment value assumption), biasing your estimates—often dramatically overstating positive effects or masking negative ones.
1. Randomization Unit
Recommendation: Geographic clusters with optional time-based switchbacks.
Why geographic clusters work:
- Partition your service area into regions where most transactions stay local. Use trip-flow data to build clusters via graph partitioning (minimize edge cuts on origin-destination pairs).
- Target: 80–90% of activity contained within cluster boundaries.
- Typical implementation: hexagonal tilings (H3 grid at resolution 7 or 8), then merge adjacent hexes using balanced min-cut algorithms.
Alternative units and their problems:
- Individual users: Contaminated. Treated users alter the shared supply environment, affecting control outcomes directly.
- Entire markets/cities: Clean isolation but terrible power. You might have only 15–30 comparable cities, giving wide confidence intervals.
- Switchback (time blocks): Useful complement for dispatch or pricing changes where effects reset quickly. Use 45–60 minute blocks with carryover periods excluded.
Assign supply-side participants (drivers, couriers) to clusters based on where they typically work, using historical activity heatmaps.
2. Spillover Management
Containment strategy:
- Create boundary buffers: a 1–2 hex ring around each cluster that you exclude from analysis or permanently assign to control.
- Ensure drivers are tagged to home clusters and penalize cross-cluster activity in your dispatch algorithm during the experiment (or at minimum track it).
Measurement via saturation design:
Randomize clusters into three groups:
- Full treatment (100%): all eligible users get the feature
- Partial treatment (50%): randomize users within these clusters
- Pure control (0%): no one gets the feature
This yields three key estimates:
| Estimate | Calculation | Interpretation |
|---|---|---|
| Total effect | 100% clusters − 0% clusters | True launch impact, accounts for equilibrium effects |
| Spillover | Control users in 50% clusters − users in 0% clusters | How much untreated users are affected by nearby treated users |
| Interference bias | Within-cluster effect at 50% − total effect | How wrong naive user-level testing would be |
Non-zero spillover confirms interference and quantifies the bias you avoided.
3. Metrics
Primary metric: Trips per active user per week (or GMV per active user), aggregated at cluster-week level.
Why this formulation:
- Ratio of sums: (total trips in cluster) / (active users in cluster)
- Accounts for composition changes
- Analyzed at cluster level using t-tests or regression with cluster-level observations
Guardrail metrics:
- Demand side: wait time, completion rate, cancellation rate, price/surge levels
- Supply side: earnings per hour online, utilization rate, session length
- Platform health: support contact rate, incident reports
Statistical approach: Use cluster-level averages or user-level regressions with cluster-robust standard errors (never treat individual observations as independent).
4. Power Analysis Under Clustering
Key concept: Clustering inflates variance via the design effect:
DE = 1 + (m − 1) × ICC
where m = average cluster size, ICC = intra-cluster correlation (how similar users within a cluster are).
Example calculation:
Assumptions:
- 800,000 users across 320 clusters → m = 2,500
- ICC = 0.025 (typical for geographic user behavior)
- Baseline: 1.8 trips/user/week, SD = 2.4
Steps:
- Design effect: DE = 1 + 2,499 × 0.025 ≈ 63.5
- Effective sample: n_eff = 800,000 / 63.5 ≈ 12,600 (6,300 per arm)
- Minimum detectable effect: MDE = 2.8 × (2.4 / √6,300) ≈ 0.085 trips = 4.7% relative lift
- With CUPED: Using pre-period correlation r = 0.65, variance reduces by (1 − r²) = 0.58, bringing MDE down to roughly 3.5%
Critical insight: Power depends on number of clusters, not users. Adding users to existing clusters barely helps once m × ICC ≫ 1.
Duration: Minimum 4–5 weeks after 1-week ramp. Marketplace dynamics (supply rebalancing, user habit formation) need time to stabilize. Check weekly metrics for trend stabilization.
5. Variance Reduction
Pre-assignment:
- Stratified randomization: Pair clusters on pre-period volume, supply/demand ratio, and density. Randomize within pairs.
- Re-randomization: Generate multiple random assignments, pick the one with best covariate balance across 5–8 key metrics.
Analysis-stage:
- CUPED (Controlled-experiment Using Pre-Experiment Data): Regress outcome on 4-week pre-period cluster metrics, analyze residuals. Variance reduction typically 40–60%.
- Difference-in-differences: Compare post-pre changes between treatment and control as a robustness check.
Handling novelty:
- Plot daily or weekly treatment effects to detect decay.
- Exclude first 1–2 weeks as burn-in if novelty spikes are evident.
- Maintain a 5–10% long-term holdout to measure persistent effects after novelty fades.
Switchback-specific:
- Exclude first 20–30 minutes after each flip (carryover period).
- Test carryover by including lagged treatment assignment in your model.
6. Validation Checks
Before launch:
- A/A test: Run the cluster design with no feature change. Confirm false positive rate ≈ 5% and variance estimates match predictions.
- Balance checks: Verify pre-period metrics are similar across arms (both raw and after stratification).
During experiment:
- Sample ratio mismatch: Check that cluster and user counts match expected randomization ratios.
- Segment consistency: Verify effects don't flip direction across major user segments (suggests implementation bugs).
Interference diagnostics:
- Boundary analysis: Stratify users by distance to cluster edge. If treatment effect decays near boundaries, spillover is leaking.
- Cross-boundary activity: Measure what fraction of trips/transactions cross into opposite-treatment clusters. Aim for <10%.
- Control group stability: Compare control clusters against synthetic controls built from historical data. Drift suggests contamination.
- Supplier migration: Check if suppliers relocate toward treated areas.
Compliance:
- Measure exposure rate (feature impressions, version adoption).
- Report intent-to-treat (ITT) as primary.
- Estimate complier average treatment effect (CACE) using assignment as instrument: CACE = ITT / (exposure_treatment − exposure_control).
7. Design Under Excess Supply
If supply is effectively unlimited (low utilization, minimal wait times), demand-side interference largely disappears—one user's extra trip doesn't delay others.
Implications:
- User-level randomization becomes valid for demand-side features.
- Effective sample increases ~50–100×, MDE drops to <1%.
- Still use cluster randomization for supply-side features or anything affecting equilibrium pricing.
Verification:
- Don't assume unlimited supply; test it. Run a small saturation pilot.
- Check that wait times, surge rates, and supplier utilization remain flat as treatment intensity increases.
- If these metrics rise with saturation, you still have supply constraints and need cluster randomization.
Rollout Plan
Weeks −4 to −1: Build cluster partition, validate with historical data, run A/A test, collect 4 weeks pre-period data, form strata, finalize sample size.
Week 0: Pilot in 5% of clusters across 2 markets. Implement automated guardrail alerts (e.g., kill switch if wait time increases >8% or cancellations rise >1.5pp).
Weeks 1–6: Full experiment across all clusters with saturation arms included (70% full treatment, 20% partial, 10% control, exact allocation depending on power needs).
Week 7: Preliminary readout, check for novelty decay, decide on extension or launch.
Post-launch: Maintain 5% long-term holdout, monitor quarterly.
Common Mistakes to Avoid
- Analyzing individual users as independent when you randomized by cluster (severely underestimates variance).
- Ignoring ICC and planning sample size as if it were a simple A/B test.
- Assuming no interference without testing it.
- Randomizing users in a marketplace with constrained supply.
- Using too few clusters (<30 per arm risks low power and distribution assumption violations).
- Not excluding or measuring boundary effects.
Summary
Marketplace experiments require isolating interference through geographic or temporal clustering, validating containment with saturation designs, accounting for design effects in power calculations, and running extensive diagnostics. The key trade-off is between cleaner causal inference (larger clusters, fewer units) and statistical power (more clusters, tighter containment). A well-designed experiment balances both and produces credible, launch-ready estimates.