# A broken geo test in the budget: design

Written before any code of this part existed and before any fit, split or score of this part was computed. Every rule
below is in `geobudget/protocol.json`, which this note explains; if the two disagree, the protocol is the record.

## What this part adds

Round 2 (`media-mix.html`) calibrated its media mix model with the holdout and one geo test on paid search, and assumed
the test ran as planned. Round 7 (`geo-checks.html`) broke that geo test on purpose in four ways, watched it with five
daily checks, and stopped at the read: "The media mix model is not refitted with these reads." This part takes that last
step. It feeds round 7's readouts, flagged and unflagged, into round 2's calibrated model on the same nine worlds and asks
what a broken test does to the budget split, and what is left when a team drops a readout its checks flagged.

## Overlap test

The two nearest published studies, checked before this design:

1. This study's rounds 2 and 7: the same company, worlds, model and geo test. Round 2 scores the model with one
   healthy geo test; round 7 scores the checks and the read, not the budget. Neither shows a broken read in the
   budget. This part reuses both unchanged, so it is a round of this study, not a new one.
2. The pacing study (`pacing-delayed-conversions`): delay curves and a corrected return for a bidder. It never feeds a
   lift read into a media mix model. The marketplace experiments study covers test designs that mislead under carryover,
   not what a calibration input does to a budget.

## Which readouts go in

From round 7's run file, for each of the nine worlds, one readout per row, picked by a rule fixed here: the run with the
lower median read in its set (runs sorted by read, then by run number; index floor((n - 1) / 2)).

| Row | Runs it is picked from |
|---|---|
| No break | the 400 healthy runs |
| Spend leak | the 400 leak runs |
| Pacing change | the 400 pacing runs |
| Demand shock, unflagged | the shock runs no check flagged |
| Demand shock, flagged | the shock runs some check flagged |
| A 60-day lag | the 400 runs with a 60-day lag |
| No geo readout | none: the model gets round 2's holdout reading alone |

A readout replaces round 2's geo test in the calibrated fit: same channel (paid search), same weeks, the round 7 read
and its standard error in US$K a week. The holdout term is round 2's in every fit.

## How "flagged" is decided

By round 7's own five checks, unchanged: a run is flagged when any check (balance at launch, held-out spend, pacing,
still to arrive, existing-customer revenue) recorded a flag from launch to the planned readout. "Acting on the flags"
means a flagged readout is dropped and the model is calibrated with the holdout alone; an unflagged one goes in.

## The fit and the budget

Round 2's model, priors, sampler, convergence gate and seeds, unchanged; every readout uses the seeds of round 2's
published calibrated fit, so the rows differ only by their geo input. A refit of the first world with round 2's own geo
test reproduced the published fit exactly before this design was written; that was the only fit run. The budget rule is
round 2's: the same weekly budget split on a US$100 grid, each channel between 0 and twice its mean spend, scored under
the truth. Seven fits per world, 63 in all.

## What I expect

A read that understates paid search (the leak, the pacing change and above all the 60-day lag, which round 7 showed
reads about 30% of the true lift) pulls the model's paid search return down, and the split moves money out of paid search.
In round 2's truth the best split grows paid search in 8 of 9 worlds, so moving money out of it should cost revenue. The
demand shock moved the read only a little when no check saw it, so it should barely move the split. Calibrating with the
holdout alone loses the geo test's information about paid search, but it should still beat a read that is far too low.

## Predictions

Written before any fit with a round 7 readout; each scored as stated in the protocol (held, missed or untestable):

1. The leak, pacing and 60-day lag readouts each give a lower posterior mean paid search return than the no-break
   readout, in every world. A safe bet: each is a lower read of the same quantity in the same model with the same seeds.
2. With the 60-day lag readout, the split gives paid search less of the budget than the no-break readout's split in at
   least 7 of 9 worlds.
3. The 60-day lag readout's split earns at least US$50K a year less under the truth than the no-break readout's split,
   averaged over the 9 worlds.
4. The leak and the pacing readouts' splits each earn less under the truth than the no-break readout's split, averaged
   over the 9 worlds.
5. The unflagged demand-shock readout's split earns within US$50K a year of the no-break readout's split, averaged.
6. Calibrating with the holdout alone earns more under the truth than feeding in the 60-day lag readout in at least 5
   of 9 worlds.
7. The no-break readout's split lands within US$150K a year of round 2's published calibrated split (mean gain against
   today's split), averaged over the 9 worlds.
8. The selected no-break readout is flagged in at most 1 of 9 worlds; the selected leak, pacing and 60-day lag readouts
   are flagged in 9 of 9 worlds each. The second half is a safe bet: round 7 caught these breaks in every run.

## What it does not do

One readout per row and world, picked by a fixed rule, so each cell of the table is one run of a noisy test, not its
spread. The model is refitted only for these readouts; round 7's other runs are not fed in. The checks do not correct a
flagged readout; a team that drops one falls back to the holdout alone. Every rate, effect and break size is the
earlier rounds' assumption, and the scores come from the same generator, so this is a simulation self-test. No paid
model calls.
