Marketplace Pricing Test with Supply-Demand Interactions
Statistics & ExperimentsModel answerLast updated
Design an experiment to test a pricing change in a two-sided marketplace where users interfere with each other through shared supply.
Context
You're working on a delivery platform where customers place orders and workers fulfill them. The platform wants to test a new incentive structure that pays workers more during busy periods to increase supply when demand is high.
The challenge: standard user-level randomization won't work because users share the same pool of available workers. If you give some workers higher pay, they'll accept orders that other workers would have gotten, contaminating your control group.
Your Task
Design an experiment to measure the true effect of this pricing change.
What to Address
Your experimental design should cover:
-
Randomization strategy: What unit should you randomize by, and what's your reasoning?
-
Market selection: How will you choose which markets get treatment versus control, given that markets differ in size, maturity, and baseline behavior?
-
Metrics: What's your primary success metric? What supporting and safety metrics would you track?
-
Validity threats: How will you account for systematic differences between markets, time-based patterns like seasonality, and the possibility that nearby markets influence each other?
-
Statistical approach: What analysis method will you use, and how will you calculate statistical significance with a small number of markets?
-
Feasibility: Estimate the minimum detectable effect, decide on experiment duration, and outline rollout stages.
-
Risk mitigation: What could go wrong, and how would you protect against it?
Provide a concrete experimental plan that an engineering team could implement.
Hints
Hint 1
Think about what defines a 'closed system' where interference stays contained within treatment units rather than leaking across them.
Hint 2
With market-level randomization, your sample size is the number of markets, not the number of users—this fundamentally changes power calculations.
Hint 3
You need an analysis method that removes both stable differences between markets and common time trends affecting all markets simultaneously.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer: Marketplace Pricing Experiment Design
Core Problem Recognition
The fundamental issue is interference (violation of the stable unit treatment value assumption). When workers in the same area compete for the same orders, treating some affects others:
- Higher-paid workers take orders that lower-paid workers would have gotten
- All customers benefit from improved supply, regardless of which worker serves them
- User-level treatment effects measure reallocation within the marketplace, not the system-level impact you'd see at launch
1. Randomization Unit: Geographic Markets
Recommendation: Randomize at the metro or regional market level.
Rationale:
- Interference happens within shared supply pools. Most workers operate in a defined geographic area
- Market-level randomization keeps spillovers inside the treatment effect, matching real launch conditions
- Define markets by analyzing worker activity—a good market boundary means 90%+ of worker hours happen within one market
Market definition process:
- Cluster zip codes or neighborhoods based on worker overlap
- Merge adjacent clusters with significant cross-border activity
- Validate that markets have sufficient volume (minimum ~500 orders/week for reasonable signal)
Alternative: Time-based switching (randomize by time period within each market) provides more statistical units but risks carryover effects if workers adjust their schedules.
2. Treatment and Control Selection
Matching approach:
-
Filter eligible markets: Exclude markets with planned launches, major events, or insufficient history
-
Collect pre-experiment features (8-12 weeks):
- Order volume and growth rate during target hours
- Worker supply metrics (active hours, acceptance rate)
- Fulfillment quality (on-time %, completion rate)
- Market characteristics (density, seasonality strength)
-
Create matched pairs using distance metrics on these features. Each pair has similar baseline characteristics.
-
Random assignment within pairs: Flip a coin to assign treatment vs control within each pair. This ensures balance while preserving randomness.
-
Balance check: Verify pre-period metrics are similar across treatment and control. If balance is poor under a pre-specified threshold, re-randomize once.
Why not synthetic control alone? Matching plus randomization gives you valid p-values from randomization inference. Synthetic control is useful as a robustness check but makes stronger modeling assumptions.
3. Metrics Framework
Primary metric: Total completed orders per market per week
Why total, not just peak-hour orders? You need to capture:
- Whether peak supply gains cannibalize off-peak supply (workers shift timing)
- Whether customers shift order timing in response
- The full marketplace-level effect
Mechanism diagnostics:
- Worker supply: active workers during target hours, newly activated/reactivated workers
- Worker behavior: batch acceptance rate, time-to-accept, earnings per hour
- Demand-side: customer conversion rate, delivery time estimates, unfulfilled demand signals
- Timing shifts: off-peak order volume and supply levels
Guardrail metrics:
- Economic: cost per order, contribution margin, incentive spend versus budget
- Customer experience: late rate, cancellation rate, satisfaction scores
- Worker experience: retention, satisfaction, support ticket rate
4. Analysis Method: Difference-in-Differences
Why DiD: It removes two sources of bias simultaneously:
- Market fixed effects remove stable differences (large vs small markets, urban vs suburban)
- Time fixed effects remove common shocks (holidays, weather, national trends)
Specification:
log(orders_mt) = β₀ + β_market[m] + β_time[t] + β_treatment × Treatment_mt + ε_mt
Where:
mindexes markets,tindexes time periods (weeks or days)- Treatment_mt is 1 for treated markets during the treatment period
- β_treatment is your causal estimate
Enhanced specification:
- Add pair × time interactions to fully exploit the matched-pair design
- Include pre-period market averages as covariates (CUPED adjustment) to reduce variance
- Use log-transformed outcomes so effects are interpretable as percentages and large markets don't dominate
Validation: Event study
Run the model with separate coefficients for each week relative to treatment start:
log(orders_mt) = ... + Σ β_k × Treatment_m × Week_k + ...
Pre-treatment coefficients (k < 0) should be near zero, confirming no pre-existing trends. Post-treatment coefficients show the time path of effects.
5. Statistical Inference with Few Clusters
The challenge: With only 10-20 market pairs, standard cluster-robust standard errors can be unreliable.
Solutions:
-
Randomization inference: Since you randomized within pairs, enumerate all possible treatment assignments within pairs, compute the DiD estimate for each, and see where your actual estimate falls in this distribution. This gives you an exact p-value with no distributional assumptions.
-
Wild cluster bootstrap: Resample at the market level while preserving the correlation structure within markets.
-
Conservative inference: Report both standard cluster-robust SEs and randomization-based p-values.
6. Power and Minimum Detectable Effect
Empirical power calculation:
- Take historical data from before the experiment
- Simulate your matching procedure and random assignment
- Run placebo DiD regressions (pretending some historical period was "treated")
- Repeat 1000+ times to get the distribution of estimates under the null
- Standard deviation of these estimates ≈ your standard error
- MDE ≈ 2.8 × SE (for 80% power, 5% significance)
Example: With 16 matched pairs and typical within-market variability, you might detect a 2-3% change in orders with 80% power over 4 weeks.
Improving power:
- More pairs (most impactful but often limited)
- Better matching (reduces noise)
- Longer duration (diminishing returns due to autocorrelation)
- CUPED adjustment (can reduce variance by 20-40%)
7. Experiment Plan
Phase 1: Pilot (1 week, 1-2 markets)
- Validate technical implementation
- Confirm logging and worker communications work
- Check for operational issues
- Not used for statistical inference
Phase 2: Main experiment (4-6 weeks, 12-20 market pairs)
- Full randomized rollout across selected markets
- Monitor daily for data quality and extreme outcomes
- Collect at least 3-4 weeks of post-period for stable estimates
Phase 3: Analysis
- Run primary DiD analysis at week 4
- Validate with event study and robustness checks
- If significant, continue 2 more weeks to confirm sustained effects
8. Risks and Mitigation
Geographic spillover: Workers or customers near market boundaries could create cross-market interference
- Mitigation: Add buffer zones between treatment and control markets, or treat neighboring markets as single units
Concurrent changes: Other product changes or marketing campaigns in some markets
- Mitigation: Coordinate with other teams, track external changes, exclude affected markets or control for changes in the model
Novelty effects: Initial worker excitement that fades over time
- Mitigation: Run for 4+ weeks, examine time trends in the event study, weight later weeks more in decision-making
Market heterogeneity: Treatment effects might vary by market type (large/small, mature/new)
- Mitigation: Examine subgroups post-hoc, but avoid cherry-picking. If you suspect heterogeneity upfront, stratify randomization and pre-specify subgroup analyses.
Partial compliance: Technical issues causing incomplete treatment delivery
- Mitigation: Monitor treatment delivery rates, report both intent-to-treat and per-protocol analyses
Common Mistakes to Avoid
- Focusing only on peak-hour metrics and missing cannibalization from other time periods
- Using the number of users as sample size when you have market-level randomization
- Ignoring pre-trends between treatment and control markets
- Not accounting for autocorrelation when calculating standard errors
- Making launch decisions on week 1 data before effects stabilize
The key insight: with network effects, your experiment must randomize at the network level and your analysis must account for limited clusters and systematic differences across those clusters.