That's four members, each shown 10 ads, with a click-through rate of 10% overall and one member doing most of the clicking. The first number is the variance per member. The second treats every impression as a coin flip, and it's less than half as big. You randomized members, and one member's impressions aren't independent coin flips, so the coin-flip variance comes out too small, and so does the test.
The delta method gives the variance per member. With Ci and Ni for member i's clicks and impressions, R=∑iCi/∑iNi the overall rate and Nˉ the average impressions per member:
σ2=Nˉ2Var(Ci−RNi)In words: one number per member, their clicks minus R times their impressions. Take the sample variance of those numbers, which divides by the number of members minus 1, and divide it by the average impressions squared.
Estimate it from past data and use it in place of each arm's p(1−p) in the formula, with n counting members.
In a simulation with about 10 impressions per member, click rates that vary from member to member, and a click-through rate going from 5.0% to 5.5%, the per-member variance was 1.95 times what the coin-flip view says. Sized correctly, the test needs 6,090 members per arm, and it detected the lift 80% of the time. Sized as coin flips, it gets 3,124 and detects the lift 52% of the time.
In the editor, write ratio_variance(clicks, impressions) in plain Python, so each step of the delta method is yours.