Diagnose a Dinner-Peak Order Slump and Design a Supply Experiment
Statistics & ExperimentsModel answerLast updated
Decompose a sudden completed-order drop in a delivery marketplace, isolate the supply-side driver, and design a rigorous experiment to validate and fix it.
Context
You work as a data scientist at a food-delivery platform. Comparing the week of Aug 25 to the week of Aug 18, completed orders in your largest metro fell 12% week-over-week. Before you escalate, you pull together the following early signals:
| Signal | Aug 18 week | Aug 25 week |
|---|---|---|
| Sessions | baseline | +4% WoW |
| Orders created | baseline | +1% WoW |
| Courier assignment success rate | 94% | 88% |
| p95 estimated delivery time | 42 min | 58 min |
Cancellations: reason = no_courier | 1.5% | 5.8% |
Restaurant availability, menu pricing, and marketing spend are all unchanged. The degradation is concentrated in the 6 PM – 9 PM window.
What you are asked to do
Part A — Diagnosis
Walk through the full fulfillment funnel:
session → order_created → assigned → picked_up → completed
- Quantify each stage's contribution to the −12% using the numbers above, and identify what's still unexplained.
- Specify the exact segmentation cuts (time-of-day, geography, courier density, restaurant type, distance, incentive level) you would apply.
- List the sanity checks you would run before committing to a supply-side hypothesis — instrument failures and config changes can mimic supply shocks.
- Define the additional supply metrics you would compute and the specific thresholds that would confirm supply as the primary bottleneck.
Part B — Experiment design (RCT)
Assuming supply shortage during the dinner peak is your leading hypothesis, design a randomized test of a targeted courier incentive or delivery-fee adjustment.
Cover:
- Experimental unit and randomization strategy, including how you handle interference (couriers moving between zones)
- Primary metric, secondary metrics, and guardrails
- Success criteria with concrete thresholds
- Power / MDE calculation and required sample size, with assumptions stated
- Test duration and ramp plan
- How you account for seasonality
Part C — Quasi-experimental fallback
If a clean RCT isn't feasible (insufficient geo units, business constraints), describe a quasi-experimental design using comparable markets — for example, a difference-in-differences or synthetic control approach.
- Which comparison markets would you use and why?
- What pre-trend checks are required before trusting the estimate?
- What robustness tests would you run afterward?
Provide a concrete checklist for either path (RCT or quasi-experiment) that another analyst could follow without ambiguity.
Interviewers care about: arithmetic-first decomposition, ruling out instrumentation issues before theorizing, awareness that supply problems can suppress demand metrics, and honest sizing of experiments under marketplace interference.
Hints
Hint 1
Start by doing the multiplication: apply the accept-rate drop and the no_courier cancel-rate increase to the creation baseline, check what fraction of the −12% that accounts for, and name what's left. The residual points directly to where else to look.
Hint 2
Before concluding 'supply shortage,' ask whether a logging bug, a dispatch config change, or a courier-app release could produce the same fingerprint. A deploy log and event-volume parity check take five minutes and can save you from designing an expensive experiment for the wrong problem.
Hint 3
Geo-cluster randomization solves interference only partially — couriers cross zone boundaries. Build buffer zones between treatment and control, and track courier inflow (share of treated-zone deliveries by couriers whose home zone was control) as a guardrail, not an afterthought.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Step 0: Reconcile the arithmetic first
Before slicing data, check whether the reported numbers actually account for the −12%. Work through the funnel multiplicatively:
| Funnel stage | Change | Multiplier |
|---|---|---|
| Order creations | +1% | 1.010 |
| Assignment rate 94% → 88% | −6.4% | 0.936 |
no_courier cancels 1.5% → 5.8% of assigned | ~−4.4% | 0.956 |
| Combined | ≈ −9.6% |
That leaves roughly 2.4 percentage points unexplained. The most natural candidate is customer-initiated cancels after seeing a quoted ETA jump from 42 to 58 minutes — itself a symptom of supply scarcity, not a separate demand problem. Session-to-creation conversion also softened slightly (+4% sessions, only +1% creations), consistent with longer ETAs deterring checkout rather than a true demand collapse.
One thing to clarify with the interviewer upfront: does "assignment rate" mean courier acceptance of an offer, or the platform successfully finding a courier? The answer changes where the fix lives.
Part A — Diagnosis
Funnel segmentation cuts
Compute every stage conversion for both weeks, then cut by:
- Hour — treat 18:00–21:00 vs. the rest of the day as the key contrast; if the drop is concentrated there, that's a dinner-peak supply event, not a structural change
- ZIP / starting-point cluster — supply shortages are geographically uneven
- Courier density tercile — active courier-hours per km² in the prior week
- Restaurant category — fast food vs. full-service (longer prep times amplify courier wait, worsening utilization during scarcity)
- Distance bands — 0–2, 2–4, 4–6, 6+ miles; scarcity hits long-distance orders first
- Incentive / surge level — none, low, high; no-surge ZIPs should show the stearest supply drop
Sanity checks before building a causal story
- Deploy and config log. Look for changes to the dispatch algorithm (assignment radius, batching rules, offer-timeout settings) or courier-app releases overlapping the drop date. Overlay these on the daily
no_couriercancel series. - Cancel-reason taxonomy. Confirm the same client-side enum value still maps to
no_courier. A logging change can inflate a reason's share without any real operational shift. Compare cancel totals, not just reason shares. - Event-volume parity. Server-side order counts vs. client events vs. payments ledger vs.
completedcount — all four should agree within a fraction of a percent. - Geofence integrity. Confirm no ZIPs were added to or removed from the "metro" definition.
- Ground-truth reconciliation. Completed orders vs. merchant payouts from the same period.
Failing any of these is a higher-priority explanation than a supply shock and must be cleared first.
Supply metrics to add
- Active courier-hours (online + dashing) by hour × ZIP, and unique active couriers
- Supply/demand ratio: courier-hours per created order
- Courier utilization: fraction of online time spent actively delivering
- Time-to-first-assign and number of offers per order (p50 / p95)
- Courier earnings per hour and peak-pay coverage percentage
- Courier churn (deactivations + inactive this week but active last week) and new activations — late August is a plausible churn window due to back-to-school schedules and competitor pay changes
Thresholds that confirm supply as the bottleneck
- Dinner-peak courier-hours down ≥ 8% WoW while creations are flat → supply/demand ratio falls ≥ 10%
- Courier utilization above ~85% and time-to-assign p50 more than doubled during 18–21, with little change off-peak
- Supply-attributable stages (assignment failure +
no_couriercancels + ETA-induced checkout drop) collectively explain ≥ 70% of the funnel loss - Dose-response at ZIP level: a regression of Δcompleted on Δcourier-hours across ZIPs shows a significant positive slope — this is the strongest single diagnostic
- Sessions with unchanged quoted ETA maintain flat conversion (±1%), ruling out an independent demand shift
Minimal deliverables
- Funnel waterfall table showing each stage's WoW contribution to −12%
- Hour × day heatmap of the supply/demand ratio and
no_courierrate, both weeks - ZIP-level scatter of Δcourier-hours vs. Δcompleted with a fitted slope
- Eight-week daily cancel-reason time series with deploy markers overlaid
- Checkout conversion broken out by quoted-ETA bucket, to separate ETA-driven suppression from genuine demand loss
Part B — RCT Design
Hypothesis. Dinner-peak courier supply fell. Targeted peak pay from 17:30–21:00 restores completed orders at acceptable cost.
Unit and randomization
Geo clusters (groups of ~3–5 contiguous ZIPs) are the right unit — not individual orders or couriers, since couriers move fluidly across small geographies. For a metro like LA, roughly 40 starting-point clusters are available, giving ~20 per arm.
Stratify clusters on pre-period dinner-peak volume, supply/demand ratio, and the magnitude of the WoW drop, then randomize within matched pairs. This reduces variance substantially.
Interference: treated-cluster incentives attract couriers away from control clusters, understating the true treatment effect. Mitigate by:
- Designating buffer ZIPs between treated and control clusters and excluding them from analysis
- Measuring courier inflow as a guardrail: if >15% of treated-cluster deliveries are completed by couriers whose home cluster is control, the SUTVA violation is material and the estimate is biased upward
A switchback (cluster × time-slot randomization) gives more statistical units but introduces carryover if couriers plan their shifts around advertised pay. Use it only if you can enforce a 24-hour washout and verify no scheduling response.
Metrics
- Primary: completed orders per cluster, 17:30–21:00 local time
- Secondary:
no_couriercancel rate, assignment rate, time-to-assign p95, active courier-hours - Guardrails: cost per incremental order (must stay below contribution margin), off-peak completed orders (to catch couriers time-shifting rather than adding hours), control-cluster completed orders (spillover harm), late-delivery and defect rates, merchant wait time
Success criteria
All must hold simultaneously:
- Primary lift ≥ 5%, 95% CI excludes zero
no_courierrate falls below 2.5%- Cost per incremental order < Finance-supplied contribution margin threshold
- No guardrail degrades more than 1 percentage point
Power calculation
Assume cluster-level WoW dinner-peak log-completed-orders has a between-cluster SD of ~8% before any variance reduction. Using 4 pre-period weeks with CUPED brings that down to roughly σ ≈ 4%.
With 20 clusters per arm and one week of data:
MDE = (z_0.975 + z_0.80) × σ × √(2/n)
= 2.8 × 0.04 × √(2/20)
≈ 3.5%
The target is recovering at least half the 12% drop (~6%), so this design is adequately powered. Use cluster-robust standard errors or randomization inference — order-level SEs will be badly anti-conservative.
Duration and ramp
- Minimum duration: two full weeks so every weekday dinner peak appears twice and courier behavior stabilizes past initial novelty
- Ramp: 2 pairs on days 1–2 (logging and budget checks), expand to 5 pairs on days 3–5, full scale from day 6
- Seasonality: anchor comparison to the same weekdays and hours; avoid weeks containing major holidays or local events
Part C — Quasi-Experimental Fallback
If geo clusters are too few or business constraints prevent withholding incentives, use a difference-in-differences (DiD) design with comparable SoCal metros (San Diego, Riverside, Orange County) as the control group.
Why these markets: similar cuisine mix, similar courier demographics, no plausible reason to share LA's specific supply shock (e.g., a local competitor pay change, a college semester start in LA).
Pre-trend checks (required before trusting the estimate)
- Plot dinner-peak completed orders for LA and each candidate control market for 8+ weeks pre-shock; visually inspect and test for parallel trends using a dynamic DiD specification
- Confirm no concurrent treatment (new promotions, courier campaigns) in control markets during the study window
- Check that seasonal patterns (summer-to-fall shift, back-to-school) affect all markets similarly
Analysis checklist
- Build a balanced panel: metro × week × hour-band (dinner-peak vs. off-peak), 8 pre-weeks + 2 post-weeks
- Estimate:
completed ~ treated × post + metro_FE + week_FE + ε; cluster SEs at metro level - Report the dynamic event-study plot (one coefficient per pre- and post-week); pre-period coefficients should be jointly indistinguishable from zero
- Robustness tests: (a) drop each control metro one at a time, (b) placebo test using off-peak hours as a pseudo-outcome, (c) synthetic control as an alternative estimator — compare point estimates across all three
- If DiD and synthetic control estimates align within ~2pp, the result is credible; large divergence requires explaining which assumption is more plausible
Common mistakes to avoid
- Treating order-level metrics as independent observations when testing at the geo level — always aggregate to the unit of randomization first
- Claiming supply is the cause from funnel position alone without ruling out instrumentation issues
- Ignoring courier time-shifting (incentives that move hours rather than add them look like supply increases but don't actually raise capacity)
- Under-powering by computing sample size from a t-test on orders rather than on clusters