Two-Sided Platform Experiment Design
Statistics & ExperimentsModel answerLast updated
Design an A/B test for a pricing intervention in a ride-sharing platform, addressing network effects, spillover, and marketplace-specific metrics.
Problem Context
A ride-sharing platform wants to test a new pricing mechanism that adjusts fares based on real-time supply-demand imbalances during busy periods. Your team needs to design an experiment that accurately measures the impact while accounting for the unique challenges of marketplace testing.
Your Task
Design a rigorous experiment to evaluate this pricing change. Address the following:
-
Metrics: Define a primary success metric appropriate for this two-sided platform. Identify guardrail metrics that protect both riders and drivers from unintended harm.
-
Randomization Unit: Determine whether to randomize by individual riders, individual drivers, geographic regions, or time periods. Justify your choice by analyzing how different units handle interference between experimental groups.
-
Handling Heterogeneity: If you randomize geographically across multiple markets, some will be dominated by commuter traffic (predictable weekday peaks) while others serve tourist or entertainment districts (weekend and event-driven demand). Explain how you would account for these differences when measuring the treatment effect.
What to Include
- Reasoning for your randomization approach, including trade-offs
- At least three specific guardrail metrics with justification for each
- Methods to control for market heterogeneity in your analysis
- Awareness of common pitfalls in marketplace experiments
Hints
Hint 1
In a shared marketplace, changing one user's experience can affect other users through the same pool of drivers—consider what this means for standard A/B testing assumptions
Hint 2
The metric denominator matters: if higher prices reduce requests, measuring 'completed/requested' might show artificial improvement even when fewer riders are being served
Hint 3
Geographic or temporal randomization trades sample size for validity—think about what you're actually estimating with each approach
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
1. Metric Selection
Primary Metric: Peak-Period Request Fulfillment Rate
Define this as (completed trips) / (rider sessions with booking intent) during high-demand windows. A "session with intent" means the rider opened the app and viewed pricing, whether or not they requested.
Why this metric:
- The pricing change aims to balance supply and demand, so fulfillment directly measures market-clearing effectiveness
- Using sessions rather than requests as the denominator is critical: higher prices suppress requests, so "trips per request" would mechanically increase even if riders are simply priced out and overall welfare decreases
- An alternative primary metric is total trip volume during peak hours, which captures whether the intervention grows the overall market
Guardrail Metrics:
For a two-sided marketplace, monitor both sides, multiple time horizons, and equity:
-
Rider wait time (median and 90th percentile): The pricing mechanism should improve driver availability. If wait times worsen, supply isn't responding to price signals as intended.
-
Rider session-to-request rate and cancellation rate: These measure demand destruction. Sharp drops indicate riders are being priced out rather than matched efficiently. This protects against optimizing fulfillment by eliminating price-sensitive demand.
-
Driver earnings per active hour and utilization rate: Drivers are the supply side. If earnings decline despite higher prices, or if paid time as a fraction of online time drops, you'll see supply attrition in future weeks.
-
Geographic spillover - supply levels in adjacent zones: Dynamic pricing can pull drivers from neighboring areas, harming riders outside the experimental zone. Monitor driver density in bordering regions.
-
Longer-term retention - rider 28-day active rate and trip frequency: Short-term metrics can miss churn from price sensitivity or negative experiences. Track whether cohorts exposed to the new pricing return at normal rates.
-
Extreme-pricing events and support contacts: Capture pricing that triggers complaints, regulatory risk, or PR issues (e.g., surge during emergencies). Set absolute caps in addition to relative monitoring.
Pre-specify acceptable bounds for each guardrail (e.g., "driver hourly earnings cannot decrease by more than 3%") to prevent post-hoc rationalization.
2. Randomization Strategy
Why Individual-Level Randomization Fails:
Riders and drivers operate in a shared supply pool, violating the Stable Unit Treatment Value Assumption (SUTVA). Consider what happens with rider-level randomization:
- Treatment riders see higher prices; some decline to ride
- The drivers they would have used become available to control riders
- Control riders experience improved wait times and availability
- The measured "control" group is contaminated by treatment spillover
You're measuring within-market reallocation, not the effect of a full deployment. Driver-level randomization has symmetric problems—treatment drivers earning higher fares will reposition, changing availability for everyone.
Recommended Approach: Temporal or Geographic Clustering
Option A - Switchback Design (if testing within one market): Alternate the entire city or large zones between treatment and control in randomized time blocks (e.g., 45-60 minute intervals during peak periods). All participants experience the same regime simultaneously, eliminating cross-contamination.
Option B - Geographic Randomization (if multiple markets available): Assign entire cities or large self-contained regions to treatment or control. Cluster boundaries should be drawn using historical data on driver movement patterns to minimize cross-boundary trips.
Trade-off Analysis:
| Dimension | Individual-level | Cluster/temporal |
|---|---|---|
| Validity | Biased due to interference | Unbiased for global effect |
| Statistical power | High (large sample sizes) | Low (few independent units) |
| Variance | Low | High (cluster noise, weather, events) |
| User experience | Inconsistent (friends see different prices) | Consistent within cluster |
| Runtime | Shorter | Longer to achieve significance |
Justification: Accept lower power and higher variance to obtain an unbiased estimate of the policy you'll actually deploy. A precise estimate of an artifact (within-market reallocation) is less valuable than a noisy estimate of the true global effect.
3. Handling Geographic Heterogeneity
Markets differ in key characteristics: business districts have price-inelastic commuter demand with weekday peaks, while tourist areas have elastic leisure demand with weekend and event-driven patterns. These differences affect both baseline metrics and treatment response.
Design-Stage Solutions:
Stratified randomization: Group cities by characteristics (commuter vs. leisure trip share, baseline supply-demand ratio, market size) and randomize within strata. With small numbers of clusters, use matched-pair randomization: pair similar cities on pre-period covariates and randomize one to treatment within each pair. This guarantees covariate balance that simple randomization cannot achieve with few units.
Analysis-Stage Solutions:
Difference-in-differences with pair fixed effects: For matched designs, compute the within-pair difference between treatment and control, then average across pairs. This removes all time-invariant pair-level heterogeneity.
Synthetic control: For each treatment city, construct a weighted combination of control cities that reproduces its pre-period trajectory on the primary metric. The treatment effect is the post-period divergence from this synthetic counterfactual. Validate the approach with placebo tests (applying the method to pre-period data where no effect should exist).
Regression adjustment (CUPED): Use pre-period metric values as covariates to reduce variance. The adjustment removes the portion of each city's outcome that's predictable from its baseline, increasing precision without bias.
Interpretation-Stage Solutions:
Report heterogeneous treatment effects by market type. The average effect may mask that the intervention helps business districts but harms tourist markets (or vice versa). Interact treatment with market-type indicators or continuous measures like commuter trip share.
If planning a global rollout, reweight stratum-specific effects to match the population of markets you'll actually deploy to.
Statistical Inference: With few clusters, use randomization inference (computing the test statistic under all possible treatment assignments) or wild cluster bootstrap rather than standard t-tests, which assume large-sample normality that doesn't hold with 10-20 cities.
Common Mistakes to Avoid
- Volume-based metrics without denominators: Using trip count or gross bookings, which mechanically increase with price even when fewer riders are served
- Ignoring one side of the marketplace: Only monitoring rider metrics while driver earnings or retention decline
- Power calculations based on individual variance: With cluster randomization, the effective sample size is the number of clusters, not riders
- Proposing user-level randomization with "we have millions of users" as justification: Sample size doesn't solve interference
- Post-hoc covariate adjustment only: Imbalance with few clusters requires design-stage solutions like matching
- Ignoring carryover in switchback designs: Drivers repositioned during a treatment block remain out of position at the start of the next block; add buffer periods or model carryover explicitly
Additional Considerations
If spillover between geographic clusters is unavoidable (drivers regularly cross boundaries), consider:
- Data-driven cluster boundaries using network analysis of historical trip and repositioning flows
- Buffer zones excluded from analysis
- City-wide switchbacks that eliminate spatial spillover entirely
- Quantifying residual interference using exposure-mapping models
For power analysis with clustered designs, use simulation based on historical between-cluster variance or pilot data, not individual-level variance inflation.