Designs that change while they run

The estimate after the choice

An arm chosen for being ahead is ahead by more than it should be, and the trial then publishes the average of the stage that chose it and the stage that did not. The unbiased estimate is the one built from a third of the data — and it is the least accurate of the three.

Worth reading first: The winner's curse · When the looking happens.

A two-stage trial that drops arms can be given a boundary that holds its error rate exactly. The previous essay solves for it: 2.313 rather than 1.96, at eight arms.

That fixes the test. It does not fix the estimate, and the estimate is what gets published, quoted in a guideline and used to decide whether the effect is worth having.

Three estimates of the same effect, and the honest one is the worst8,000 trials in which every arm has an effect of exactly 0. The arm carried forward is reported by its first stage at +0.187 above the truth — it was chosen for being ahead — and by its second stage at -0.0032, which is unbiased by construction because the selection could not see it. The combination that gets published is at 0.123, exactly the share of the first stage's bias the first stage contributes. Root mean squared error: 0.240, 0.261, 0.182 — the unbiased estimate is the least accurate of the three.02505007501e+3-0.50000.500the effect reported for the arm that was carried forwardtrials out of 8,000the truth, 0stage one, +0.19stage twowhat is published8,000 trials, 8 arms at 60, then 30 morebias 0.187 · -0.0032 · 0.123
Fig. 1 Twenty thousand trials in which every arm has an effect of exactly zero. Three estimates of the same quantity from the same trials: the stage that chose the arm, the stage that did not, and the average of them that gets reported.

The bias, and where it comes from

Eight arms, sixty observations each, the best carried forward, thirty more. Every arm’s true effect is zero.

The first stage’s estimate for the arm that was carried forward averages +0.184. It is the maximum of eight noisy estimates of zero, so of course it is positive: the selection did not find an effect, it found a large draw, and the number it selected on is the number being reported.

This is the winner’s curse — the same argument as an effect inflated by having cleared a significance threshold — moved inside a single trial. The threshold there was statistical significance; here it is being the largest of eight.

The second stage’s estimate for the same arm averages −0.0011, and that is not luck. The arm was chosen using stage one, and stage two was collected afterwards; nothing about stage two entered the choice. So it is unbiased by construction, which makes it one of the few claims on this site that can be asserted at the simulation’s own error rather than at a tolerance.

And the published estimate — all ninety observations on the surviving arm against all ninety on the control — averages +0.123. That is exactly two thirds of the first stage’s bias, because the first stage is two thirds of the data:

bias(combined) = (n₁ / (n₁ + n₂)) × bias(stage one)

Measured 0.1226 against a predicted 0.1230. The published estimate does not dilute the selection away, it carries a fixed and computable share of it.

How the bias grows with the number of arms

arms stage one stage two published
1 −0.001 +0.002 −0.000
2 +0.074 −0.000 +0.049
4 +0.134 −0.002 +0.088
8 +0.184 −0.001 +0.123
12 +0.211 +0.002 +0.141

At one arm there is nothing to select and every estimate is unbiased — the refusal that makes the rest of the column mean something. From two arms on the bias is real, and it grows like the expected maximum of k draws, so it rises quickly and then slowly: most of the damage is done by the fourth arm.

Three estimates of the same effect, and the honest one is the worst. 8,000 trials in which every arm has an effect of exactly 0. The arm carried forward is reported by its first stage at +0.001 above the truth — it was chosen for being ahead — and by its second stage at 0.0014, which is unbiased by construction because the selection could not see it. The combination that gets published is at 0.001, exactly the share of the first stage's bias the first stage contributes. Root mean squared error: 0.185, 0.255, 0.151 — the unbiased estimate is the least accurate of the three.
Fig. 2 The same design with one arm. All three distributions sit on the truth, because there was no choice to make, and the machinery reports no bias where there is none.
Three estimates of the same effect, and the honest one is the worst. 8,000 trials in which every arm has an effect of exactly 0. The arm carried forward is reported by its first stage at +0.213 above the truth — it was chosen for being ahead — and by its second stage at 0.0028, which is unbiased by construction because the selection could not see it. The combination that gets published is at 0.143, exactly the share of the first stage's bias the first stage contributes. Root mean squared error: 0.260, 0.261, 0.194 — the unbiased estimate is the least accurate of the three.
Fig. 3 And with twelve, where stage one’s distribution is displaced by more than a fifth of a standard deviation and the published estimate carries two thirds of that.

The bias in closed form

“It grows like the expected maximum of k” is exact rather than approximate here, and checking it turns five measured numbers into one formula.

