PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Analytics & Experimentation/DoorDash

Design and analyze a switchback experiment

Last updated: May 7, 2026

Quick Overview

This question evaluates proficiency in experimental design, causal inference, randomization and contamination control, regression modeling with fixed effects and clustered standard errors, power calculation, and handling of compliance and robustness issues.

  • hard
  • DoorDash
  • Analytics & Experimentation
  • Data Scientist

Design and analyze a switchback experiment

Company: DoorDash

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: hard

Interview Round: Technical Screen

You are optimizing a delivery marketplace feature suspected to reduce cold-food incidents for bike couriers in dense zones. Design a 2-week switchback experiment at the city level that toggles the feature ON/OFF by equal-length time slots within each city. Be precise and address: (A) Randomization: Choose a slot length L given an average order lifecycle of 45 minutes and a driver relocation/carryover horizon of 30 minutes. Justify L to minimize contamination and describe a block-randomization scheme that balances day-of-week and peak hours while preventing predictability. (B) Assignment vs exposure: Define the difference between slot-level assignment (Intention-to-Treat) and realized exposure when some units operate in OFF slots but pick up spillover demand from neighboring ON slots. Specify what goes in the numerator/denominator for the primary metric (cold-food rate among biker deliveries), and show two denominator variants: include all deliveries (condition_label=0 and 1) vs include only deliveries with condition_label=1. (C) Analysis model: Write the exact regression you would run (formula notation is fine) with city fixed effects and slot-of-week fixed effects, and cluster-robust SEs at the city×slot level. Explain how you would incorporate pre-period baselines or covariates (e.g., weather, surge, courier mix) for precision. (D) Power: With baseline cold-food rate = 6%, target relative reduction = 10% (MDE = 0.6pp), average 120 eligible orders per slot, intracluster correlation (ICC) at the slot level = 0.02, and 14 days, estimate the number of switchbacks (ON↔OFF transitions per city) needed for 80% power at α=0.05. State assumptions and show the core calculation or code you would use. (E) Diagnostics: List concrete randomization checks and balance tests you will run, and how you would test for carryover (e.g., leading indicators, excluding boundary intervals). (F) Robustness: How would you handle partial compliance, missing telemetry, or shocks (major events) mid-test? Describe a principled decision rule to stop, extend, or rerun the test.

Quick Answer: This question evaluates proficiency in experimental design, causal inference, randomization and contamination control, regression modeling with fixed effects and clustered standard errors, power calculation, and handling of compliance and robustness issues.

Related Interview Questions

  • Evaluate Biker Feature Success - DoorDash (hard)
  • How would you test product changes? - DoorDash (hard)
  • How to test bike delivery? - DoorDash (medium)
  • Investigate LA successful orders drop - DoorDash (easy)
  • How would you diagnose a completed orders drop? - DoorDash (easy)
DoorDash logo
DoorDash
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Analytics & Experimentation
40
0

Switchback Experiment Design: Reducing Cold-Food Incidents for Bike Couriers

You are optimizing a delivery marketplace feature suspected to reduce cold-food incidents for bike couriers in dense zones. Design a 2-week switchback experiment at the city level that toggles the feature ON/OFF by equal-length time slots within each city.

Address the following precisely:

A) Randomization

  • Choose a slot length L given an average order lifecycle of 45 minutes and a driver relocation/carryover horizon of 30 minutes. Justify L to minimize contamination across slot boundaries.
  • Describe a block-randomization scheme that balances day-of-week and peak hours while preventing predictability.

B) Assignment vs Exposure

  • Define the difference between slot-level assignment (Intention-to-Treat) and realized exposure when some units operate in OFF slots but pick up spillover demand from neighboring ON slots.
  • Specify what goes in the numerator and denominator for the primary metric (cold-food rate among biker deliveries), and show two denominator variants: (1) include all deliveries (condition_label = 0 and 1) vs (2) include only deliveries with condition_label = 1.

C) Analysis Model

  • Write the exact regression you would run (formula notation is fine) with city fixed effects and slot-of-week fixed effects, and cluster-robust SEs at the city×slot level.
  • Explain how you would incorporate pre-period baselines or covariates (e.g., weather, surge, courier mix) for precision.

D) Power

  • Given: baseline cold-food rate = 6%, target relative reduction = 10% (MDE = 0.6pp), average 120 eligible orders per slot, intracluster correlation (ICC) at the slot level = 0.02, and 14 days.
  • Estimate the number of switchbacks (ON↔OFF transitions per city) needed for 80% power at α = 0.05. State assumptions and show the core calculation or code you would use.

E) Diagnostics

  • List concrete randomization checks and balance tests you will run, and how you would test for carryover (e.g., leading indicators, excluding boundary intervals).

F) Robustness

  • How would you handle partial compliance, missing telemetry, or shocks (major events) mid-test?
  • Describe a principled decision rule to stop, extend, or rerun the test.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Analytics & Experimentation•More DoorDash•More Data Scientist•DoorDash Data Scientist•DoorDash Analytics & Experimentation•Data Scientist Analytics & Experimentation
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.