Start by computing the base sample size per arm using the standard two-proportion z-test formula, then sequentially apply corrections for unequal allocation, clustering design effect, attrition, and bot removal. Convert the final required sample to days using daily traffic, and clearly explain the consequences of variance mis-specification and peeking.
Pro tip: Always state your assumptions explicitly (e.g., independence, constant variance) and note that in practice you'd validate the ICC and attrition estimates from historical data; this shows rigor and awareness of real-world messiness.
Use the two-proportion z-test formula for equal allocation: n = (Z_{α/2} + Z_β)^2 * (p1(1-p1) + p2(1-p2)) / (p2-p1)^2, with p1=0.06, p2=0.063 (5% relative uplift), α=0.05, power=0.80.
Multiply the base per-arm sample by the allocation ratio correction factor: (1 + r)^2 / (4r) where r = n_treatment / n_control = 1/2. Then compute required control and treatment sizes.
Compute design effect DE = 1 + (m - 1) * ICC, where m = 1.4 sessions per user, ICC = 0.03. Multiply the sample sizes by DE to account for within-user correlation.
Inflate sample sizes by dividing by (1 - attrition_rate) and (1 - bot_rate): final_n = n_clustered / ((1 - 0.08) * (1 - 0.15)).
Divide total required sessions (control + treatment) by 120,000 sessions/day to get duration. Then explain how variance mis-specification (e.g., ignoring clustering) inflates false positives/negatives, and how peeking invalidates p-values and increases Type I error.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.