Sub topic 1
What an A/B test is and when it is worth running
Prerequisites
This chapter assumes you already know the following:
- Basic email marketing terms: list, campaign, open rate, click rate.
- How percentages and proportions work, for example that 400 clicks out of 20,000 sends is 2%.
- A basic idea of probability and averages.
- Optionally, how to read a short Python snippet. The one code example here is small.
You don't need statistics training yet. Later chapters cover sample size and significance testing in detail. This chapter gives you the working model and a way to decide whether a test is worth running at all.
What an A/B test is
An A/B test is a controlled experiment. You change one thing between two versions of a message, send each version to a randomly chosen part of your audience, and compare a pre-chosen outcome. In email, the two versions are usually called variant A (the control, your current approach) and variant B (the challenger).
Three words in that definition matter:
- Controlled. Everything except the change you are studying stays the same: sender name, content, list, and sending conditions.
- Randomly chosen. Chance, not your judgment, decides who gets which version. Random assignment is what lets you attribute a difference to the change instead of to the audience.
- Pre-chosen outcome. You decide the metric before you send. Choosing it after you see the data invites false winners.
Compare this with the informal alternative: send last month's campaign on Tuesday, this month's on Thursday with a different subject line, and see which did better. Many things changed, including the audience, the season, and the offer. You cannot say which change caused the result. An A/B test removes that ambiguity by sending both versions at the same time to comparable groups.
What a test can and cannot tell you
A test answers a narrow question: for this audience, under these conditions, did version B produce a different rate of the chosen outcome than version A, and how large was the difference? It does not tell you why the difference occurred, and it does not guarantee the result will hold for a different audience or next year.
Two sources of difference exist between any two groups:
- A real effect of your change. This is what you want to measure.
- Random variation. Even if both groups receive the identical email, their click rates will differ a little by chance.
The rest of this tutorial is largely about separating these two. A test with enough recipients, a clean design, and a sound significance test lets you say how likely it is that an observed gap is just noise.
What you can test in email
Almost any element can be varied, but this tutorial focuses on two:
| Element | Example change | Typical primary metric |
|---|---|---|
| Subject line | Question versus statement, with or without a number | Click rate (open rate is unreliable, as a later chapter explains) |
| Send time | Tuesday 09:00 versus Thursday 15:00 in the recipient's local time | Click rate |
Other candidates include preheader text, sender name, call-to-action wording, and layout. The same method applies to all of them. The constraint is always the same: change one thing at a time, or you won't know which change mattered.
When a test is worth running
Running a test costs something. You need engineering or tooling effort, careful setup, and time. A test also holds back part of your list from the better variant while it runs. A test is worth running when the following conditions hold.
- You have a decision it can change. If you would send version B regardless of the result, skip the test. A test is useful only if one outcome makes you act differently from another.
- Your list is large enough to detect a difference you care about. This is the most common reason tests fail. Small differences in click rate need many recipients to detect. A test on 800 recipients can only reveal very large effects, and will usually end in "no clear difference".
- The outcome is measurable and close to a business goal. Clicks, conversions, or revenue per recipient qualify. A metric that does not reflect real behavior, such as raw opens, does not.
- The result will be reusable. A test on a one-off announcement teaches little. A test on a recurring newsletter format, or on a rule such as "short subject lines work better for our audience", pays off across many future sends.
- You can wait for results. Clicks and conversions accumulate over hours or days. If you must send within the hour, a test cannot finish in time.
A quick feasibility check
The following Python function estimates the smallest absolute difference in click rate that a test can reliably detect, given the number of recipients per variant. It uses a standard normal approximation with a 5% significance level and 80% power. Later chapters explain these terms. For now, read the output as "the smallest lift this test would usually notice".
from math import sqrt
from statistics import NormalDist
def minimum_detectable_difference(p_base, n_per_variant, alpha=0.05, power=0.8):
z_alpha = NormalDist().inv_cdf(1 - alpha / 2)
z_beta = NormalDist().inv_cdf(power)
standard_error = sqrt(2 * p_base * (1 - p_base) / n_per_variant)
return (z_alpha + z_beta) * standard_error
for n in (1000, 5000, 20000):
diff = minimum_detectable_difference(0.02, n)
print(f"n per variant={n:>6}: detectable lift ~ {diff * 100:.2f} points "
f"({diff / 0.02 * 100:.0f}% relative)")With a baseline click rate of 2%, 5,000 recipients per variant can detect a lift of about 0.78 percentage points. That is a relative improvement of roughly 39%, from 2.0% to about 2.8%. With 20,000 per variant, the detectable lift falls to about 0.39 points, a relative gain of about 20%. Most subject line changes produce effects much smaller than 39%. If your list is small, the honest conclusion is often that a single test cannot answer your question.
Common situations where a test is not the right tool
- Tiny lists. With a few hundred recipients per variant, only huge effects are detectable. Consider pooling several sends over time, or relying on best practices and qualitative feedback instead.
- Changes you must make anyway. Legal text, unsubscribe links, and corrections do not need testing.
- Questions about why. A test shows that B beat A, not why. Surveys and customer interviews answer "why".
- Changes that affect everyone at once. If a change cannot be assigned per recipient, for example a domain-wide change to sender reputation, random assignment is impossible.
- Tests that would be confounded. If both groups cannot be sent under comparable conditions, the result will not be interpretable. Send-time tests need extra care here, and a later chapter covers it.
The shape of a sound test
The rest of this tutorial walks through these steps in order. They are listed here so you can see how each later chapter fits.
- Write a hypothesis that names one change and one primary metric.
- Choose a metric that reflects real behavior.
- Assign recipients to variants at random.
- Calculate the sample size before sending.
- Send both variants under the same conditions, except for the change.
- Wait until the planned sample is reached, without peeking and stopping early.
- Run a significance test and read the effect size.
- Roll out the winner if there is one, and log the result.
Skipping any step does not make the test impossible, but it does reduce how far you can trust the answer. Steps 3, 4 and 6 are the most often skipped, and they cause most false winners.
Key points
- An A/B test varies one thing, assigns recipients at random, and compares a metric chosen in advance.
- Randomization and a single change are what let you attribute a difference to your change instead of to the audience.
- A test is worth running when it can change a decision, your list is large enough to detect a meaningful effect, and the metric is reliable.
- Small lists often cannot detect realistic subject line effects, so check feasibility before you invest.
Exercise
Your list has 6,000 subscribers and a baseline click rate of 2%. You want to test two subject lines by splitting the list in half. Using the approximate figures from this chapter (about 0.78 points detectable at 5,000 per variant), is the test likely to detect a lift from 2.0% to 2.3%? Explain your answer and suggest one alternative.
Show answer
Probably not. With 3,000 recipients per variant, the smallest reliably detectable lift is larger than the 0.78 points seen at 5,000 per variant (roughly 1 point). A lift of 0.3 points is much smaller than that, so the test would usually come back "no significant difference" even if the effect is real. Alternatives include testing a bolder change that could plausibly produce a larger effect, combining results across several sends of the same newsletter, or choosing not to test and picking the subject line based on your existing guidelines.