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

A ratio metric needs its variance per member, not per impression

A frequency cap is often judged on a rate per impression, and that rate's variance needs care. ratio_variance is the function you write at the end of this step: the variance per member.

clicks = [0, 0, 1, 3]
impressions = [10, 10, 10, 10]
r = sum(clicks) / sum(impressions)
print(round(ratio_variance(clicks, impressions), 4))
print(round(r * (1 - r) / (sum(impressions) / 4), 4))
Predict

Four members, 10 ads each, one of them doing most of the clicking. Is the per-member variance bigger or smaller than the coin-flip view?

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