Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

Experiment design: which choices change the call

Counting each order as independent flagged a difference in 22% of random splits of a real store's customers, against 5% with customers as the unit.

Also on this page: the adjustment for pre-test data, segment effects, and one public test read out.

In plain words

Three more choices sit in every test plan. One is the unit. A test splits customers, but revenue per order counts orders, and one customer's orders look alike. Treating them as independent makes the interval too narrow.

Another is noise. Much of the spread in a metric is there before the test starts. Adjusting for it, the idea behind CUPED, shrinks the interval without bias.

The last is slicing. After a test, people cut the result by segment and report the ones that look different. With enough cuts, some will by chance.

Per-order metrics: the customer is the unit

The data are the Online Retail II records of a UK online store: real customers, real dates, repeat orders, but no experiment. So the test is an A/A test: customers split at random 2,000 times, where any difference is a false alarm. In four weeks, 1,310 customers placed 1,832 orders, up to 23 each.

Counting orders as independent flagged a difference in 22% of random splits in four weeks and 39% in twelve. With the customer as the unit it stayed near 5%.

False alarms on revenue per order, share of 2,000 random splits; the line marks 5%.

False alarms on revenue per order, order as the unit against customer as the unitFour weeks, order as unit: 21.7% of random splits flagged a difference (95% interval 19.9% to 23.6%). A correct test flags 5%.Four weeks, order as unit21.7%Four weeks, customer as unit: 5.0% of random splits flagged a difference (95% interval 4.1% to 6.0%). A correct test flags 5%.Four weeks, customer as unit5.0%Twelve weeks, order as unit: 39.2% of random splits flagged a difference (95% interval 37.1% to 41.4%). A correct test flags 5%.Twelve weeks, order as unit39.2%Twelve weeks, customer as unit: 5.1% of random splits flagged a difference (95% interval 4.2% to 6.2%). A correct test flags 5%.Twelve weeks, customer as unit5.1%
False alarms in 2,000 random splits of customers (a correct test flags 5%)
Window and metricOrder as unitCustomer as unitOrder-level interval, share of correct width
Four weeks, revenue per order21.7%5.0%67%
Four weeks, units per order17.2%5.2%72%
Twelve weeks, revenue per order39.2%5.1%46%
Twelve weeks, units per order38.6%3.8%49%

The longer the test, the more repeat orders, and the worse the order-level interval: it was 67% of the correct width in four weeks and 46% in twelve. A check on the advertising data, where nobody visits twice, gave the same interval both ways, as it must: the delta method only matters when a unit has more than one event.

Adjusting for pre-test data

The Criteo data hold 13,979,592 users from randomised advertising tests, 85% shown ads, with 12 anonymised features measured before the test. Adjusting visits for those features removed 25.8% of the noise. The users needed per arm to detect a 5% lift fell from 178,400 to 130,200.

Share of noise removed by adjusting for pre-test data
Data and metricAdjusted forNoise removed
Criteo, visits12 features, straight line25.8%
Criteo, visits12 features, binned prediction from the other half21.8%
Criteo, conversions12 features, straight line11.3%
Criteo, conversions12 features, binned prediction from the other half4.0%
E-mail test, spendprior spend0.04%
E-mail test, spendall pre-test fields0.08%
E-mail test, visitsprior spend0.4%
E-mail test, visitsall pre-test fields2.8%

The classic version, adjusting for the same metric before the test, did almost nothing on the e-mail test: prior spend removed 0.04% of the noise in spend. Adjustment only pays where the pre-test data predict the outcome.

One result was not planned for. On Criteo the adjustment moved the estimate itself: the lift in visits fell from 1.03 to 0.77 points, a 25% drop, about 21 times its standard error. In one clean randomised test that should not happen. A balance check, added after the results, found the arms differ before the test by up to 0.049 standard deviations. That passes the common rule of thumb of 0.1, yet it is 65 times what chance would leave. The publisher built these data from several tests and sampled them unevenly, so the share shown ads likely differs by source test.

These data cannot say which estimate is right. The adjustment removes differences in the 12 features, not differences between source tests that the features miss, so neither number is trusted until the arms are checked at the source. The 27% saving in users is a calculation on these published data, and it is why adjustment is a trial in the plan, not yet a rule. Balance is better judged against chance than against 0.1.

Segment effects: does a correction change the call?

Each of the 12 features was cut into fifths, which left 24 usable segments. Each segment was tested against the rest of the users on 28 random slices of about 498,000 users, the size of a large test. A segment found on one slice counts as real if the other 27 slices show the same direction at 5%.

Segments flagged per slice, and how many held on the other 27
RuleFlagged per sliceHeld elsewhere
Each segment at 5%21.699.8%
Holm correction19.4100.0%
False discovery rate, 5%21.2100.0%

The prediction was that half the uncorrected finds would fail. Nearly all held, and the correction changed almost no call. The lift here is concentrated: in the lowest fifth of one feature, 18% of users, ads lifted visits by 4.4 points, against 0.18 points for everyone else. When effects differ this much, a correction costs little and finds the same segments. The features are anonymised, and part of the difference may be which source test a user came from. So these data cannot test the rule in the plan, that unplanned cuts are leads, not results: they test it only where effects are this large.

One test, read out

The MineThatData e-mail test sent 21,387 customers a women's e-mail and held out 21,306. The data are public and older than this study, so the test was not planned here. The study's design, written before any result, fixed a two-sided 5% test, 80% power, a 5% lift in visits, a check on the split and conversion as the guardrail. Reading this test as one ship call with them was chosen after the results. Detecting a 5% lift on its 10.6% visit rate needs 52,900 users per arm, so this test could see lifts of 7.9% or more.

The readout, with 95% intervals
MetricControlLift95% interval
Visits10.6%+4.5 points3.9 to 5.2
Spend per customerUS$0.65+US$0.42US$0.17 to US$0.68
Conversion (guardrail)0.57%+0.31 points0.15 to 0.47

The split passed (chance of a gap this size 0.90), the guardrail rose, and adjusting for prior spend changed nothing. The call: ship the women's e-mail. The observed lift, 43%, was far above what the test was built to detect.