Diagnosing and Testing Solutions for Food Temperature Issues
Statistics & ExperimentsModel answerLast updated
Design metrics, isolate root causes, and run an experiment to address customer complaints about meals arriving cold at delivery.
Context
A food delivery platform has seen a sharp increase in customer reports that meals arrive cold. You have detailed operational data: order timestamps, courier location traces, restaurant preparation logs, weather conditions, and customer feedback.
Your Task
Develop a framework to understand and address this quality issue:
-
Metric Definition: Create a primary metric that captures when food arrives colder than acceptable. How would you confirm this metric actually reflects customer satisfaction?
-
Root Cause Analysis: Determine whether the problem originates in the restaurant kitchen or during the delivery journey. What data would you examine and how would you segment it?
-
Experiment Design: You want to test a new requirement: couriers must photograph their insulated delivery bag before they can accept orders. Design an experiment to measure whether this reduces cold-food complaints.
- What is the correct unit of randomization?
- How do you prevent interference between treatment and control groups when couriers compete for the same orders?
- What guardrail metrics ensure this intervention doesn't harm the platform?
Constraints
- Orders volume is high in each market
- Weather and geography vary significantly across regions
- Prioritize practical, implementable analysis over theoretical perfection
Hints
Hint 1
Break the delivery journey into distinct stages with clear timestamps to pinpoint where delays occur
Hint 2
Consider that couriers in treatment and control groups compete for the same pool of orders, creating spillover effects
Hint 3
The intervention only affects in-transit temperature retention, not kitchen prep or handoff delays
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
This problem evaluates your ability to operationalize vague complaints, diagnose multi-stage processes, and design rigorous experiments in two-sided marketplaces.
1. Metric Definition
Primary outcome: cold-food complaint rate per 1,000 completed orders, tracked at the city-day level.
Count a complaint when:
- Support tickets are tagged with cold/temperature categories
- Refund reasons indicate temperature issues
- Free-text feedback is classified as temperature-related (validate the classifier on 300-500 hand-labeled examples to measure precision/recall)
Since complaints are noisy and depend on customer propensity to report, add a proxy metric: total exposure time.
- Exposure time = delivery completion timestamp − restaurant ready timestamp
- Standardize this into a delivery speed ratio: actual exposure ÷ predicted exposure
- Predicted exposure comes from a model incorporating distance, traffic patterns, hour of day, and courier vehicle type
- Track the percentage of orders exceeding 1.4× predicted exposure
Validation approach:
-
Dose-response relationship. Segment orders by exposure time quartiles. Complaint rates and average ratings should worsen monotonically as exposure increases.
-
Business impact. Compare customers who complained about cold food to matched customers with similar order patterns. Cold-complaint customers should show measurably lower 30-day retention and higher refund costs.
-
Within-customer consistency. For customers with multiple orders, their cold-flagged orders should have lower ratings than their normal orders, controlling for individual complaint tendencies.
-
Regional calibration. Establish baseline expectations separately for each market and season, adjusting for local weather. A given exposure time in Miami summer versus Chicago winter has different implications.
2. Root Cause Analysis
Decompose each order into phases:
| Phase | Start → End | Diagnostic Signal |
|---|---|---|
| Kitchen prep | Order placed → Food marked ready | Kitchen speed; food is hot but late |
| Shelf wait | Ready → Courier at restaurant | Assignment inefficiency; food cools waiting |
| Pickup delay | Courier arrives → Pickup scan | Restaurant wasn't actually ready |
| In-transit | Pickup → Courier at address | Route, batching, vehicle type |
| Final handoff | At address → Delivered | Building access, customer availability |
Three complementary analyses:
-
Regression attribution. Model complaint probability against duration of each phase, controlling for:
- Weather temperature
- Food heat sensitivity (soup vs. salad)
- Batched delivery indicator
- Vehicle type (bike/car/scooter)
- Include restaurant, courier, and market-week fixed effects
- Compare variance explained by restaurant effects versus courier effects
-
Concentration analysis. Calculate what fraction of complaints come from the top 10% of restaurants and top 10% of couriers. If complaints concentrate heavily on the restaurant side, the fix is merchant packaging or prep-time accuracy, not courier behavior.
-
Change decomposition. When the spike occurred, did the mix of conditions change (more winter deliveries, more batching, more bikes), or did rates within conditions change (same conditions but worse outcomes)? This distinguishes external factors from operational changes.
Key segments to examine:
- Single vs. batched orders
- Vehicle type
- Distance bands
- Temperature ranges
- Peak vs. off-peak hours
- New vs. experienced couriers
- Merchants with unreliable ready signals (who mark ready prematurely)
Interpretation:
- High complaint correlation with shelf wait → dispatch timing or merchant signal accuracy problem
- High correlation with in-transit duration controlling for distance → courier equipment or batching problem
The bag verification feature only improves heat retention during transit and handoff phases. If most complaints stem from shelf wait, the feature will have limited impact—state this constraint upfront.
3. Experiment Design
Hypothesis: Requiring bag photo verification increases proper insulation usage, reducing heat loss in transit and lowering complaints. Potential cost: added friction reduces courier participation.
Randomization Strategy
Courier-level randomization seems natural but creates severe bias:
- Treated couriers experience friction, accept orders more slowly
- Their rejected orders flow to control couriers
- Control group appears artificially busy; supply impact is understated
- The comparison doesn't reflect what happens when you roll out to everyone
Recommended: geographic cluster randomization
- Define clusters as delivery zones or submarkets (most cities have 50-200)
- Match or stratify zone pairs on: baseline complaint rate, weather, order density, courier availability
- Randomize within each matched pair
- Treatment applies based on where the order offer originates, so all couriers operating in treated zones face the requirement
Addressing spillover:
- Couriers who work across zone boundaries create leakage; use entire cities or large contiguous regions when possible
- Exclude orders within 1km of cluster boundaries from analysis
- Track what percentage of courier-shifts span multiple treatment arms
Avoid time-based switchbacks: Couriers purchase bags and develop habits that persist across periods, violating the independence assumption switchbacks require.
Duration: 4-6 weeks to allow couriers to acquire equipment and for behaviors to stabilize.
Statistical approach:
- Analyze at cluster level or use cluster-robust standard errors
- Apply CUPED (variance reduction) using each zone's pre-period complaint rate
- Report the design effect and intraclass correlation coefficient in power calculations
Metrics
Primary: cold-food complaints per 1,000 deliveries
Secondary:
- Cold-related refund amount per order
- Average customer rating
- 30-day customer retention
Mechanism checks:
- Photo submission compliance rate
- Photo rejection/fraud rate (e.g., reused images)
- Effect size heterogeneity: should be largest for long-distance orders and cold weather conditions where insulation matters most
Guardrail Metrics (Marketplace Health)
Supply side:
- Offer acceptance rate
- Active courier hours per week
- New courier activation rate
- 30-day courier retention
- Earnings per active hour
Fulfillment:
- Time to assign a courier
- Median delivery duration
- Late delivery percentage
- Cancellation and non-completion rates
Demand side:
- Estimated delivery time shown at checkout
- Checkout conversion rate (longer ETAs reduce orders)
- Total order volume per zone
Common Mistakes
- Using complaint rate alone without validating against satisfaction or business outcomes
- Failing to account for regional baselines (comparing absolute rates across very different climates)
- Courier-level randomization without recognizing marketplace interference
- Ignoring that the intervention can't fix kitchen-side delays
- Running experiments too short for couriers to adapt and acquire equipment
- Not measuring mechanism (did bag usage actually increase?) alongside outcomes