Is a 4.2% CTR Actually Good? A Hypothesis Testing Walkthrough
Statistics & ExperimentsModel answerLast updated
Given a campaign click-through rate, formally test whether it beats a benchmark and interpret both statistical and practical significance.
Setting the Scene
Your team has been running a digital ad campaign. Someone pulls the dashboard and reports a click-through rate of 4.2%. A stakeholder immediately asks: "Is that good?"
Your job is to turn that vague question into a rigorous statistical analysis.
What You Need to Do
1. Formulate hypotheses Set up a null and alternative hypothesis for evaluating whether this CTR meets expectations. What benchmark would you use? Where would it come from? When would you choose a one-sided vs. two-sided test?
2. Identify missing inputs Before running any test, what additional information do you need? Think about what makes a CTR meaningful and what could make the data untrustworthy.
3. Choose and justify a test Which statistical test is appropriate here, and why? What distributional assumptions are you relying on?
4. Work through the numbers Using these values:
- n = 10,000 impressions
- 420 clicks (p̂ = 4.2%)
- Historical benchmark p₀ = 3.5%
- Significance level α = 0.05
Compute the test statistic, p-value, and a 95% confidence interval. Interpret each one.
5. Address practical significance Statistical significance is not the whole story. What does a 0.7 percentage point lift actually mean for the business? What else would you check?
What a Strong Answer Covers
- Correct model for click data (Binomial / Bernoulli trials)
- Awareness of the difference between the null standard error and the observed standard error
- Why Wilson intervals are preferred over Wald for proportions
- Power analysis: how many impressions are needed to reliably detect this effect?
- Common traps: one-sided tests chosen after peeking, correlated impressions, conflating statistical and practical significance
Hints
Hint 1
Model each impression as an independent Bernoulli trial with click probability p. Clicks therefore follow a Binomial(n, p) distribution. Ask yourself: is the independence assumption always safe? What happens when one user sees the same ad multiple times?
Hint 2
For the test statistic, use the null proportion p₀ (not p̂) to compute the standard error — that's what a z-test requires. For the confidence interval, you switch to using p̂. The Wilson score interval handles edge cases near 0 or 1 better than the simpler Wald formula.
Hint 3
A p-value below 0.05 tells you the lift is probably real, not that it matters. Translate the absolute lift (+0.7 pp) into business impact — extra clicks, downstream conversions, cost per acquisition — and compare it to whatever minimum effect size would actually change a decision.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
What This Question Is Really Testing
A bare CTR number carries no meaning on its own. The interviewer wants to see you refuse to answer "is 4.2% good?" without first demanding a reference point and a sample size, then work through the mechanics correctly, and finally connect the math back to a business decision.
Step 1: Hypotheses and Benchmark
Model each impression as a Bernoulli trial: click with probability p, no click with probability 1 − p. Aggregated over n impressions, clicks ~ Binomial(n, p).
"Meets expectations" requires a benchmark p₀. In rough order of preference:
- The same campaign in the prior period (controls for creative and audience)
- A concurrent holdout group (controls for seasonality too — the strongest design)
- A comparable past campaign on the same channel
- An industry benchmark (weakest, because audience, placement, and creative differ)
Two-sided hypotheses (the default):
- H₀: p = p₀
- H₁: p ≠ p₀
One-sided, only if the direction was committed to before looking at the data:
- H₀: p ≤ p₀
- H₁: p > p₀
Choosing one-sided after observing 4.2% > 3.5% halves the p-value dishonestly. Say that out loud.
Step 2: What to Ask for Before Computing Anything
- n and x. A 4.2% CTR from 500 impressions vs. 10 million are completely different claims.
- The benchmark source. Same channel, placement, audience segment, creative format, and season.
- Unit of analysis. If one user sees the ad 10 times, those 10 impressions are correlated — the Binomial variance is too small. Aggregate to unique users or use a cluster bootstrap.
- How CTR is defined. Clicks per impression vs. unique clicks per unique user can diverge significantly.
- Data quality. Bot filtering, tracking pixel changes, attribution window.
- Business context. Minimum detectable effect that would actually change spend decisions; downstream conversion rate.
Step 3: Test Selection
| Scenario | Test |
|---|---|
| Benchmark is a fixed historical number | One-sample proportion z-test (exact binomial if counts are small) |
| Benchmark is a concurrent control group | Two-proportion z-test or chi-square |
| Impressions are correlated (repeat users) | Aggregate to user level; delta method or bootstrap |
For the confidence interval, use the Wilson score interval rather than the Wald interval. Wald can produce negative lower bounds and has poor coverage at small n or extreme p. At large n they converge, but Wilson is the right habit.
Step 4: Worked Computation
Given: n = 10,000, x = 420, p̂ = 0.042, p₀ = 0.035, α = 0.05.
Test statistic (null standard error, not observed):
SE₀ = √(p₀(1 − p₀) / n)
= √(0.035 × 0.965 / 10,000)
= 0.001838
z = (0.042 − 0.035) / 0.001838 = 3.81
p-value:
- Two-sided: 2 × (1 − Φ(3.81)) ≈ 1.4 × 10⁻⁴
- One-sided: ≈ 7 × 10⁻⁵
Wilson 95% CI:
z_c = 1.96
center ≈ (p̂ + z_c²/2n) / (1 + z_c²/n) ≈ 0.04218
half ≈ z_c × √(p̂(1−p̂)/n + z_c²/4n²) / (1 + z_c²/n) ≈ 0.00393
CI: [3.82%, 4.61%]
Interpretation. The p-value says that if the true CTR were 3.5%, a result this extreme would occur roughly once in 7,000 trials — reject H₀. The entire confidence interval sits above 3.5%, which gives the same conclusion geometrically. The plausible range for the true CTR is about 3.8% to 4.6%.
The effect of sample size. Keep p̂ = 4.2% but drop to n = 1,000 (42 clicks). SE₀ grows to 0.0058, z = 1.20, and the two-sided p-value is about 0.23 — fail to reject. A non-significant result at n = 1,000 is not evidence of no effect; the test simply lacks power. This is exactly why sample size is the first thing you ask for.
Step 5: Power and Error Tradeoffs
Sample size for 80% power to detect p₀ = 3.5% → p₁ = 4.2% at two-sided α = 0.05:
n = [z_α/2 × √(p₀q₀) + z_β × √(p₁q₁)]² / (p₁ − p₀)²
≈ [1.96 × 0.1838 + 0.84 × 0.2006]² / (0.007)²
≈ 5,700 impressions
n = 10,000 clears that bar comfortably. n = 1,000 does not, so a null result there is inconclusive, not "no effect."
- Type I error (false positive): declaring the campaign better than the benchmark when it isn't. Risk: scaling spend on something mediocre.
- Type II error (false negative): missing a real improvement. Risk: killing a good campaign.
Step 6: Practical Significance
Statistical significance only tells you the lift is probably real. Whether it matters is a separate question.
- Volume. At 10M impressions per month, +0.7 pp is roughly 70,000 extra clicks.
- Value. Multiply by conversion rate and revenue per conversion; compare to incremental media cost.
- Against a decision threshold. If the minimum lift to justify scaling is +1 pp, the result is statistically significant but the CI upper bound (~1.1 pp) barely grazes that bar — not a confident yes.
- CTR is a proxy metric. Clickbait creative can inflate CTR while tanking post-click conversion. Always check conversion rate, cost per acquisition, and return on ad spend before declaring success.
Reference Code
from math import sqrt
from scipy.stats import norm, binomtest
def ctr_test(clicks: int, n: int, p0: float, alpha: float = 0.05) -> dict:
p_hat = clicks / n
# One-sample z-test: use null standard error, not observed
se0 = sqrt(p0 * (1 - p0) / n)
z = (p_hat - p0) / se0
p_value = 2 * norm.sf(abs(z)) # two-sided
# Wilson score interval
zc = norm.ppf(1 - alpha / 2)
denom = 1 + zc**2 / n
center = (p_hat + zc**2 / (2 * n)) / denom
half = zc * sqrt(p_hat * (1 - p_hat) / n + zc**2 / (4 * n**2)) / denom
# Exact binomial as a sanity check
exact_p = binomtest(clicks, n, p0).pvalue
return {
"p_hat": round(p_hat, 5),
"z": round(z, 3),
"p_value": round(p_value, 6),
"wilson_ci": (round(center - half, 4), round(center + half, 4)),
"exact_p": round(exact_p, 6),
}
print(ctr_test(420, 10_000, 0.035))
# {'p_hat': 0.042, 'z': 3.81, 'p_value': 0.000139,
# 'wilson_ci': (0.0382, 0.0461), 'exact_p': 0.000133}
Common Mistakes
- Answering without a benchmark or sample size. 4.2% is neither good nor bad in isolation.
- Using p̂ in the test's standard error. The z-test requires the null standard error (p₀). The confidence interval uses p̂. These are different formulas for different purposes.
- Treating correlated impressions as independent. Repeat exposures per user inflate the effective sample size and overstate significance.
- Picking a one-sided test after seeing the direction of the data. Decide the directionality of the test before looking.
- Reading "not significant" as "no effect." In an underpowered study, failing to reject H₀ just means the data were insufficient — it is not evidence that the null is true.
- Stopping at p < 0.05. A statistically significant result still needs a business case. Always translate the lift into decisions and downstream metrics.