Run a Switchback Test for Last Mile Route Planning
Last updated: November 29, 2026
Quick Overview
Amazon Logistics wants to test a new route planning algorithm for delivery stations. Drivers, vans, and packages are shared within a station each day. Design the experiment.
Amazon
November 29, 20260
0
0 solved
Amazon Logistics wants to test a new route planning algorithm for delivery stations. Drivers, vans, and packages are shared within a station each day. Design the experiment.
Asked in Amazon Last Mile and Transportation science onsites, where randomizing packages is impossible because routes are planned jointly. The interviewer checks switchback design, carryover, and the trade-off between station count and statistical power.
What the Interviewer Expects
- Explain why package-level randomization fails
- Propose switchback by station and day
- Address carryover between days
- Pick metrics like cost per package and on-time rate
- Compute or reason about power with few stations
Key Topics to Cover
How to Approach This
- Define success metrics carefully. A good metric is measurable, actionable, and aligned with business goals.
- Run experiments long enough to account for novelty effects and weekly seasonality.
- Use funnel analysis to identify where users drop off for maximum optimization impact.
- Segment results by key dimensions (platform, country, user cohort) to catch hidden patterns.
- Consider network effects and interference between treatment and control groups.
Possible Follow-up Questions
- How many stations and days would you need?
- What if the new algorithm learns from previous days?
- How would you handle peak season?
- Would you prefer randomizing whole stations instead?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Analytics QuestionsSample Answer
Clarify
One algorithm plans all routes for a station on a given day, so the natural unit is station-day. Metrics: cost per package, on-time delivery rate, miles per route, packages per hour, and missed delive...
Approach
Randomizing packages or routes would make algorithms compete for the same vans. A switchback assigns each station-day to control or treatment at random, so every station serves as its own control....