Sub topic 7
Pitfalls: small samples, cherry-picking, and averages that mislead
This chapter assumes you can compute CTR, CVR, CPA, and ROAS, and that you know what a p-value and a two-proportion test are from the earlier chapter on noise and significance. The Python examples use only the standard library.
A significance test answers one narrow question: how surprising is this gap if the two variants were identical? It cannot tell you whether you asked the question fairly, chose the data fairly, or summarized it fairly. Most bad campaign decisions come from those three failures, not from arithmetic mistakes.
Pitfall 1: small samples make noise look like signal
With few conversions, one or two extra purchases move a rate a lot. Suppose variant A gets 4 conversions from 100 visitors and variant B gets 6. B looks 50% better, but the difference is two people.
The simulation below runs many A/A tests, where both variants share the same true 4% rate. It counts how often B still looks at least 25% better than A.
import random
random.seed(7)
def false_win_rate(n, rate=0.04, trials=1000, lift=0.25):
wins = 0
for _ in range(trials):
a = sum(random.random() < rate for _ in range(n))
b = sum(random.random() < rate for _ in range(n))
if a > 0 and b >= a * (1 + lift):
wins += 1
return wins / trials
for n in (100, 500, 5000):
print(n, false_win_rate(n))The exact numbers depend on the seed. The pattern does not: at 100 visitors per arm, a large "win" appears often even though nothing changed. At 5,000 per arm it becomes rare.
Two rules follow from this:
- Count conversions, not just visitors. A rate built on fewer than about 30 to 50 conversions per arm is fragile, even when the visitor count looks large.
- Decide the sample size before the test starts, using the baseline rate and the smallest lift you care about. The earlier chapter on significance covers how.
Peeking and early stopping
Checking a running test every day and stopping when p drops below 0.05 inflates false positives. The p-value moves around as data arrives, and it will dip below the threshold by chance at some point more often than 5% of the time. Fix the stopping rule in advance: a sample size or an end date. If you must monitor continuously, use a method designed for it, such as a sequential test, and do not reuse the fixed-sample z-test.
Small samples hide in segments
A campaign with 50,000 clicks can still have a segment with 40 clicks. When you slice by region, device, or audience, every slice has its own sample size. Report the denominator next to every rate.
Pitfall 2: cherry-picking and multiple comparisons
Cherry-picking means reporting the comparisons that look good and ignoring the rest. It is rarely deliberate. It usually happens like this: the overall result is flat, so you slice by device, region, age band, and creative, and then you find one slice with p = 0.03.
Each extra comparison is another chance for noise to cross the threshold. If every comparison uses a 5% false-positive level, the chance of at least one false positive among k independent tests is 1 − 0.95^k.
alpha = 0.05
for k in (1, 5, 10, 20):
chance = 1 - (1 - alpha) ** k
print(k, round(chance, 3))
# 1 0.05
# 5 0.226
# 10 0.401
# 20 0.642With 20 slices, you should expect a "significant" result somewhere even when nothing real is happening.
Ways to guard against it
- Name your primary KPI and your primary comparison before looking at results. Treat everything else as exploratory.
- Count how many comparisons you ran, including the ones you dropped. Report the count.
- For a planned set of comparisons, tighten the threshold. The simple Bonferroni rule divides alpha by the number of comparisons, so 10 comparisons need p < 0.005.
- Treat a surprising segment result as a hypothesis. Confirm it with a fresh test that targets that segment, rather than acting on it directly.
Other forms of selective reporting
- Choosing the window. Starting the chart on the best week, or ending it before a dip, changes the story. Use the window the test was planned for.
- Choosing the metric. If the primary KPI (CPA) did not move but a secondary one (CTR) did, do not rename CTR as the goal afterwards.
- Survivorship. Looking only at ads that are still running ignores the ones that were paused for poor results, which makes the average look better than the campaign really was.
Pitfall 3: averages that mislead
Averages compress a distribution into one number. That is useful, but several common summaries mislead.
Averaging rates instead of pooling counts
An average of segment rates gives a small segment the same weight as a large one. The correct overall rate is total conversions divided by total clicks.
| Segment | Clicks | Conversions | CVR |
|---|---|---|---|
| Mobile | 10,000 | 200 | 2% |
| Desktop | 2,000 | 160 | 8% |
| Overall (pooled) | 12,000 | 360 | 3% |
The simple average of 2% and 8% is 5%. The true overall rate is 3%. The same applies to ROAS: averaging daily ROAS values is not the same as total revenue divided by total spend, and the daily average overweights low-spend days. Always recompute a ratio from the summed numerator and denominator.
Skewed values: mean versus median
Order value, revenue per user, and time on page often have a long right tail. One large order from a single buyer can lift the mean revenue per conversion for the whole variant. Check the median and the top few values before you credit a creative with a revenue lift. If one customer explains the gap, the result is not about the creative.
Simpson's paradox
A variant can win in every segment and still lose overall, when the segments are mixed in different proportions. This happens when traffic is not split evenly between segments, for example when a platform's delivery system sends one ad mostly to mobile users.
data = {
"A": {"mobile": (200, 6), "desktop": (1800, 144)},
"B": {"mobile": (1800, 63), "desktop": (200, 18)},
}
for variant, segments in data.items():
total_clicks = sum(c for c, _ in segments.values())
total_conv = sum(v for _, v in segments.values())
for name, (clicks, conv) in segments.items():
print(variant, name, f"{conv / clicks:.2%}")
print(variant, "overall", f"{total_conv / total_clicks:.2%}")
# A mobile 3.00%
# A desktop 8.00%
# A overall 7.50%
# B mobile 3.50%
# B desktop 9.00%
# B overall 4.05%B beats A on mobile (3.5% against 3.0%) and on desktop (9% against 8%). Yet A wins overall (7.5% against 4.05%), because A's traffic was mostly desktop, where conversion is high, and B's was mostly mobile.
Which number should guide the decision? The segment-level comparison is the fair one here, since it compares like with like. The overall figure mixes the effect of the creative with the effect of who saw it. Check the traffic mix of each variant before trusting a pooled comparison.
Pitfall 4: other traps that look like results
- Statistical significance is not practical significance. With enough traffic, a 0.02 percentage-point lift can have p < 0.001. Ask whether the lift is worth the cost of the change, using a confidence interval for the size of the effect.
- Non-significant does not mean no effect. A flat result from an underpowered test says "we could not tell." It does not say "the change does nothing."
- Regression to the mean. The best performer of last week was partly lucky. Its next week is likely to look worse even if you change nothing. This is especially common after you pause the worst ads and keep the best.
- Correlation read as cause. Conversions rose the week you changed the headline, but also the week a competitor ran out of stock. Only a controlled split isolates your change.
- Mixed or shifting conditions. Holiday weeks, budget changes, or a new audience mid-test turn a comparison into a comparison of different situations.
A pre-decision checklist
The diagram shows the order of checks to run before acting on a result.
Summary table
| Pitfall | What it looks like | Guard |
|---|---|---|
| Small sample | Big lift on few conversions | Plan sample size; show denominators |
| Peeking | Stopping when p dips below 0.05 | Fix the stopping rule in advance |
| Cherry-picking | One winning slice out of many | Pre-register the primary comparison; correct for multiple tests |
| Averaged rates | Overall rate far from the pooled rate | Divide summed numerators by summed denominators |
| Skewed values | One huge order drives the mean | Check the median and top values |
| Simpson's paradox | Winner flips when segments are pooled | Compare within segments; check traffic mix |
| Tiny but significant | Real but worthless lift | Judge effect size and cost |
Exercise
A test of two landing pages reports an overall CVR of 5.0% for page 1 and 3.5% for page 2, with p = 0.01. You then notice that in each of the three device segments, page 2 has the higher CVR, and that page 1 received 80% of its traffic from desktop while page 2 received 80% from mobile. Which of the pitfalls above applies, and what should you do before choosing a winner?
Show answer
This is Simpson's paradox. The overall gap reflects the different traffic mix, since desktop converts better than mobile, and not necessarily the page itself. Compare the pages within each device segment, check that each segment has enough conversions, and if the split was uneven by design or by delivery, rerun the test with balanced traffic before declaring page 1 the winner.
Exercise
You tested one ad against another on 12 audience segments and found one segment with p = 0.04. Roughly how likely is it that you would see at least one p below 0.05 among 12 independent comparisons if the ads were identical, and what is the right next step?
Show answer
About 1 − 0.95^12, which is roughly 46%. A single p = 0.04 among 12 comparisons is weak evidence. Treat it as a hypothesis, then run a new test aimed only at that segment, with a planned sample size, before changing budget.