Methods

One question, the right method, checked on public data.

Wind Tunnel covers 12 kinds of analysis, and 10 of them run on your own numbers in the Agent. Each one below has a worked example on public data and the result of a check written before it ran, including where the method fell short. Every number on this page is read from the files the check scripts write. These are worked examples on public datasets, not results from a customer’s data.

Jump to a worked example for your industry: Retail and e-commerce, Advertising, Email and CRM, Delivery and logistics, Streaming and media, Search and SEO, Real estate.

A/B/n test with chance of best

Which of several versions is best, and how sure can I be? Compares two or more versions on the same traffic. Besides the usual significance test, it simulates each version’s rate thousands of times from its counts to give the chance each one is best and what you lose by picking it if it is not.

10,281 Upworthy headline tests with 3 to 8 headlinesReal data

In the largest 7-headline test, Headline D has a 34% chance of being best and Headline E 23%: a lead, not yet a winner.

Headline D · 0.69% clicks34%Headline E · 0.67% clicks23%Headline C · 0.66% clicks16%Headline F · 0.65% clicks13%Headline B · 0.64% clicks12%Headline G · 0.57% clicks2%Headline A · 0.51% clicks0%
Chance each headline is best, from 4,000 simulated draws of every headline’s click rate.

How well it did when checked

With a flat prior, when it said a headline was 89% likely to come out on top, it did only 80% of the time on traffic it had not seen. A prior learned on 400 other tests brings that to 85% for a stated 89%: closer, still a little high.

  • Tests checked10,281each headline’s traffic split in half at random
  • Score of its chances (lower is better)0.139with the learned prior; 0.141 with a flat prior, 0.168 for calling every headline equally likely
  • Said 80%+ with the learned priorbest 85% of the time919 headlines, said 89% on average
  • Said 80%–100%, flat priorbest 80% of the time1,471 headlines, said 89% on average
  • Said 50%–80%, flat priorbest 50% of the time4,956 headlines, said 62% on average
  • Said 20%–50%, flat priorbest 30% of the time12,139 headlines, said 33% on average
  • Said 0%–20%, flat priorbest 10% of the time28,669 headlines, said 7% on average

Limits

  • Assumes visitors were randomly assigned and rates stayed steady during the test.
  • High chances run somewhat high when versions differ little. The learned prior pulls them back part of the way, not all of it, so treat a lone “likely best” under 90% as a lead.
  • Reads conversion-type metrics; revenue per visitor uses the ratio and CUPED reads.

Source: Upworthy Research Archive (Matias, Munger, Le Quere and Ebersole, 2021).

On your data: runs in the Agent on numbers you paste or a file you load.

Sequential testing (checking early, safely)

Can I check results while the test runs and stop early without fooling myself? Peeking at an ordinary test every day and stopping when it looks significant makes false winners far more likely. Sequential tests set the bar for each look so the error rate holds however you stop.

600 Upworthy headline pairs replayed visitor by visitor at their measured ratesSimulated from real rates

Checking an ordinary test at each of 10 looks raised false winners from 5% to 19% when the two versions were identical.

False winners when nothing changed

