32/36
Part 6 of 6 · Follow-upsLearn and do

With fixed traffic, solve for the smallest lift you can detect

When traffic is fixed, the question flips: We have two weeks. What can we detect? Solve for Δ\Delta. The exact answer comes from bisecting on the function you already wrote:

def smallest_lift(n_per_arm, p_baseline, alpha=0.05, power=0.8):
    lo, hi = 0.0, 1 - p_baseline
    # bisect: n falls as the lift grows
    for _ in range(60):
        mid = (lo + hi) / 2
        if sample_size_per_arm(p_baseline, mid, alpha, power) > n_per_arm:
            lo = mid
        else:
            hi = mid
    return hi


print(round(smallest_lift(5000, 0.10), 4))
Predict

5,000 users per arm on a 10% baseline, 80% power. What's the smallest lift you can detect?

Pick one to see what it prints.
Pick an answer above to see the rest