Measuring Incremental Conversions from a Holdout-Based Ad Test
Statistics & ExperimentsModel answerLast updated
Estimate conversion lift from test and holdout counts, test it, size the experiment to detect a 5% relative lift at 90% power, and restate the analysis in Bayesian terms.
Scenario
A brand runs a campaign on a large social platform. It wants to know whether the ads caused extra purchases, compared with a holdout group of users who were kept from seeing them.
You have, for each group, the number of users and the number of those users who converted.
Questions
- How would you estimate the lift of the campaign and judge whether it is statistically significant? Cover absolute and relative lift, a hypothesis test, and confidence intervals. Also say what you would check about how the groups were formed.
- How many users do you need to detect a 5% relative lift with 90% power? State any assumption you need, such as the baseline conversion rate.
- A stakeholder asks for a Bayesian analysis instead. How would you reframe the estimation, the decision, and the sample-size planning?
Give a structured answer with formulas, a short worked example, trade-offs, and the mistakes you would watch for.
Hints
Hint 1
Before any formula, ask who is being compared. The holdout users never saw the ad, so a fair comparison needs either all assigned users on both sides or a way to identify holdout users who would have been exposed.
Hint 2
For significance, use a two-proportion z-test with a pooled variance under the null. For a relative-lift interval, work on the log of the rate ratio and exponentiate, which gives an asymmetric interval.
Hint 3
Sample size scales like (1-p)/(p·r²) for baseline p and relative lift r, so rare conversions and small lifts are costly. For the Bayesian version, put a Beta prior on each rate, update it with the counts, and summarize the posterior of p_T/p_C - 1 from samples.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
1. Define the quantities and check the design
For each arm, let n be the users, x the conversions, and p̂ = x/n the observed rate (T for test, C for holdout).
- Absolute lift: Δ = p_T − p_C
- Relative lift: L = p_T/p_C − 1
- Incremental conversions: Δ · n_T. This is what feeds incremental ROAS.
Design checks come first. Statistics cannot fix a biased comparison.
- Users must be randomized into test and holdout before ad delivery.
- Do not compare exposed test users with all holdout users. Only some assigned users win an auction, and those users differ systematically from the rest, so this comparison is biased.
- Use one of two valid comparisons:
- Intent-to-treat (ITT): everyone assigned to test versus everyone assigned to holdout. It is unbiased but diluted by unexposed test users.
- Predicted-exposure ("ghost ad") comparison: flag holdout users who would have been exposed, and compare them with exposed test users. This gives an effect on the exposed and is more sensitive.
2. Significance and intervals
Test. H₀: p_T = p_C. Use a two-sided test unless a one-sided one was pre-registered. Under H₀, pool the rates:
p̂ = (x_T + x_C)/(n_T + n_C), SE₀ = √(p̂(1−p̂)(1/n_T + 1/n_C)), z = (p̂_T − p̂_C)/SE₀
This is equivalent to a chi-square test on the 2×2 table (χ² = z²). With very small counts, use Fisher's exact test.
Interval for absolute lift. Use the unpooled SE: √(p̂_T(1−p̂_T)/n_T + p̂_C(1−p̂_C)/n_C).
Interval for relative lift. Use the delta method on the log ratio:
Var[log(p̂_T/p̂_C)] ≈ (1−p̂_T)/(n_T p̂_T) + (1−p̂_C)/(n_C p̂_C)
Build the interval on the log scale, then exponentiate. The result is asymmetric, as it should be for a ratio.
Worked example. The test arm has 2,200 conversions out of 100,000 and the holdout has 2,000 out of 100,000.
- Rates are 2.2% and 2.0%, so relative lift is 10% and absolute lift is 0.2 percentage points.
- Pooled rate is 2.1%, SE₀ ≈ 6.41×10⁻⁴, so z ≈ 3.12 and two-sided p ≈ 0.002.
- Log-ratio variance is 0.978/2200 + 0.98/2000 ≈ 9.35×10⁻⁴, so SE ≈ 0.0306.
- 95% interval on the log scale is 0.0953 ± 1.96·0.0306. Exponentiated, the rate ratio lies in [1.036, 1.168].
- So the lift is roughly 3.6% to 16.8%.
3. Sample size for a 5% relative lift at 90% power
The baseline rate is required. Assume p_C = 2%, so p_T = 2.1% and δ = 0.001. Use α = 0.05 two-sided, so z₁₋α/₂ = 1.96, and power 90%, so z₁₋β = 1.2816.
Per group with equal allocation:
n = ( z₁₋α/₂·√(2p̄(1−p̄)) + z₁₋β·√(p_C(1−p_C) + p_T(1−p_T)) )² / δ²
With p̄ = 0.0205, both square roots are about 0.2004. The bracket is 0.3928 + 0.2568 = 0.6496. Then n ≈ 0.422 / 10⁻⁶ ≈ 422,000 per arm, or about 844,000 in total.
Rule of thumb. Since (1.96 + 1.28)² ≈ 10.5, n per arm ≈ 21·(1−p)/(p·r²), where r is the relative lift.
- Halving the detectable lift quadruples n.
- Halving the baseline rate roughly doubles n.
Unequal splits. Advertisers often want a small holdout, say 10%. Total sample inflates by 0.25/(k(1−k)) for a minority share k. At k = 0.1 that factor is about 2.8, so roughly 2.3M users in total. The trade-off is that a larger holdout costs reach, while a smaller one costs time.
Reducing n. Use CUPED (adjust with pre-period behavior), stratification, or a ghost-ad comparison, which removes the noise from users who were never exposed.
4. Bayesian reframing
Model. Give each arm a Beta-Binomial model:
p ~ Beta(a, b), x | p ~ Bin(n, p) ⇒ p | x ~ Beta(a + x, b + n − x)
- Priors: Beta(1,1) is a flat default. A better choice is an informative prior fitted to past campaigns in the same vertical, for example centered near 2% with a few thousand pseudo-observations. A hierarchical model across campaigns shrinks noisy estimates toward a sensible value.
- Inference: Sample both posteriors and compute L = p_T/p_C − 1 per draw.
What to report.
- P(L > 0 | data). In the example it is about 0.999.
- A 95% credible interval for L, roughly 3.5% to 17% with flat priors. It can be read directly as "95% probability the true lift is in this range."
- P(L > threshold), where the threshold is the lift needed to break even on incremental ROAS.
- Expected loss, E[max(p_C − p_T, 0)]. Ship or stop once it falls below a tolerance the business accepts.
import numpy as np
rng = np.random.default_rng(0)
pT = rng.beta(1 + 2200, 1 + 100000 - 2200, 200_000)
pC = rng.beta(1 + 2000, 1 + 100000 - 2000, 200_000)
lift = pT / pC - 1
print((lift > 0).mean(), np.percentile(lift, [2.5, 97.5]))
Planning size. Replace power with a precision target, such as a credible interval of ±2.5 points of lift. Alternatively, compute assurance, the prior-averaged probability of reaching a conclusive result, by simulating from the prior.
Peeking. Posteriors remain coherent under optional stopping, but stopping the moment P(L > 0) > 0.95 still inflates false positives when judged by frequentist standards. Pre-specify the decision rule and, if needed, calibrate it by simulation.
5. Common mistakes
- Comparing exposed test users with all holdout users, or with unexposed users who were never randomized. This is selection bias.
- Using a symmetric normal interval on relative lift when the baseline is small or the sample is modest. Use the log-ratio interval.
- Quoting a lift without the baseline rate. A 10% lift on 0.1% and on 10% mean very different things.
- Calling a sample size "enough" without stating α, power, baseline, and allocation.
- Running a one-sided test after seeing the data.
- Reading a p-value as the probability that the ads work, or reading a confidence interval as a credible interval.
- Peeking repeatedly at a fixed-horizon frequentist test.
- Ignoring that a statistically significant lift may be too small to pay back the ad spend.