The stage-one estimate of an arm’s effect is a mean of sixty observations, so with unit noise its standard error is 1/60=0.12911/\sqrt{60} = 0.1291. The arm carried forward is the largest of k such estimates of zero, so its expectation is that standard error times the expected maximum of k standard normals — 0.5642, 1.0294, 1.4236 and 1.6293 at two, four, eight and twelve.

Multiplying gives 0.0728, 0.1329, 0.1838 and 0.2103, against 0.074, 0.134, 0.184 and 0.211 measured. Four predictions from no fitted constants, each within two thousandths.

And the published column follows from it by the two-thirds rule, which holds just as tightly: 0.0493, 0.0893, 0.1227 and 0.1407 predicted against 0.049, 0.088, 0.123 and 0.141.

So the whole table is one closed form, and the closed form says the bias is a property of three things only — the noise, the size of the first stage, and how many arms were on offer. Nothing about the effects being estimated enters it, which is why the row of zeros in the second column is not a coincidence of this simulation.

What the formula says about more arms and more data

Having it as a formula makes the two obvious remedies checkable without running anything.

More arms is worse, slowly. The expected maximum grows like 2logk\sqrt{2\log k}, so going from eight arms to sixteen takes the stage-one bias from 0.184 to about 0.228 — an increase of 0.044 for a doubling — and going all the way to a hundred arms only reaches 0.324. A screening design with a great many arms is not catastrophically worse than one with eight; it is worse by a logarithm.

More second-stage data is worse than useless as a fix. The published bias is n1/(n1+n2)n_1/(n_1+n_2) times the stage-one bias, so halving it takes n2=2n1=120n_2 = 2n_1 = 120 — four times the thirty currently collected. Cutting it to a tenth takes n2=540n_2 = 540, eighteen times the second stage, at which point the trial has spent nine tenths of its budget diluting a bias rather than estimating anything.

That is the argument for the second column stated in its strongest form. The unbiased estimate is available at a cost of thirty observations; buying the same reduction by dilution costs five hundred and forty and never quite arrives.

The unbiased estimate is the worse estimate

The obvious repair is to report the second stage alone. It is unbiased, it needs no correction, and it is sitting in the data already.

It is also the least accurate of the three:

estimate bias root mean squared error
stage one +0.184 0.239
stage two −0.001 0.261
published +0.123 0.182

The published estimate is biased by 0.123 and is closer to the truth on average than the unbiased one, because it is built from three times as many observations. Removing the bias costs more accuracy than the bias cost.

That is the trade in its cleanest available form, and it is not a paradox. Root mean squared error is bias squared plus variance, and the variance of an estimate from thirty observations is large enough to swamp a bias of a tenth of a standard deviation. A reader who wants one number should be given the combined one.

A reader who wants to know whether the effect is worth having should not, and that is the distinction this essay exists for.

Why the second stage is exactly unbiased

The claim that stage two is unbiased is stronger than it sounds and is worth spelling out, because it is the one piece of machinery in this field that needs no correction and it is easy to state too loosely.

The selection is a function of the first stage’s data alone. Conditional on which arm was chosen, the second stage’s observations are draws from that arm’s distribution and from nowhere else — the choice cannot have changed them, because it happened first and they had not been collected.

So E[stage two | arm j selected] is arm j’s true effect, for every j, and the average over the trials that selected j is unbiased for whatever j’s effect is. That is a conditional statement and it survives averaging: the marginal expectation is a mixture of unbiased pieces.

Two things follow that are worth having.

It does not depend on the selection rule. Pick the largest, pick at random, pick by an oracle that knows the truth: the second stage is unbiased for the effect of whatever was picked. Nothing about how badly the choice was made can bias data collected afterwards.

And it does not survive re-using stage one. Any estimate that touches the first stage inherits a share of its bias, and the share is exactly the weight it gives it. That is the identity measured above, and it is why there is no clever weighting that gets both precision and unbiasedness: the two are traded against each other by a single number.

Which question is being asked

The two uses of a trial’s estimate pull in opposite directions and are almost never separated.

Deciding whether the effect is real is what the boundary is for, and the boundary handles the selection completely. Nothing in this essay changes that: a design tested at 2.313 rejects a true null 5% of the time whatever the estimate is doing.

Deciding whether the effect is large enough to act on is an estimation question, and here the bias is the whole difficulty. A treatment whose true benefit is 0.1 and whose published estimate is 0.22 will look worth its cost when it is not, and no amount of statistical significance corrects that — the trial was right that something is there and wrong about how much.