Ordinary test, checked every …18.5%Planned looks3.7%Check any time (normal mixtur…0.0%Check any time (exact)0.0%

Real differences called

Ordinary test, checked every …48%Planned looks34%Check any time (normal mixtur…8%Check any time (exact)4%
Each pair of headlines replayed visitor by visitor at its measured rates, with ten looks. 5% false winners is the target.

How well it did when checked

With the 10 looks planned ahead, false winners stayed at 3.7% and it called 34% of real pairs (a single read at the end calls 36%). Checking at any time, unplanned, is safe too but called only 8%: on small tests like these, that freedom costs most of the power.

  • Ordinary test, checked every look19% false winnerscalls 48% of real pairs, 2.3% the wrong way
  • Planned looks (group sequential)3.7% false winnerscalls 34%, uses 89% of planned traffic on average
  • Check any time (normal mixture)0.0% false winnerscalls 8%; its scale (1.00 pts) was picked on separate practice tests
  • One read at the planned endcalls 36%the yardstick: no early stop

Limits

  • Planned looks need the total traffic fixed before the test, and only planned looks may be read.
  • Check-any-time tests are slow to call small differences on low traffic; use them when you must watch continuously.
  • Assumes steady rates; a weekday or launch spike can still mislead an early look.

Source: Upworthy Research Archive (Matias, Munger, Le Quere and Ebersole, 2021).

On your data: runs in the Agent on numbers you paste or a file you load.

Always-valid intervals for revenue and other continuous metrics

Can I watch revenue per customer every day and stop when it is clear, without fooling myself? Reads the difference in a continuous metric such as spend at every look, with an interval that stays valid however often you look and whenever you stop. It needs only each arm’s running count, sum and sum of squares; a pre-period metric (CUPED) narrows it when it predicts the outcome, and a sample-ratio check runs on the same looks.

42,613 customers in Hillstrom’s e-mail test, and 381 metric paths from ASOS’s published online experimentsReal data

Read every 1,000 customers, the men’s e-mail’s lift in two-week spend was clear from 12,000 customers on; at all 42,613 it was $0.77 per customer, with an always-valid interval of $0.33 to $1.21.

-2.00.53.020002300042613clear from hereEstimatet-test, lowt-test, highZero

Estimated lift, $ per customerAlways-valid 95%Ordinary t-test 95%, valid only if read once

Calls the final read did not confirm, ASOS experiments

Ordinary t-test, every look119 of 224Always-valid interval31 of 105
Customers in a random order, read every 1,000 with the plan set to the final size; ASOS paths read every half day.

How well it did when checked

On 1,000 A/A tests from Hillstrom’s no-email customers, each read at every look, the always-valid interval wrongly excluded zero in 0.4% of tests, against 21% for an ordinary t-test read at every look. On 381 ASOS metric paths read every half day, peeking at a t-test made 224 calls, 119 of which the final read did not confirm; the always-valid interval made 105, 31 not confirmed.

  • Hillstrom A/A, false calls0.4%1,000 tests of 21,306 customers; t-test read every look 21%, read once at the end 4.2%
  • Hillstrom men’s e-mail, missed the truth0.7%1,000 tests of 20,000 customers; t-test read every look 17%
  • ASOS, calls not confirmed at the end31 of 105t-test read every look: 119 of 224
  • ASOS, called where the final read did not021 paths refused because their looks contradicted each other
  • Width at the planned size1.55× a single readthe price of reading at any time

Limits

  • At the planned size the interval is 1.55 times as wide as one read at the end; that single read is valid only if you look once.
  • It guards against an effect that is zero throughout, not one that fades: on ASOS, 31 of its 105 calls were not confirmed at the end. The readout shows the latest look and refuses a test whose looks contradict each other.
  • Needs at least 500 units per arm before the first read, and CUPED narrows the interval only when the pre-period metric predicts the outcome.

Source: Hillstrom (2008), MineThatData E-Mail Analytics Challenge; ASOS Digital Experiments Dataset (Liu et al., NeurIPS 2021, CC BY 4.0).

On your data: runs in the Agent on numbers you paste or a file you load.

Multi-armed bandit

Can traffic shift toward the winner while I am still testing? Thompson sampling sends more visitors to the versions that look best so far, in proportion to their chance of being best, so fewer visitors see the losers.

10,281 Upworthy headline tests replayed at their measured rates, and 26.9 million logged recommendations from ZOZOTOWNSimulated from real rates

On ZOZOTOWN’s real logs, the bandit policy had a 0.495% click rate against 0.347% for random choice: 43% more clicks.

Thompson sampling76%Equal split71%
How often each ends the test on the truly best headline; Thompson sampling also kept 58% of the extra clicks a perfect pick would add.

How well it did when checked

Replaying Upworthy tests, Thompson sampling captured 58% of the clicks a perfect pick from the start would have added, and ended on the truly best headline 76% of the time (71% for an equal split).

  • Gain captured, median58%90% interval 57%–59%
  • Ends on the best version76%equal split: 71%
  • Real logged lift (ZOZOTOWN)+42.8%90% interval +39.2% to +46.3%
  • Our forecast of that lift+35.1%its range fell short of the measured lift: it under-forecast
  • Read after the bandit, 90% rangeheld 88%with every version kept at 5% or more and the logged shares reweighted (adaptive AIPW); 79% with no floor and a plain difference

Limits

  • A bandit maximizes clicks during the test; it gives a weaker read on how much better the winner is. Keeping every version at 5% or more and reweighting by the logged shares brings the 90% range for a difference from 79% to 88% of replays, still a little short of 90%.
  • Needs fast feedback; for outcomes that take weeks, use a fixed test.
  • Assumes rates stay steady; a changing audience needs a discounted bandit.

Source: Upworthy Research Archive; Open Bandit Dataset (Saito et al., 2021, ZOZO, CC BY 4.0).

On your data: Score a bandit policy on your logged data before letting it run.

Multivariate (full-factorial) test

Which combination of changes works best, and do the changes interact? Crosses two or more changes (say 3 headlines × 2 images) and reads each change’s own effect, whether they interact, and each combination’s chance of being best.

254 Upworthy tests that crossed every headline with every imageReal data

In a 3 × 2 test, the headline mattered (Headline B −0.41 pts) and the image barely did; the factors look independent (interaction test p = 0.64).

Headline A · Image 2 · 0.89%58%Headline A · Image 1 · 0.86%39%Headline C · Image 1 · 0.67%2%Headline C · Image 2 · 0.63%1%Headline B · Image 1 · 0.39%0%Headline B · Image 2 · 0.31%0%
Each headline × image combination: its click rate and its chance of being best.

How well it did when checked

Interactions were rare: 11% of tests showed one at p < 0.05, against 5% by chance. With a flat prior its “likely best” calls came true 51% of the time when it said 67%; with a prior learned on separate practice tests, 67% when it said 63%.

  • Tests with an interaction11%254 tests; 5% expected if none interact
  • Flat prior: said ≥50% bestbest 51%said 67% on average, 118 combinations: overconfident
  • Learned prior: said ≥50% bestbest 67%said 63% on average, 33 combinations
  • Score of chances (lower is better)0.1540.161 with a flat prior; scored on 208 held-out tests

Limits

  • Every combination must run; 3 × 2 × 2 is already 12 versions to fill with traffic.
  • Detecting an interaction takes about four times the traffic of a main effect of the same size.
  • The learned prior comes from one publisher’s tests; your own past tests should set yours.

Source: Upworthy Research Archive (Matias, Munger, Le Quere and Ebersole, 2021).

On your data: runs in the Agent on numbers you paste or a file you load.

Uplift: who responds (causal inference)

Who does this change work for, and should I target only them? T- and X-learners estimate each customer’s own lift from a randomized test, rank customers by it, and check on customers held out whether the top-ranked really respond more.

42,693 customers in Hillstrom’s randomized e-mail testReal data

Ranked by the X-learner, the top fifth of held-out customers responded +6.0 pts and the bottom fifth +1.4 pts, against +4.2 pts overall.

-0.9 pts10.0 ptsTop fifth6.0 pts measuredFifth 28.3 pts measuredFifth 34.8 pts measuredFifth 40.6 pts measuredBottom fifth1.4 pts measured
Held-out customers ranked by predicted lift: the measured visit lift in each fifth, with its 90% range.

How well it did when checked

E-mailing the top 40% it picked kept 68% of the visits from e-mailing everyone. But the plain rule “e-mail past women’s-line buyers” kept 94% at the same volume, against 86% for the model: here the simple rule did at least as well, and we say so.

  • Group 1 by predicted lift+6.0 pts90%: +4.2 pts to +7.9 pts
  • Group 2 by predicted lift+8.3 pts90%: +6.6 pts to +10.0 pts
  • Group 3 by predicted lift+4.8 pts90%: +3.1 pts to +6.4 pts
  • Group 4 by predicted lift+0.6 pts90%: −0.9 pts to +2.1 pts
  • Group 5 by predicted lift+1.4 pts90%: −0.3 pts to +3.1 pts
  • Simple rule at its own volume94%model at that volume: 86%

Limits

  • Needs a randomized test with enough customers in each arm; on observational data every learner assumes nothing unmeasured drove who was treated.
  • Rankings are checked on held-out customers only; never trust a fit scored on its own rows.
  • Always compare with the rule a marketer would write without a model.

Source: Hillstrom (2008), MineThatData E-Mail Analytics Challenge.

On your data: The T- and X-learner ranking above is a worked example; it does not run on your data in the app yet. The who-gains method runs on a randomized test’s customer file and checks each group on customers held out.

Heterogeneous effects: who gains, checked on customers the model never saw

Does the change work better for some customers than others, and is that real or noise? A machine-learning score ranks customers by how much they should gain; the score is then questioned on customers it never saw: does the true effect rise where the score says, and by how much in each fifth. Segments you name before the test get their own effects, adjusted for testing many at once.

42,693 customers in Hillstrom’s randomized e-mail testReal data

On the women’s e-mail, the fifth of customers the score ranked highest gained +6.9 pts in visit rate and the lowest fifth +2.4 pts, against +4.4 pts on average; the top and bottom fifths differ most in men’s purchases last year and women’s purchases last year.

0.0 pts9.3 ptsTop fifth6.9 ptsFifth 46.6 ptsFifth 33.8 ptsFifth 22.9 ptsBottom fifth2.4 pts
Women’s e-mail: the visit lift in each fifth of customers ranked by the score, measured on customers each split held out, with its 95% range (medians over 20 splits).

How well it did when checked

On 400 A/A tests with no heterogeneity it made no false calls, and adjusting for the 7 past-year spend bands named in advance brought false segment calls from 19.0%–23.5% to 2.0%–3.0%. With a known spend effect planted on the top half of past-year spend, the bands were called different in 90% of 100 runs, never in the wrong direction. Its slope of 0.32 says the score spreads customers further apart than their true effects differ, so predicted gains should be shrunk by that slope before targeting; the readout reports it.

  • Heterogeneity called, women’s e-mailyesslope 0.32 (95%: 0.13 to 0.52); 1 would mean the score is calibrated
  • Top fifth minus bottom fifth+4.2 pts95%: +0.9 pts to +7.5 pts, on customers each split held out
  • A/A tests, false heterogeneity calls0 of 400false segment calls 2.0%–3.0% with Benjamini-Hochberg, 19.0%–23.5% without
  • Planted effect, spend bands called90%2.2 right-way calls per run, none the wrong way; average-effect interval held the truth in 100%

Limits

  • Built never to cry wolf, so it needs many customers: on half of this test (21,346 customers) it called the difference in 1 of 10 halves, and with a planted effect on 21,306 customers the score-based call found it in 9% of runs. Segments named in advance are the stronger route.
  • Randomized tests only: the assignment share must be known. It refuses below 1,000 customers and segments under 200.
  • The covariates that separate the top and bottom fifths describe who gains, not why; they often move together.

Source: Hillstrom (2008), MineThatData E-Mail Analytics Challenge.

On your data: runs in the Agent on numbers you paste or a file you load.

Novelty and primacy: does the effect fade or grow?

Will the lift I see in the first days last, or is it people trying something new? Reads the effect separately for each stretch of days since a person first saw the change, on the same people throughout, and runs one test, fixed in advance, of whether it fades or grows. It reports the lasting effect from the last stretch beside the average, and checks whether the change follows the date people arrived rather than how long they have had it.

3,989 aircraft flying from New York in 2013, departures a day from each one’s first New York flight of the yearReal data

With a fading effect added to a random half of the aircraft, the readout measured +0.34 departures a day on the first day and +0.05 on days 8 to 13 (truth +0.05), and called it fading; the plain average over the two weeks said +0.10, about 2.0 times the lasting effect.

0.000.40Plain average 0.10Day 0truth 0.300.34 measuredDay 1truth 0.200.21 measuredDays 2–3truth 0.120.14 measuredDays 4–7truth 0.070.08 measuredDays 8–13truth 0.050.05 measured

Measured, with 95% range; tick marks the truthPlain average over 14 days

Extra departures a day added to a random half of the aircraft, read by days since each one’s first flight; the last row is the lasting effect.

How well it did when checked

On 500 A/A splits it called a fade or a rise 4.6% of the time, and a steady effect was called steady in 95.5% of 200 runs. A fading effect was called fading in 100% of runs and a growing one growing in 100%; the lasting effect’s interval held the truth in 95.5%, while the plain average’s interval held it in 4.5%.

  • A/A splits, fade or rise called4.6%500 random splits; 5% allowed
  • Fading effect, called fading100%200 runs; lasting effect held the truth in 95.5%
  • Plain average holds the lasting effect4.5%what a readout of the whole-test average would claim
  • Growing effect, called growing100%200 runs
  • Effect that fades with the date, flagged75.5%a four-week test; 98.5% looked like a fade by days since exposure

Limits

  • The calendar check is weak: when an effect fades with the date instead of with time since exposure, it flagged 75.5% of runs at full size and only 22.0% at half size. When most people arrive in the first days, a quiet check does not rule the calendar out.
  • Reads only people seen for the whole window, so the latest arrivals drop out; it needs at least 500 of them in each arm.
  • The lasting effect is the last stretch you watched, not forever: an effect still fading on day 13 may keep fading.

Source: nycflights13 (Wickham), via Rdatasets.

On your data: runs in the Agent on numbers you paste or a file you load.

Switchback tests with carryover

How do I test a change that applies to everyone at once, like pricing or dispatch, when it lingers after I switch it off? Switches the change on and off over time on a schedule built for a carryover you name in advance, then reads the effect of leaving it on, with an interval from the design’s exact probabilities and a randomization test. It also checks whether the effect spilled into the next period.

Hourly departure delays at New York’s three airports in 2013, and for the checks Victoria’s hourly electricity demand and daily ridership at five Chicago L stationsReal data

In four weeks of June hours with a change added that lingers two hours, leaving it on added 13.5 min of delay. The readout estimated 7.4 min, with a 95% interval from −0.3 min to 15.1 min that holds the truth but reaches past zero, so it did not call it in this one test; the plain on-against-off comparison said 7.7 min, sure of it, with an interval that misses the truth.

−1 min16 minTruth 13.5 minReadout, 95%7.4 minPlain on against off7.7 min

Truth: delay added by leaving the change on

Interval held the truth when the change lingered, 300 tests per series

Victoria power, readout94%Victoria power, plain28%NY flight delays, readout97%NY flight delays, plain11%Chicago L riders, readout98%Chicago L riders, plain30%
The worked example is one four-week test in June; the bars are tests drawn at random across each series. 95% is the target.

How well it did when checked

On 300 A/A tests per series it called an effect 1.3%–4.3% of the time and the plain comparison 3%–17%. With a change that lingers, its interval held the truth in 94%–98% of runs, against 11%–30% for the plain comparison, which came out 32%–39% too low. Dropping the first periods after each switch, as current switchback tools do, was about as accurate when the carryover was as assumed.

  • A/A tests, effect called1.3%–4.3%randomization test 5.0%–6.7%; plain comparison 3%–17%
  • Lingering change, interval held the truth94%–98%bias within ±2%; plain comparison 11%–30%
  • Lingering change, carryover flagged34%–57%flagged 0.3%–0.7% of the time when nothing lingered
  • Dropping the first periods after each switch93%–96%interval held the truth; similar accuracy when carryover is as assumed

Limits

  • You must name how long the change lingers before the test. When it lingered longer than named, the interval held the truth in only 57%–78% of runs and the estimate fell 19%–30% short; dropping the first periods after each switch held up better (81%–93%). Name it generously.
  • The carryover check misses much real carryover: it flagged 34%–57% of runs. A quiet check is not proof that nothing lingers.
  • It needs many switches: a few weeks of hours, or months of days. In a noisy stretch like this June example, one test can leave a real effect uncalled.

Source: nycflights13, tsibbledata and modeldata via Rdatasets; Bojinov, Simchi-Levi and Zhao (2023).

On your data: runs in the Agent on numbers you paste or a file you load.

Network effects: when users affect each other

My users affect each other, through friends, sharing or referrals. Is my A/B test still right, and how do I test a change that spreads? Checks an ordinary user-randomized test for spillover between friends with an exact test. For a new test, it builds clusters from your friendship graph (a fixed partition, or a fresh randomized one-hop-max clustering per test), flips one coin per cluster, and reads the effect of launching to everyone from users whose friends mostly share their arm. The call comes from a randomization test; the readout is repeated under four other ideas of how spillover travels, the spillover test is run on the same assignment, and a half-cluster, half-user design measures interference directly in your own data.

Three held-out Twitch friendship networks (18,323 streamers, real mutual follows and real view counts), effects planted; worked example on a fourth networkSimulated from real rates

On 1,912 Portuguese-speaking streamers, with a change that adds 0.1 sd of log views to a treated user and 0.5 sd times the share of their friends treated, launching to everyone adds 0.6 sd. A plain A/B test read 0.12 sd, with an interval that misses the truth, and the spillover test flagged it (p = 0.0005). On 35 graph clusters the readout estimated 0.29 sd, with an interval from −0.26 sd to 0.83 sd that holds the truth but reaches past zero; the randomization test gave p = 0.04.

−0.3 sd0.9 sdTruth 0.6 sdReadout on graph clusters0.29 sdTreated against control clusters0.27 sdPlain A/B, users0.12 sd

Truth: launching to everyone

Bias left, as a share of the truth, on the held-out networks

Twitch, English, readout14%Twitch, English, plain A/B69%Twitch, Spanish, readout19%Twitch, Spanish, plain A/B70%Twitch, French, readout22%Twitch, French, plain A/B70%
Real friendship graphs and view counts; the effects are planted. Bias is averaged over spillover, competition and two-step spillover, 500 tests each.

How well it did when checked

On 3 held-out networks, 500 tests each, a plain A/B readout missed the effect of launching to everyone by 69%–70% on average when it spilled between friends. This readout cut that to 14%–22%, against 30%–45% for comparing treated with control clusters, and its interval held the truth in at least 100% of runs. Its interval is wide: at the planted sizes it called an effect in 0% of runs, and it was less accurate than the plain readout on 2 of 3 networks. Since version 1.2 the call comes from the randomization test, which in 200 runs on each of 6 networks called planted spillover in 16%–34% of runs, against 0.1%–0.4% for the interval, and called an effect in 5.0% of A/A tests; those networks had all been used in development.

  • Bias left, share of the truth14%–22%cluster comparison 30%–45%; plain A/B 69%–70%
  • Interval held the truth, with spillover100%cluster comparison 54%–85%; plain A/B 0%
  • A/A tests, randomization test called an effect3.4%–5.8%interval 0%; 5% allowed
  • Randomization test, planted spillover found9%–66%the interval alone found none at these sizes
  • Version 1.2 call, planted spillover found16%–34%randomization test, 6 networks × 200 runs, development evidence; the interval found 0.1%–0.4%; A/A 5.0%, 5% allowed
  • Randomized one-hop-max clustersA/A 4.3%; spillover found 14%–24%bias left 5%–46% of the truth against 6%–34% for fixed clusters; interval held the truth in 97%–100% of runs
  • Other ideas of how spillover travelstwo-hop share 7% bias at mostdefault (75% of friends) 29% at most; at least two treated friends 56% at most
  • Half cluster, half user design flagged interference7%–12%5.1% with none, 5% allowed; refused for too few clusters in 8% of runs
  • Spillover test on a plain A/B test, no spillover4.0%–5.4%flagged 6%–15% at 0.1 sd of spillover, 32%–96% at 0.5 sd, 88%–100% at 1 sd

Limits

  • Bias is cut, not removed: 14%–22% of the truth remained, from friends in other clusters. Twitch graphs cluster poorly (41%–61% of a user’s friends in their own cluster); a graph that clusters better leaves less.
  • The interval is conservative, about twice the estimate’s real spread, so since version 1.2 the call comes from the randomization test instead; even so it finds planted spillover in only 16%–34% of runs at these sizes. When nothing spills over, a plain A/B test is several times more accurate.
  • The version 1.2 checks (randomization call, randomized clusters, other exposure ideas, the half-cluster design) reused the six networks read while building versions 1.0 and 1.1, because no fresh social network was reachable; they are development evidence until rerun on networks not used here.
  • The half-cluster, half-user design is real ground truth but has little power at these sizes: it flagged planted interference in 7%–12% of runs. It needs many clusters to say more than “not shown”.
  • A tighter bound, 24%–31% narrower, was scored on the same networks under a second fixed plan. It held the truth in 98%–100% of runs at the planted sizes but only 87%–91% when spillover was 1.1 sd, because the estimate’s leftover bias then fills half its width, so it is offered as an option and not used by default.
  • A quiet spillover test is not proof of none: at 0.1 sd of spillover it flagged only 6%–15% of tests.
  • Needs the friendship or interaction graph, at least 20 clusters, and at most 12,000 users for the readout; the effects in these checks were planted on real graphs, not measured in a real experiment.

Source: MUSAE Twitch networks (Rozemberczki, Allen and Sarkar 2021), SNAP; Ugander et al. (2013), Eckles, Karrer and Ugander (2017), Aronow and Samii (2017), Athey, Eckles and Imbens (2018).

On your data: runs in the Agent on numbers you paste or a file you load.

Synthetic control

What did a change do when I could not randomize it, like a launch in one region? Builds a weighted blend of untouched regions that tracked the changed one before the change, and reads the effect as the gap after. Placebo runs on every untouched region show whether the gap is unusual.

California’s 1988 tobacco tax (Proposition 99), cigarette sales in California and 36 untouched states, 1963–1992Real data

After the tax, California sold an estimated 15.2 fewer packs per person a year than its synthetic twin (Connecticut, Nevada, Utah and others).

67.5105142196319781992taxCaliforniaSynthetic California

CaliforniaSynthetic twin

Gap after the tax, against placebo states

-16.9-2.412.2196319781992taxplacebo 1placebo 2placebo 3placebo 4placebo 5placebo 6placebo 7placebo 8placebo 9placebo 10placebo 11placebo 12California

California’s gapUntouched states run as if taxed

How well it did when checked

The estimated drop ranked 5 of 37 against placebo states (p = 0.14; 0.15 counting only placebo states that fit as well before the tax): about 1 in 7 untouched states showed a gap as extreme, so on its own this is not a clear or significant effect. A fake change eight years earlier also showed a gap, so this data settles neither the drop nor its size. On 300 simulated panels it raised 6% false alarms at p ≤ 0.10, while a structural time-series model (in the style of CausalImpact), shown here until December 2026, had a 90% band that held the truth only 71% of the time with 13% false alarms, so it was retired.

  • California, average gap-15.2 packsplacebo rank 5 of 37, p = 0.14: not significant
  • Simulation: false alarms6%synthetic control at p ≤ 0.10, 10% allowed
  • Simulation: finds a real drop49%at p ≤ 0.10, on a drop twice the size of the noise
  • Retired: structural model’s 90% bandheld the truth 71%too narrow, so it no longer runs

Limits

  • Untouched regions must not feel the change, and nothing else may hit only the changed region at the same time.
  • With 20 untouched regions the smallest possible p-value is 1 in 21.
  • Needs a long, steady history before the change.

Source: Baltagi’s state cigarette panel (R package Ecdat); Abadie, Diamond and Hainmueller (2010).

On your data: runs in the Agent on numbers you paste or a file you load.

Time-series forecasting: ETS, SARIMA, Prophet and LSTM

What will this metric be over the coming weeks or months? Fits several forecasting models, from a seasonal baseline to Prophet and an LSTM neural network, scores each on the series’ own past by rolling forecasts, and shows every model’s 90% band.

15 public business series: airline passengers, retail and café spending, drug sales, electricity, page viewsReal data

On airline passengers’ final year, every model is drawn against what happened; Exponential smoothing (ETS) came closest on this one series.

271462653-47-1712forecast from hereWhat happenedSame season last yearETSSARIMAProphetLSTM

What happenedSame season last yearETSSARIMAProphetLSTMETS 90% band

How well it did when checked

SARIMA cut error 22% below the seasonal baseline across 15 series. Prophet cut error 1% and the LSTM cut error 5%, both within noise of the baseline. Exponential smoothing (ETS)’s bands were closest to honest (92% of points inside its 90% band); Prophet’s were too narrow (65%).

  • SARIMA0.78× baseline error90%: 0.70–0.85; 78% inside 90% band; under a second per fit; best on 6 series
  • Exponential smoothing (ETS)0.80× baseline error90%: 0.68–0.93; 92% inside 90% band; under a second per fit; best on 6 series
  • LSTM neural network0.95× baseline error90%: 0.86–1.05; 93% inside 90% band; 3 s per fit; best on 1 series
  • Prophet0.99× baseline error90%: 0.88–1.13; 65% inside 90% band; under a second per fit; best on 1 series
  • Same season last time1.00× baseline error90%: 1.00–1.00; 76% inside 90% band; under a second per fit

Limits

  • Neural networks need long histories; on a few years of monthly data, classic models do as well or better.
  • A forecast assumes the future behaves like the past; a launch or price change breaks that.
  • Bands cover the noise the model has seen, not shocks it has never seen.

Source: Rdatasets (fpp2, datasets, AER) and Prophet’s example data.

On your data: runs in the Agent on numbers you paste or a file you load.

A worked example for each industry

The same methods serve each industry; what changes is the unit (a visitor, a send, an order, a page, a city) and the outcome. Each example below names its data and says when the change was added in simulation so the answer could be checked against the truth.

Retail and e-commerce

How much will each store type sell next year, and how sure can I be?

Demand forecast: ETS, SARIMA, Prophet and an LSTM, backtested. All 133 Australian retail series (state × store type), monthly since 1982Real data

Forecasting the last two years, ETS came out 9% better than repeating last year; Prophet was 62% worse and the LSTM 20% worse. ETS had the most honest range: its 90% band held 92% of the months.

  • ETS0.91× the errorof repeating last year (90%: 0.85–0.97); band held 92%
  • SARIMA0.92× the errorof repeating last year (90%: 0.85–0.99); band held 80%
  • Prophet1.62× the errorof repeating last year (90%: 1.51–1.75); band held 61%
  • LSTM1.20× the errorof repeating last year (90%: 1.11–1.29); band held 95%

Where it stops short. This forecasts sales if nothing changes. To forecast a change you make, such as a new checkout, use the A/B forecast, which the proof page checks on ASOS’s real tests.

Source: Australian Bureau of Statistics retail trade, via the R package tsibbledata. Other methods that fit: A/B/n test with chance of best; Sequential testing (checking early, safely); Always-valid intervals for revenue and other continuous metrics; Multi-armed bandit; Multivariate (full-factorial) test; Uplift: who responds (causal inference); Heterogeneous effects: who gains, checked on customers the model never saw; Novelty and primacy: does the effect fade or grow?; Switchback tests with carryover; Network effects: when users affect each other; Synthetic control.

Advertising

Which headline and image should the ad run, and do they work together?

Multivariate creative test, then a bandit to shift spend. 254 Upworthy tests that crossed every headline with every imageReal data

11% of the headline × image tests showed the two interacting, against 5% expected by chance: interactions happen but are uncommon, so test the full grid when you can and read each element on its own when you cannot. Shifting traffic with a bandit, replayed at the tests’ measured rates, ended on the best headline 76% of the time, against 71% for an equal split.

  • Tests with an interaction11%5% expected if none interact
  • Example: interaction p-value0.643 × 2 test
  • Bandit: share of the possible gain58%median across replays

Where it stops short. These are clicks on headlines and images. Cost per acquisition needs ad tests joined from impression to form submit, and bidding changes who sees the ad.

Source: Upworthy Research Archive (Matias, Munger, Le Quere and Ebersole, 2021). Other methods that fit: A/B/n test with chance of best; Sequential testing (checking early, safely); Always-valid intervals for revenue and other continuous metrics; Multi-armed bandit; Heterogeneous effects: who gains, checked on customers the model never saw; Novelty and primacy: does the effect fade or grow?; Switchback tests with carryover; Network effects: when users affect each other; Synthetic control; Time-series forecasting: ETS, SARIMA, Prophet and LSTM.

Email and CRM

Which e-mail worked, on what, and how many customers does the next test need?

A/B/n test on visits, purchases and spend, with an early-stopping plan. 64,000 customers in Hillstrom’s randomized e-mail testReal data

The men’s e-mail beat sending nothing on all three outcomes: +7.7 pts visits on a 10.6% base, +0.68 pts purchases and +$0.77 spend per customer, and it beat the women’s e-mail on all three too. Visits are easy to see: 1,000 customers per group caught that lift 100% of the time. Spend is not: the same test caught it 20% of the time, and 80% needs about 6,000 per group.

  • Visits, men’s e-mail+7.7 pts95%: +7.0 pts to +8.3 pts
  • Spend per customer+$0.7795%: +$0.49 to +$1.05
  • Stopped early on visits100% of runsplanned 10,000 per group, five looks; used 20% of it on average
  • False stops, no e-mail vs itself4.9%5% allowed; 1,000 random arrival orders
  • Adjusting for pre-send data1.4% tighterpast spend and recency explain little of who visits

Where it stops short. Outcomes are two weeks of visits and purchases after one send; opens, unsubscribes and the wear-out from repeated sends are not in this data. The early-stopping plan was checked on visits only, so a stop at 2,000 per group says nothing yet about revenue. To choose who gets the e-mail, the uplift model ranks customers, and there a simple rule did as well.

Source: Hillstrom (2008), MineThatData E-Mail Analytics Challenge. Other methods that fit: A/B/n test with chance of best; Always-valid intervals for revenue and other continuous metrics; Multi-armed bandit; Multivariate (full-factorial) test; Uplift: who responds (causal inference); Heterogeneous effects: who gains, checked on customers the model never saw; Novelty and primacy: does the effect fade or grow?; Time-series forecasting: ETS, SARIMA, Prophet and LSTM.

Delivery and logistics

Will a new delivery promise cut delivery time, and how many orders does the test need?

A/B test with regression adjustment (CUPED-style). 10,012 food orders from one restaurantReal data, simulated change

What is known when an order is placed (distance, hour, weekday, items) explains 65% of the variation in delivery time. Adjusting for it cut the orders needed to see a one-minute change from 1,491 to 528; in tests of 1,000 orders it found that change 96% of the time, against 62% without.

  • False alarms, no change5.5% adjusted5.2% plain; 5% allowed; 2,000 replicates
  • Found a 1-minute cut96% adjusted62% plain
  • Orders for 80% power5281,491 without adjustment

Where it stops short. The one-minute cut was added in simulation. This randomizes orders, which suits a change customers see (a promise or a fee); a change to dispatch shares couriers between versions, so randomize by time block and area (a switchback) instead.

Source: Kuhn and Johnson, R package modeldata (collection not documented). Other methods that fit: Sequential testing (checking early, safely); Always-valid intervals for revenue and other continuous metrics; Uplift: who responds (causal inference); Heterogeneous effects: who gains, checked on customers the model never saw; Novelty and primacy: does the effect fade or grow?; Switchback tests with carryover; Network effects: when users affect each other; Synthetic control; Time-series forecasting: ETS, SARIMA, Prophet and LSTM.

Streaming and media

Which artwork gets people to open a title, and how sure is the winner?

A/B/n test with chance of best. 6,438 Upworthy tests where only the image changedReal data from a nearby field

Images mattered: in the typical test the best drew 66% more clicks than the worst. When the readout said an image was at least 80% likely to be best, it was best on fresh traffic 73% of the time with a flat prior, short of the 89% it claimed. The prior learned on headline tests, never tuned on images, raised that to 79% for a stated 88%, better but still high, so treat a lone “likely best” as a lead.

  • Said ≥80% best, was best79% learned prior73% flat prior; it said 88% and 89% on average
  • Score of chances (lower is better)0.1490.153 flat prior, 0.166 for equal chances

Where it stops short. Clicks on news images stand in for artwork; plays, minutes watched and retention need member-level outcomes over weeks.

Source: Upworthy Research Archive; news images stand in for title artwork. Other methods that fit: Sequential testing (checking early, safely); Always-valid intervals for revenue and other continuous metrics; Multi-armed bandit; Uplift: who responds (causal inference); Heterogeneous effects: who gains, checked on customers the model never saw; Novelty and primacy: does the effect fade or grow?; Switchback tests with carryover; Network effects: when users affect each other; Synthetic control; Time-series forecasting: ETS, SARIMA, Prophet and LSTM.

Search and SEO

Did a site-wide template change lift organic visits?

Forecast counterfactual on your own traffic. 365 days of one blog’s visitsReal data, simulated change

With no change at all, the next 28 days’ visits landed anywhere from −22% to +25% against an ETS forecast, so visits must run more than 25% above the forecast to stand out. A 20% lift was found 62% of the time and a 10% lift 24%.

  • Lift that stands outabove 25%from 29 fake change dates
  • Found a 5% lift17%
  • Found a 10% lift24%
  • Found a 20% lift62%

Where it stops short. One site’s traffic alone shows only big changes. To see smaller ones, change half of a group of similar pages and compare with the other half (a page-group test). Rankings are not forecast.

Source: Hyndsight blog page views (Hyndman), via the R package timeSeriesDataSets. Other methods that fit: A/B/n test with chance of best; Multivariate (full-factorial) test.

Real estate

Did our marketing push in one city raise home sales?

Synthetic control with placebo cities. Monthly home sales in 26 Texas cities, 2000–2015Real data, simulated change

Each city in turn played the one with the push, from January 2011. With no push, the placebo test raised a false alarm for 8% of cities (10% allowed). A 20% rise in sales was found 58% of the time and a 10% rise 42%.

  • False alarms, no push8%p ≤ 0.10; 10% allowed
  • Found a 10% rise42%
  • Found a 20% rise58%
  • Twin’s typical error after7%median monthly miss

Where it stops short. The rises were added in simulation. With 26 cities the smallest possible p-value is 1 in 26, monthly sales are noisy, and deals close months after the first inquiry.

Source: Texas A&M Real Estate Center, via the R package ggplot2. Other methods that fit: A/B/n test with chance of best; Multivariate (full-factorial) test; Time-series forecasting: ETS, SARIMA, Prophet and LSTM.

Repeat any number

Each worked example is a script under analysis/method_demos/ that reads public data (the fetch script downloads it), runs the method and writes the JSON this page reads. Seeds are fixed, so a rerun gives the same numbers, and a rerun that comes out worse changes the sentences above too.

sh analysis/method_demos/fetch.sh
cd analysis
python -m method_demos.ab_testing
python -m method_demos.multivariate
python -m method_demos.anytime_continuous
python -m method_demos.uplift
python -m method_demos.heterogeneity
python -m method_demos.synthetic_control
python -m method_demos.time_series
python -m method_demos.industries