Sub topic 12
Designing the follow-up test
This chapter assumes you can already read CTR, CVR, CPA and ROAS, and that you have a prioritized hypothesis and a decision to iterate. It turns that hypothesis into a test you can trust.
Start from the hypothesis
Take the top-ranked idea and write it in one sentence: "Changing X will move metric Y by at least Z, because of reason R." For example: "Shortening the signup form will raise landing-page conversion rate from 4% to 5%, because the drop-off happens at the form."
Each part of that sentence fixes a design choice:
- X is the single change. If you change the headline and the form together, a win cannot be traced to either one.
- Y is the primary metric. Choose it before the test starts, and keep it to one.
- Z is the minimum lift worth acting on. It sets how much data you need.
Choose the design elements
| Element | What to decide | Example |
|---|---|---|
| Control | The current version, unchanged | Existing 8-field form |
| Variant | One change only | 4-field form |
| Primary metric | One metric, fixed in advance | Landing-page CVR |
| Guardrail metrics | Metrics that must not get worse | CPA, lead quality |
| Audience | Who is eligible, and the random split | All paid traffic, 50/50 |
| Stop rule | Sample size or end date, set before launch | 14 days or required sample |
Guardrails matter because a variant can win on the primary metric and still lose money. A shorter form may raise signups while lowering lead quality.
Size the test before launching
The smaller the lift you want to detect, the more traffic you need. A standard two-proportion formula, at 5% significance and 80% power, gives the visitors needed per arm.
from math import ceil
from statistics import NormalDist
def sample_size_per_arm(p_base, p_target, alpha=0.05, power=0.80):
z_alpha = NormalDist().inv_cdf(1 - alpha / 2)
z_beta = NormalDist().inv_cdf(power)
variance = p_base * (1 - p_base) + p_target * (1 - p_target)
return ceil((z_alpha + z_beta) ** 2 * variance / (p_target - p_base) ** 2)
n = sample_size_per_arm(0.04, 0.05)
print(n) # about 6,700 visitors per arm
print(ceil(n / 500), "days at 500 visitors per arm per day")If the required duration is longer than you can wait, you have three options. Test a bigger change, accept a larger minimum lift, or test on a metric higher in the funnel, such as CTR, which has more events.
Protect the test while it runs
Most failed tests fail from avoidable errors during the run, not from bad design.
- Randomize at the user level, not by day or by channel. Otherwise the arms differ in audience, not only in the change.
- Run both arms at the same time. Comparing this week to last week mixes in seasonality and budget changes.
- Run in whole weeks so that weekday and weekend behavior is balanced across arms.
- Do not stop early because a result looks good. Peeking at a running test and stopping at the first significant reading inflates false positives. Wait for the planned sample.
- Do not change budgets, targeting or creative during the test.
Write the plan down
Record the plan before launch, in a short note: hypothesis, change, primary metric, guardrails, sample size, dates and decision rule. The decision rule states what you will do for each outcome. For example: "If CVR is up and CPA does not rise by more than 5%, scale. If the result is flat, stop and test a different hypothesis. If the result is negative, revert." Writing this in advance stops you from rationalizing the result afterward. It also gives the next chapter its raw material: the learning log.
Exercise
Your baseline CVR is 4%, and your sample-size calculation says the test needs 6,700 visitors per arm. After 3 days you see p = 0.03 in favor of the variant, with about 1,500 visitors per arm. Should you stop and ship the variant? Explain.
Show answer
No. The planned sample has not been reached. Stopping at the first significant reading (peeking) inflates the false-positive rate, and 3 days also misses weekday and weekend differences. Keep the test running to the planned sample and a whole number of weeks. Then apply the decision rule you wrote before launch, checking the guardrails too.