Two-Arm Booking Uplift: Significance, Day Clustering, and Sizing
Statistics & ExperimentsModel answerLast updated
Analyze a one-week A/B test on booking conversion: run an unpooled z-test, apply an ICC design-effect correction, size a follow-up test, and plan heterogeneity checks.
An e-commerce team ran a one-week experiment (2025-08-26 to 2025-09-01) on a new booking flow. Only totals over the whole week are available.
| Arm | Visits | Bookings |
|---|---|---|
| Control (C) | 10,240 | 308 |
| Treatment (T) | 10,180 | 351 |
Answer the following.
- Point estimates. Compute each arm's conversion rate, the absolute lift (in percentage points), and the relative lift.
- Significance. Run a two-sided test on the difference in proportions using the unpooled standard error. Report the z statistic, the p-value, and a 95% confidence interval for p_T − p_C. State whether you used a continuity correction.
- Day-level clustering. Assume visits are grouped by calendar day (7 clusters per arm) with ICC = 0.01. Use the design effect DE = 1 + (m̄ − 1) · ICC, where m̄ = n_arm / 7. Compute the effective sample size n / DE for each arm and redo the p-value and CI. Explain the assumptions behind this correction and where it breaks down.
- Power and duration. How many visits per arm are needed to detect an absolute lift of 0.30 pp over a 3.00% baseline, with 80% power, two-sided α = 0.05, and an unpooled z-test? Show the formula. Then inflate the figure using the design effect for ICC = 0.01 and state how long the test would run if each arm gets 2,000,000 visits per day.
- Robustness. Describe how you would check whether the effect varies from day to day (for example a Q-test or a weekday interaction) and how the result would shape a launch decision.
Hints
Hint 1
For the unpooled test, add the two per-arm variances p(1−p)/n before taking the square root. Compute the z statistic as the observed difference divided by that standard error.
Hint 2
The design effect inflates each arm's variance by DE. Check how the answer changes when m̄ is tied to daily traffic, and ask whether a 2,000,000-visits-per-day cluster size makes sense for the formula.
Hint 3
Both arms run on the same seven days, and randomization happens at the visit or user level. Think about which day-level shocks cancel in the treatment-minus-control difference, and whether a paired-by-day analysis is more appropriate than treating the arms as independently clustered.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
What a strong answer shows
Three things: a clean two-proportion test, an understanding of how clustering inflates variance, and the judgment to notice when a mechanical correction gives an absurd result (here, a test lasting more than a year).
1) Point estimates
- p_C = 308 / 10,240 = 3.008%
- p_T = 351 / 10,180 = 3.448%
- Absolute lift = +0.440 pp
- Relative lift = 0.034479 / 0.030078 − 1 ≈ +14.6%
2) Unpooled two-proportion z-test
SE = √[ p_C(1−p_C)/n_C + p_T(1−p_T)/n_T ]
- Control variance term: 2.849 × 10⁻⁶
- Treatment variance term: 3.270 × 10⁻⁶
- Sum: 6.119 × 10⁻⁶, so SE ≈ 0.2474 pp
Results:
- z = 0.4401 / 0.2474 ≈ 1.78
- Two-sided p ≈ 0.075
- 95% CI = 0.440 ± 1.96 × 0.247 ≈ [−0.045, +0.925] pp
I apply no continuity correction, since each arm has about 300 events and the normal approximation is adequate. As a check, a Yates adjustment shrinks the difference by about 0.0098 pp, giving z ≈ 1.74 and p ≈ 0.082. The conclusion is the same: not significant at 5%, but leaning positive.
3) Day-level clustering
| m̄ = n/7 | DE | n_eff | |
|---|---|---|---|
| Control | 1,462.9 | 15.62 | ≈ 656 |
| Treatment | 1,454.3 | 15.53 | ≈ 655 |
Multiplying each variance term by its DE gives 4.45 × 10⁻⁵ and 5.08 × 10⁻⁵. The adjusted SE is √(9.53 × 10⁻⁵) ≈ 0.976 pp, roughly 3.95 times the naive value.
- z ≈ 0.45, p ≈ 0.65
- 95% CI ≈ [−1.47, +2.35] pp
With only 7 clusters per arm, a t reference (about 12 df, critical value 2.18) is more honest and widens the CI to roughly [−1.69, +2.57] pp.
Assumptions:
- Clusters are about equal in size and visits within a day are exchangeable.
- One known ICC applies to both arms.
- Day effects are independent between arms.
Limitations:
- Shared days make the correction too conservative. Both arms see the same days, and assignment is per visit or user. A holiday or campaign hits both arms and largely cancels in the difference. The right analysis is paired by day: compute the daily difference d_k and use its spread across the 7 days.
- ICC = 0.01 is large for conversion. It implies a day-to-day SD of about 1.7 pp around a 3% rate, which deserves scrutiny.
- Seven clusters is very few. Both the normal approximation and any ICC estimate are unstable at this count.
- Users span days. Repeat visitors break visit-level independence, so clustering by user (with delta-method standard errors) is often the more important fix.
4) Power and sample size
n per arm = (z_{1−α/2} + z_{1−β})² · [p₁(1−p₁) + p₂(1−p₂)] / δ²
With p₁ = 0.030, p₂ = 0.033, δ = 0.003 and (1.960 + 0.842)² ≈ 7.849:
- Variance sum = 0.0291 + 0.03191 = 0.06101
- n = 7.849 × 0.06101 / 9 × 10⁻⁶ ≈ 53,200 visits per arm (about 106k total)
Naive clustered version. Reusing DE ≈ 15.6 from part 3 gives about 830,000 per arm, which is under half a day at 2M visits per day. You would still run at least a week to cover weekday patterns. This is internally inconsistent, because m̄ is no longer about 1,460 once a day has 2M visits.
Self-consistent version. Setting m̄ = 2,000,000 per day:
- DE = 1 + 1,999,999 × 0.01 ≈ 20,001
- n ≈ 53,208 × 20,001 ≈ 1.06 × 10⁹ visits per arm
- Duration ≈ 1.06 × 10⁹ / 2 × 10⁶ ≈ 532 days
The logic: with ICC = 0.01, a day can contribute at most about 1/ICC = 100 effective observations however large its traffic. You need roughly 53,200 / 100 ≈ 532 independent days, and extra daily traffic does not help.
An answer of 532 days signals that the independent-cluster model does not fit this design. Because both arms share every day, day effects cancel in the difference. Size the test on user-level variance (about 53k per arm, well under one day of traffic), and run one to two full weeks to cover weekday cycles and novelty decay.
5) Robustness to day-to-day heterogeneity
Per-day lifts and Cochran's Q. For each day compute d_k and SE_k, set w_k = 1/SE_k², and calculate Q = Σ w_k (d_k − d̄_w)², compared with χ² on 6 df. Report I² = (Q − 6)/Q as the share of variation beyond chance. Plot d_k over time to look for novelty or fading effects.
Interaction model. Fit a logistic regression of booking on treatment × weekday with day fixed effects, using user-clustered robust errors. Test the interaction terms with a likelihood-ratio test.
Effect on the launch decision:
- Homogeneous effect (Q insignificant, I² near 0): the pooled estimate is credible. With p ≈ 0.075 and a CI that includes zero, do not launch yet. The point estimate (+0.44 pp) exceeds the 0.30 pp target, so extend to the powered size instead of abandoning the idea.
- Heterogeneous effect (for example, only weekends, or decaying over the week): the pooled figure misleads. Run longer, report by segment, and decide on the stabilized later-period effect.
- A day with a clearly negative lift: investigate for logging bugs, overlapping launches, or sample ratio mismatch. Here 10,240 vs 10,180 is fine (χ² ≈ 0.18).
Common mistakes
- Using the pooled SE when the unpooled one is requested.
- Quoting a one-sided p (about 0.038) as if it were two-sided.
- Multiplying by DE without noticing that m̄ grows with traffic, which yields the 532-day answer.
- Treating shared-day arms as independent clusters.
- Launching on the point estimate alone.