Client-side, no tracking. Uses a normal-approximation two-proportion z-test to estimate required samples.
Assumes independent Bernoulli trials (visitors), equal-duration exposure, and a fixed baseline conversion rate.
Notes: this is a planning estimate. Sequential peeking, multiple variants, bot traffic, and non-stationary baselines will break assumptions.
Compute.p1 be baseline control rate, p2 treatment rate, \Delta = |p2 - p1|.r = n2/n1:
zα = Φ⁻¹(1-α/2) (two-sided) zα = Φ⁻¹(1-α) (one-sided) zβ = Φ⁻¹(power) n1 ≈ ( zα*√(p̄(1-p̄)(1+1/r)) + zβ*√(p1(1-p1) + (p2(1-p2))/r) )² / Δ² n2 = r*n1 where p̄ = (p1 + r*p2) / (1+r)