# Choosing a marketplace experiment design

Start from the decision: a full-city rollout, a driver-level incentive or a time-limited policy. Say whose outcomes
count and over what window, then map how drivers and riders interact. A precision gain helps only when the design
measures the comparison you need.

| Situation | Design | Check before launch | Main failure mode |
|---|---|---|---|
| Drivers have isolated demand and stable exposure | Driver A/B | Confirm that treatment cannot shift rides between drivers | Reading a mixed-market driver comparison as a full rollout effect |
| Strong, stable pre-test data | Add CUPED to A/B | Freeze the covariates and the fit before assignment; measure the variance change | Post-treatment leakage; it narrows intervals around the same gap |
| Interactions stay mostly inside regions | Region clusters | Map border traffic; keep enough independent clusters | Cross-border spillovers and few clusters |
| Marketplace-wide changes that can alternate over time | Region/time switchback | Estimate how long exposure lingers; size blocks and washout from it (see below) | Carryover, time imbalance and an alternating-policy target |
| Interactions span regions and persist across blocks | Redesign the experiment | Larger units, longer blocks or an explicit exposure model | A familiar standard error around the wrong target |

My default for a driver incentive in a market where drivers share riders: a region switchback with blocks sized from
a measured memory, four planned checks with adjusted thresholds, and a driver A/B with CUPED beside it where the change
allows, as a check on direction.

## Sizing switchback blocks: what the sweep showed

The declared sensitivity run ([sensitivity-blocks.csv](sensitivity-blocks.csv)) held a 24-slot experiment fixed, discarded the
first slot of every block and varied block length under geometric carryover that keeps 70% of exposure from one slot
to the next. With 3-slot blocks the switchback estimate fell 50% short of the full-rollout effect and its intervals
covered that effect in 45% of 500 runs. With 12-slot blocks it fell 15% short and covered the effect in 92% of runs,
but the spread of the estimate rose from 116 to 200 rides, because each region then contributes one on-off pair.
Persistent demand shocks (0.8 of a shock carried to the next slot) gave nearly the same values and left the
switchback's precision unchanged. So block length should follow an estimate of how long exposure persists, and the
precision cost of longer blocks belongs in the sample-size plan before launch.

## How much the memory setting drives the result

The main run fixed two settings it never varied: the incentive's pull keeps 70% of its strength from one slot to
the next, and one slot is discarded after each switch. A declared sweep
([data/carryover-sweep-protocol.json](data/carryover-sweep-protocol.json)) reruns the switchback on the same 500
cities with that memory at 0, 30, 50, 60, 70, 80, 85 and 90%, and with 3-slot blocks discarding one or two slots,
6-slot blocks discarding one, two or three, and 12-slot blocks discarding one (seed 7, the ship rule unchanged).
Outputs: [carryover-sweep.json](carryover-sweep.json) and [carryover-sweep.csv](carryover-sweep.csv).

The memory decides the headline. With 3-slot blocks and one slot discarded, the switchback measured 93% of the gain
and shipped it in 82% of cities at 30% memory, 77% and 55% at 50%, half and 14% at 70%, and 35% and 3% at 80%.
Discarding a second slot at 70% raised coverage from 45% to 78% but left the ship rate at 15%, because fewer scored
slots cost power. The 12-slot blocks the sweep above suggested were chosen at the 70% memory I set: at 85% they
covered the effect in 79% of cities, and even with no lingering they shipped the gain in only 74%. So the size of
the miss, and the block length that fixes it, both come from the memory, which has to be measured before launch.

## Turning a result into a decision

A declared third run ([decision-runs.csv](decision-runs.csv), [sequential-runs.csv](sequential-runs.csv)) passed every design's
estimate to a fixed rule written for an earlier readout tool: ship when the chance of a net gain above 100 units per
1,000 driver slots is at least 95% and the expected shipping loss is at most 25 units, stop in the mirror case,
otherwise keep testing. With no interference the rule shipped the switchback's real gain in 93% of 500 runs and plain
driver A/B's in 18%. With carryover at 70% memory the switchback shipped in 14%, because it measured about half the
gain, and no check in the ride log could tell. With no effect the rule shipped in at most 1.0% of runs for any design. With
spillovers the rule's interference checks sent every run back for redesign, although shipping would have been right in
this simulator. So check for lingering effects before trusting a switchback's size, and treat a failed interference
check as a reason to redesign, never as proof the change is bad.

## Stopping early

Reading each run at four planned points with O'Brien-Fleming-type thresholds let a switchback team stop after 61% of
the planned time on average with the same 99% power, but at that ceiling a loss could not show: designs with
power below 90% lost 1 to 3 points and used 81% to 96% of the planned time. Checking four times at the usual 5% bar called a no-effect change
a win in up to 12% of runs. Early stops overstate the effect (the switchback's averaged 1.14 times the true gain,
other designs' up to 1.99 times), so report a bias-adjusted estimate after stopping, and
plan the checks before launch.

These results come from one simulated city with settings I chose, so they show how each design fails rather than how
often. The full results are in [the report](report.html) and the simulator's assumptions in [DESIGN.md](DESIGN.md).
