Diagnose a Sudden Order Decline in a Single Metro
Statistics & ExperimentsModel answerLast updated
Walk through a full investigation of a completed-order drop in one city, from data validation to funnel decomposition to designing a marketplace experiment.
Scenario
A two-sided food delivery platform notices a meaningful drop in completed orders concentrated in a single major city. You are the data scientist assigned to figure out what happened and what to do about it.
Your answer should cover four areas.
1. Validate and scope the drop
Before theorizing, explain what you would check to confirm the decline is real and correctly measured. What data integrity issues could create a false signal? How would you determine whether this is isolated to one city, one platform, or one customer segment?
2. Decompose the funnel
Break completed orders into a chain of measurable steps — from app sessions down to completed deliveries — and explain how you would attribute the overall change across those steps. Consider both user-side funnel metrics and marketplace supply constraints (merchant availability, courier coverage, delivery time estimates, cancellations, etc.).
3. Generate hypotheses
For each of the following components, propose at least one concrete hypothesis and describe what data you would use to confirm or rule it out:
- Customer demand
- Merchant supply
- Courier/driver supply
- Product and reliability
- External factors (seasonality, pricing, competition, regulation)
4. Design an experiment
Suppose your investigation points to one root cause: merchants are spending fewer hours online per day, especially during peak meal times. The business proposes an incentive program to bring merchants back online. Design an experiment to test whether it works.
Your experiment design should address:
- What the right randomization unit is, and why merchant-level randomization creates a bias problem
- Why a within-merchant switchback design is not appropriate here
- Whether a geo-level or cluster-level holdout is better, and how you would limit interference between groups
- What your primary, secondary, and guardrail metrics are
- Eligibility criteria, treatment assignment, and how long to run the experiment
- How you would approach power analysis or minimum detectable effect sizing
- What you would conclude if merchant online time goes up but completed orders do not
Hints
Hint 1
Start by separating signal from noise: before any hypothesis, ask whether the metric itself can be trusted. Logging changes, timezone shifts, or a changed order-status definition can mimic a real decline.
Hint 2
Think of the funnel in two layers: the user-side steps (session → search → menu view → cart → checkout → attempt → completion) and the supply-side constraints that set the ceiling on each step. A drop in merchants-per-session will hurt conversion even if user intent is unchanged.
Hint 3
The core experiment-design challenge is interference. On a two-sided marketplace, treated and control merchants share the same customers and couriers, so a merchant-level A/B test measures redistribution, not net lift. Ask what unit of randomization minimizes cross-group spillover.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Step 0: Validate the signal
The first move is to make sure you are investigating a real drop and not a measurement artifact.
Check the data pipeline: look for changes in logging, a redefined "completed" status, timezone handling bugs, test orders leaking into production counts, or a delay in event ingestion. Run a sanity check against payment processor data — if card charges match the order count decline, the drop is real.
Then scope it precisely:
- Geography: Is it all of the city or specific delivery zones? A cluster in one part of town suggests a localized supply or incident issue; a city-wide drop suggests demand, pricing, or a platform change.
- Platform: iOS vs. Android vs. web. A platform-specific drop points to a bad release.
- Timing: Abrupt or gradual? An abrupt drop that correlates with a specific hour or date points to a deployment, an incident, or a policy change. A gradual decline over weeks points to competitive pressure, supply erosion, or churn.
- Segment: New vs. returning customers, subscription vs. non-subscription, cuisine category, price tier. A mix-shift — more low-converting new users — can drag down the aggregate rate without any individual segment worsening.
Step 1: Funnel decomposition
Write completed orders as a chain of multiplied rates:
Completed orders = Sessions × (Search/Session) × (Menu view/Search) × (Add-to-cart/Menu view) × (Checkout/Cart) × (Attempt/Checkout) × (Completion/Attempt)
Compute each conversion rate for the affected period versus an equivalent baseline. Use log decomposition to attribute the total change: the log change in the outcome equals the sum of the log changes in each factor, so you can quantify which step explains most of the gap.
Overlay supply constraints at each stage, because supply limits set the ceiling on conversion:
- Selection: How many merchants are online and within the delivery radius when a user opens the app? If that count falls, menu views and conversions fall even if demand is unchanged.
- Delivery time and fee: Courier shortages lengthen quoted ETAs and trigger radius shrinking, both of which suppress purchase intent.
- Fulfillment: Merchant acceptance rate, item stockout rate, and cancellation rate (by initiating party) all affect whether an attempted order actually completes.
- Incidents: Cross-reference with the incident log and status page for outages, payment processor failures, or search/ranking issues.
Heuristic shortcuts:
- Sessions fell, conversion held → demand or external cause.
- Sessions held, merchants-per-session or menu views fell → supply cause.
- Attempts held, completions fell → fulfillment or ops cause.
Step 2: Hypotheses by component
Customer demand: Promo budget was cut or a discount expired, reducing purchase frequency among promo-sensitive users. Check promo spend, the share of orders using a code, and cohort retention for users who were heavily promo-driven.
Merchant supply: Merchants are spending fewer hours online, especially at lunch and dinner peaks. Check online-minutes time series by hour, the count of active merchants per session, and whether specific high-volume merchants deactivated or reduced hours.
Courier supply: Pay changes or a competing platform pulled drivers away, lengthening ETAs and shrinking the effective delivery radius. Check active Dasher hours, utilization rate, median quoted ETA over time, and the frequency of radius-restriction events.
Product and reliability: A recent release degraded a specific funnel step. Check conversion rate by app version and platform, JavaScript error rates, payment decline rates, and crash logs.
External: Seasonal demand shift, an unusual weather event, a competitor promotional campaign, or a local regulatory change (delivery fee caps, driver pay floors). Compare year-over-year, look at other cities as a control, and check market-share panels or credit-card spend data if available.
Step 3: Experiment design for a merchant online-time incentive
Why merchant-level A/B testing is biased
If you randomly assign half of merchants to receive an incentive, treated and control merchants compete for the same pool of customers and the same couriers. A treated merchant that goes online an extra two hours may simply capture orders that would have gone to a nearby control merchant. The measured lift overstates — possibly fabricates — a net marketplace benefit. This is the classic interference problem in two-sided markets.
Why a within-merchant switchback does not work here
Switchback designs flip a unit between treatment and control on short intervals (days or even hours). That works when behavior resets quickly between periods. It fails here because:
- Merchant hours are set by staffing schedules and kitchen planning made days in advance. They cannot realistically toggle on a daily or sub-daily basis.
- An incentive offer is a forward-looking commitment. Once a merchant plans around it, there is carryover into nominally "control" periods.
- Rapidly toggling the offer creates confusion and fairness concerns.
Geo-cluster holdout (preferred)
Partition the city into delivery-zone clusters by minimizing cross-cluster order flow — use graph clustering on historical customer-to-merchant order pairs, or lean on existing operational sub-markets. Randomize clusters to treatment or control, so every eligible merchant in a treated cluster receives the offer. Interference is now contained within clusters rather than crossing the treatment boundary.
To reduce residual spillover:
- Create buffer zones at cluster boundaries and exclude merchants in those zones from the primary analysis.
- Measure cross-cluster order share and target under 5–10%.
- Stratify or pair-match clusters on baseline orders per day, merchant online minutes, and courier supply before randomizing to ensure balance.
- Monitor courier movements across zones, since drivers roam and can transfer supply between clusters.
Metrics
- Primary: completed orders per cluster-day. Gross order value (GOV) is a natural co-primary.
- Mechanism (first stage): merchant online minutes per day, especially peak-hour minutes. If the first stage shows no effect, the incentive did not work as intended and the outcome question is moot.
- Secondary: merchants available per session, session-to-order conversion rate, median quoted ETA, share of new-customer orders, and merchant retention after the incentive period ends.
- Guardrails: merchant acceptance rate, item stockout rate, prep time and Dasher wait at pickup, order defect rate and customer ratings, incentive cost per incremental order, and contribution margin impact.
Eligibility, assignment, and duration
Include merchants that were active in the prior 30 days and are below a target threshold for online minutes (the population the incentive is meant to move). Exclude merchants that recently joined, since their behavior is volatile and unrepresentative. Randomize clusters, not merchants, at the start of the experiment and do not re-randomize. Run for a minimum of four weeks to capture at least two full weekly cycles and smooth out day-of-week variation; extend to six weeks if cluster sizes are small.
Power analysis
The unit of analysis is the cluster, so power depends on the number of clusters and the variance in cluster-level daily orders. Estimate the intracluster correlation from historical data. If clusters are large and few (say, eight to twelve zones), power is limited and the minimum detectable effect will be coarse — be explicit about this with stakeholders before launching. You can increase effective degrees of freedom by using cluster-day as the unit with cluster and day fixed effects in the regression.
Interpreting a null order result despite a positive online-minutes result
This is a meaningful finding, not a failure. It likely means one of the following:
- The merchants who came online are not the binding constraint. Courier supply or customer demand is the actual bottleneck.
- Merchants came online at off-peak hours that do not shift conversion meaningfully.
- The incremental merchant supply cannibalized other merchants rather than serving unmet demand — the market was already saturated in those windows.
In any of these cases, the right follow-up is to segment the online-minutes gain by hour and overlay it against unfulfilled demand signals (search sessions with no merchant available, high-ETA events) to identify whether there is a genuine unmet-demand window the incentive missed.