Sub topic 13
Reading effect size, not only the p-value
This chapter assumes you can run the two-proportion z-test from the previous chapter and know what a p-value is. You should also be comfortable with click rate as a proportion. The aim is to decide what a result means for your campaigns, not only whether it is "significant".
What the p-value does and does not say
A p-value answers one question: if the two variants truly performed the same, how often would chance alone produce a gap at least this large? A small p-value is evidence that some difference exists. It says nothing about how big the difference is or whether it matters.
Sample size drives this. With a very large list, a tiny gap can give a small p-value. With a small list, a large and useful gap can fail to reach significance.
Effect size in two forms
Effect size is the size of the difference. Report it in two ways:
- Absolute lift is the difference in rates, in percentage points. Going from 2.00% to 2.35% is 0.35 points.
- Relative lift is the absolute lift divided by the baseline. Here it is 0.35 / 2.00 = 17.5%.
Relative lift sounds impressive, so always show the absolute figure next to it. Revenue depends on the absolute change in clicks across your whole list.
Add a confidence interval
A single lift number hides uncertainty. A 95% confidence interval gives a range of differences that the data fits reasonably well. This code extends the earlier test:
from math import sqrt
from statistics import NormalDist
def lift_with_interval(success_a, sent_a, success_b, sent_b, confidence=0.95):
p_a = success_a / sent_a
p_b = success_b / sent_b
diff = p_b - p_a
se = sqrt(p_a * (1 - p_a) / sent_a + p_b * (1 - p_b) / sent_b)
z = NormalDist().inv_cdf(1 - (1 - confidence) / 2)
return diff, diff - z * se, diff + z * se
diff, low, high = lift_with_interval(400, 20000, 470, 20000)
print(f"lift={diff:.4f} interval=({low:.4f}, {high:.4f})")For 400 clicks against 470 clicks on 20,000 sends each, the output is about lift=0.0035 interval=(0.0006, 0.0064). The p-value is about 0.016, so the result is significant. The interval shows what that means in practice. The true gain could be as small as 0.06 points (a 3% relative gain) or as large as 0.64 points (a 32% relative gain).
Judging whether the lift matters
Decide before the test what the smallest worthwhile lift is. This is the minimum detectable effect you used for sample size. Then compare the whole interval with it.
| Interval position | Reading | Typical action |
|---|---|---|
| Entirely above the worthwhile lift | Clear, useful win | Roll out the winner |
| Straddles the worthwhile lift | Real difference, uncertain value | Roll out if the change is free, or retest with more recipients |
| Above zero but entirely below the worthwhile lift | Real but trivial | Pick either variant, and don't build a strategy on it |
| Includes zero | Inconclusive | Do not claim a winner |
Common reading errors
- Treating "not significant" as "no difference". The test may have been too small to see the effect. Check the interval width.
- Quoting only relative lift. A 50% relative gain on a 0.1% click rate is 0.05 points.
- Expecting the measured lift to repeat. Winners picked from noisy data tend to look better than they are. The effect you measure is often an overestimate, so plan around the lower end of the interval.
- Ignoring the metric. A lift in open rate may reflect Mail Privacy Protection, not interest. Judge effect size on your primary metric, usually clicks.
Exercise
Test A has a 3.0% click rate and test B has 3.1%. Each variant had 2,000,000 recipients, and p = 0.001. A colleague says B is "clearly better, so we should rebuild all our templates around its style." How do you respond?
Show answer
The p-value shows the gap is probably not chance, but the lift is only 0.1 points (about 3% relative). The huge sample made a tiny effect significant. Compute the interval and compare it with the minimum lift worth acting on. B is probably a fine default, but the gain is too small to justify rebuilding templates.