How we learned to A/B test algorithms with switchback tests

Evgenii Bokarev, Nadezhda Grachyova14 Jun 2022

Problem

Delivery Club's logistics team tests algorithms such as courier assignment and demand-supply balancing. A classic A/B test splits orders, restaurants or couriers at random, but these units share couriers. If the test group gets more car couriers, the control group has fewer of them, so the control is affected too and the comparison is biased. The result is a network effect (interference). Without a valid test, the team cannot confirm that a new mechanic helps or that it leaves conversion intact.

Example from the article: a fallback mechanic hides a restaurant from the platform while orders for it sit in the reassignment queue. The goal was to cut the share of canceled orders (Fail Rate).

Solution in brief

Randomize whole geographic clusters instead of orders, and re-randomize every cluster after a fixed switching interval. Clusters limit spillovers between groups. Switching gives many cluster-time observations and cancels out weather and local differences. MDE estimates choose the switching interval, and an A/A test validates the setup.

Questions this case answers
  • How to estimate the causal effect of a change when units share a limited resource and unit-level randomization is contaminated by spillovers
  • How to choose the randomization unit and switching interval for a geo-time switchback experiment
  • How to A/B test a courier assignment algorithm when one order's outcome changes the courier supply for other orders?
  • How to split a city into clusters so that test and control zones barely influence each other?

Tools and methods

  • Switchback test — assigns clusters to test or control for a time window, then reassigns them at random
  • Geo clustering — splits cities along rivers and highways so most orders stay inside one cluster
  • A/A test — checks that the platform and the metric give a uniform p-value distribution
  • MDE calculation — compares candidate switching intervals before launch
Continue reading — it's free

Google or a one-time email code. No password.