Basis Lab

Answers · Putting a model into service

How do I decide whether a small but significant win is actually worth shipping?

In shortShip only if the chance the gain is real beats the cost of being wrong divided by that cost plus the gain. That bar is rarely five per cent.

Ship the change when the probability that its gain is real exceeds L/(G+L)L/(G+L), where GG is what you gain if the change works and LL is what you lose if it does not. That number is almost never five per cent, and a result clearing the conventional significance line tells you nothing about whether it cleared this one.

P  =  LG+LP \;=\; \frac{L}{G+L}

Take a rewording on one button. Keeping it costs about a thousand a year: a line of copy, a small maintenance burden, nothing to unwind, so L=1L = 1 thousand. If it works it is worth four hundred thousand a year, so G=400G = 400 thousand. The break even chance is 1/(400+1)=0.00251/(400+1) = 0.0025, which is a quarter of one per cent, or one in four hundred. An experiment that comes back significant at the usual line has already cleared a bar twenty times higher than the decision needs, since 0.05÷0.0025=200.05 \div 0.0025 = 20. Discarding on that evidence is the expensive mistake, not the cautious one.

Pricing the two mistakes

Run the same arithmetic on a change to how refunds work. If it goes wrong, the cost of manual corrections, of the staff time and of unwinding it in a live system is around two million a year, so L=2000L = 2000 thousand, and the gain if it works is three hundred thousand, so G=300G = 300. The break even chance is 2000÷2300=0.872000 \div 2300 = 0.87, or eighty seven per cent. A bare significant result sits at five per cent, which is nowhere near it, and no amount of statistical hygiene in the analysis changes the gap. For something like this the interval must sit above the threshold in its entirety, not merely exclude zero.

FIG 1
changecost of shipping a dud (L)gain if it works (G)L divided by Gchance needed to justify shipping
wording on one button14000.00250.25 per cent
redesigned checkout1204000.3023 per cent
new ranking model3009000.3325 per cent
change to refunds20003006.787 per cent

The natural guess is that crossing the significance line is the ship signal, and it fails because the line answers a different question. It reports how surprising the data would be if the change did nothing. It says nothing about the relative size of the two errors you can make. A fixed one in twenty is right for exactly one ratio of costs, the one where the loss is about nineteen times the gain, and that ratio is not common in either direction. So the convention ships duds on cheap-to-reverse products, where it should be far more permissive, and it discards winners on expensive ones, where it should be far stricter.

The probability you compare against L/(G+L)L/(G+L) is not the false positive rate either. It is your honest chance that this particular change works, given the interval and the base rate. The interval gives you the first part: a gain of +0.9 points with a 95 per cent interval of +0.1 to +1.7 says the effect is probably positive and probably smaller than the point estimate suggests. The base rate gives you the second, and it is the step people skip. If one change in five works and your test detects real effects eighty per cent of the time, then out of a hundred experiments twenty are real and sixteen of those get reported; of the eighty duds, four clear the line by chance. That is twenty reported wins of which sixteen are real, so eighty per cent. Drop the base rate to one in twenty and the same arithmetic gives five real changes, four detected, and about five false wins from ninety five duds, so four in nine, or forty five per cent. Most of the celebrated results in that organisation are noise, and nothing in any single result reveals which.

Where the rule stops

The ratio assumes the costs are known, roughly stable and additive, and it assumes the gain persists. If a win decays over a few months, GG is an overstatement and the bar rises; if the change compounds with later ones, GG is an understatement and the bar falls. For hard-to-reverse changes LL has a tail, since the cost of a bad refund system is not the expected cost but the worst plausible one, and you should price the tail rather than the average. And for a small but significant win whose interval sits entirely below the threshold you wrote down before the run, the answer is neither ship nor discard: it is that the change is real and too small to be worth the complexity, which is a settled question and worth recording as one.

One consequence of the arithmetic is that most of the value in a programme of experiments comes from a small number of large wins against a background of failures. If a third to a tenth of changes produce the improvement their authors expected, then a team that ships only on the conventional threshold is discarding cheap winners and keeping expensive losers, and is doing so systematically, because the threshold is the same for both. Judge the programme on the duds it stopped rather than on its hit rate, and write down the interval, the priced mistakes and the decision together, including for the experiments that found nothing. A null result with a narrow interval closes a question. A result too small to separate from zero closes nothing, and saying so is more useful than a verdict.

Worth keeping

  • The chance of a gain being real at which shipping and not shipping are equally good is the loss from shipping a dud divided by the loss plus the gain.
  • A gain of four hundred against a loss of one is worth shipping on a quarter of one per cent chance, which no significance test would ever report.
  • A gain of three hundred against a loss of two thousand needs an eighty seven per cent chance, so a conventionally significant result is far too weak to act on.

Where this goes next

This question is one step of Running an Online Experiment, a course that works through its subject from the beginning. The page that teaches this part of it is What to Do With the Answer, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. What does a p-value actually tell me?A p-value is the chance of seeing a difference at least as large as yours if the change did nothing; it is not the chance the result was luck or that there is no effect.
  2. Why bother with a confidence interval when the result is already significant?A significant result only rules out zero; the interval shows how large the effect might be and whether it is worth acting on.
  3. Why can't I A/B test a change where users can affect each other?A split assumes one person's result does not depend on what version others got. When users compete for the same jobs or stock, the control group is changed by the treatment, so the comparison is biased.
  4. Why does detecting a small improvement take so many more users?Because the noise you are trying to see past shrinks only with the square root of the sample, so halving the change you want to spot takes four times the people.
  5. Why does the model return JSON wrapped in extra text when I asked for JSON?A request for JSON does not force the model to return only JSON, so you need to validate the reply and repair it once rather than assume it will parse.
  6. Why do the numbers look good while users keep complaining?Because the score measures a fixed set of cases with a fixed rule, and the users are living through behaviour that the set and the rule never covered.

Read alongside