And predicting what the next trial will find is where the bias is most expensive, because the next trial is usually powered on this one’s estimate. Powering a confirmatory trial for 0.22 when the truth is 0.1 gives it a fraction of the power it was designed for, which is the mechanism by which one optimistic estimate propagates into a literature of underpowered replications.

For the second and third of those, the second-stage estimate is the right one to quote in addition — not because it is more accurate, but because it is the only one that does not require the reader to trust a correction.

When one arm really is better

Everything above is measured under a global null, which is the right setting for a bias and the wrong setting for a design decision. With one arm carrying a real effect of 0.3 among eight, the same design gives:

stage one +0.080, stage two −0.001, published +0.053.

The bias is less than half what it was under the null. The reason is that the selection is now usually picking the right arm — it is not choosing the largest of eight equivalent draws, it is confirming an arm that is genuinely ahead — and a selection that was going to be made anyway costs nothing.

That is the general shape and it is worth stating as a rule of thumb: the bias is largest exactly when the trial found nothing. A design that selects among arms that really do differ is close to unbiased; a design that selects among arms that are all the same reports the largest fluctuation it saw. Which case a particular trial is in is what the trial was run to find out, so the bias cannot be corrected by knowing which case it is.

Three estimates of the same effect, and the honest one is the worst. 8,000 trials in which every arm has an effect of exactly 0.3. The arm carried forward is reported by its first stage at +0.187 above the truth — it was chosen for being ahead — and by its second stage at -0.0032, which is unbiased by construction because the selection could not see it. The combination that gets published is at 0.123, exactly the share of the first stage's bias the first stage contributes. Root mean squared error: 0.240, 0.261, 0.182 — the unbiased estimate is the least accurate of the three.
Fig. 4 The same eight-arm design where every arm has a true effect of 0.3 — so the selection is choosing among arms that are genuinely alike, and the bias is what it costs. Under a real difference between the arms it would be smaller still.

The same shape, three times on this site

This is the third time this site has measured a quantity that is inflated by having been selected, and the three differ only in what did the selecting.

The winner’s curse: an effect reported because it cleared significance is inflated by 2.07× at n = 16, and the literature is the thing doing the selecting.

The forking paths: an analysis chosen from twenty available ones rejects a true null 57% of the time, and the analyst is doing the selecting.

And this essay: an arm chosen from eight is inflated by 0.184, and the design is doing the selecting — deliberately, in advance, with the selection written into the protocol.

The last of those is the one with a defence, and the defence is exactly that it was written down. Because the rule is known before the data, its consequences can be computed: the boundary can be solved for, the bias can be predicted from k and the stage sizes, and the second stage can be reported separately. None of that is available to a literature that selects on significance or to an analyst who selects on a result, and it is the whole difference between an adaptation and an accident.

12,000 studies of a real effect of 0.3, n = 16. Power is 21%. The studies that reached significance report a mean effect of 0.621 — 2.07 times the truth. Every one of them is honest; the selection did the inflating.
Fig. 5 The winner’s curse as the testing field measures it: an effect reported because it cleared significance is inflated 2.07-fold at sixteen observations. The selection here is being the largest of eight rather than clearing a threshold, and the arithmetic is the same.

What to report

Four things, and the first two cost nothing.

Report which arm was selected, and out of how many. A reader cannot apply any correction without k and cannot tell that one is needed without knowing there was a selection at all.

Report the stage-two estimate beside the published one. It is unbiased by construction, it is already computed, and the gap between the two is a direct measurement of what the selection did in this trial rather than on average.

Quote a bias-adjusted estimate if one is being quoted at all, and note that the adjustment is a function of k, of n₁/n₂ and of the true effect — which is unknown, which is why the adjustment is itself a design decision rather than an arithmetic one.

Say which stage the estimate came from. A published effect of +0.12 from this design and a published effect of +0.12 from a fixed two-arm trial are different numbers, and nothing on the face of either says so. The provenance is one clause and it is the only thing that lets a reader apply anything at all.

And do not power the next trial on this one’s estimate. The bias is largest exactly where the next trial is most at risk, and the second-stage estimate — or an explicit discount — is what belongs in that calculation.

The best of 8 arms, tested as though it were the only one. 8,000 trials with no effect in any arm. Stage one runs 8 arms at 60 each, the best is carried forward, and stage two adds 30 more to it and to the control. The histogram is where the final statistic lands and the curve is the standard normal it is being read against — shifted right, because the arm was chosen for being ahead. 10.5% of these trials clear 1.96 against a claimed 5%, and the value that actually holds the rate for this design is 2.313.
Fig. 6 The test the previous essay corrected, on the same design. The boundary handles the selection completely for the question “is anything there”, and does nothing at all for the question “how much”.
What dropping arms saves, and what it costs at the boundary. Two quantities against the number of arms. The units saved against running every arm to the end rise from 11% at 2 arms to 28% at 12, because the arms that are dropped are not paid for in stage two. The critical value rises too, from 1.95 to 2.42, because the more arms were available the further ahead the winner is expected to be. A design that counts the first and ignores the second has kept the saving and spent the error rate.
Fig. 7 And the trade that made the selection worth doing. The bias measured in this essay is the third quantity on that ledger — units saved, boundary raised, estimate displaced — and it is the one with no line in the usual accounting.

What a conditional interval would need

An estimate with a known bias is halfway to an interval that covers, and it is worth saying why this essay does not finish the journey.

The bias measured above is a marginal quantity: the average over all trials of this design, under a stated truth. What a reader of one trial wants is conditional — given that this arm was selected out of eight, and given the value it reported, where is the effect? That is a different object, its bias depends on the true effects of all eight arms, and those are exactly what is unknown.

Three routes exist and each has a cost this site would want measured before recommending it.

Condition on the selection and invert. The distribution of the reported estimate given that its arm was selected is computable for a stated set of true effects, so an interval can be built by inverting a test over them — the same construction Fieller’s set uses for a ratio, and with the same tendency to be wide or unbounded when the data has not settled much.

Use the second stage alone. Exact, needs nothing, and gives an interval a third the information wide.

Or shrink towards zero, which is partial pooling applied to the eight arms: the selected arm’s estimate is pulled back towards the others by a weight that is estimated from their spread, and the pull is in exactly the direction the selection pushed. That is the most promising of the three and the one that needs the most measurement, since the weight is itself estimated from eight numbers — which is where that field’s own trouble lives.

None of the three is attempted here. What is established is the quantity they would all be correcting, and the fact that it can be predicted from the design before the trial is run.

Three estimates of the same effect, and the honest one is the worst. 8,000 trials in which every arm has an effect of exactly 0. The arm carried forward is reported by its first stage at +0.136 above the truth — it was chosen for being ahead — and by its second stage at 0.0030, which is unbiased by construction because the selection could not see it. The combination that gets published is at 0.091, exactly the share of the first stage's bias the first stage contributes. Root mean squared error: 0.208, 0.261, 0.164 — the unbiased estimate is the least accurate of the three.
Fig. 8 Four arms, where the published estimate is displaced by 0.088 — most of the eight-arm bias, from half the arms. The expected maximum of k draws grows like √(2 log k), so the damage arrives early and then slows.

The refusals

Three, and they are the reason the numbers above are worth anything.

One arm must be unbiased. With k = 1 there is no selection, and the same machinery is required to report a bias of zero to within the simulation’s own error. It gives −0.0003.

Stage two must be unbiased at every k. This is the strongest claim in the essay and it is asserted at four standard errors rather than at a tolerance, because it follows from the construction rather than from an approximation. If it ever failed, the selection would be leaking into data it could not see, which would mean the simulation was wrong rather than the design.

And the published bias must equal the share the first stage contributes. Measured 0.1226 against a predicted 0.1230, which is a two-routes check on a quantity that could otherwise be measured and believed without ever being explained.

A fourth was added while writing this, and it is the site’s standing gotcha caught in advance rather than after the fact. The identity above was measured at one pair of stage sizes — sixty then thirty — and a relationship asserted as a formula from one point is exactly the shape that turns out to be a fact about a default. So it is checked at a second pair with the weight flipped: selecting on a third of the trial rather than two thirds gives a published bias of 0.086 against a predicted 0.087, and the same design’s bias falls from 0.123 to 0.086 for the reason the formula says it should.

Which is also a design finding rather than only a check. An earlier interim publishes less of the selection’s bias, exactly as it needs less correction at the boundary — the two costs of selecting move together, and both are bought down by choosing sooner.

The third of those is what turns the essay from a warning into an account. A bias that can be predicted from the design — before the trial runs, from k and the two stage sizes — is a quantity a designer can trade against the units the selection saves, and that trade is the only honest way to decide how many arms to screen and when to drop them.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Adaptive designError rateInterim analysisMean squared errorRegression to the meanSelection biasSummary statisticsThe winner's curse