1/36
Part 1 of 6 · Two errorsLearn

How many users the test needs, and how many days

A prep site lists a Netflix data science onsite question, posted in October 2025, on designing and powering a frequency-cap experiment: "Design an experiment and provide power calculations that account for interference and clustering" (1 source). A candidate's report of a Netflix data science onsite, apparently the same one, says both technical cases were about ad frequency caps (1 report). Interference and clustering adjust the answer. The calculation they adjust comes first, and our version of it reads like this:

A sign-up flow converts 10% of visitors, and we want to detect a lift to 12%. Write sample_size_per_arm(p_baseline, mde, alpha=0.05, power=0.8, relative=False): the users each arm needs for a two-sided test. Then write days_to_run: how long the test runs, in whole weeks, when 1,500 new users arrive a day and half of them enter it.

Too few users, and a real improvement disappears into the noise. Too many, and you spend weeks of traffic that another test needed.

The practice comes in four levels. Level 1 sizes the test at two-sided alpha 0.05 and 80% power, with each arm's own variance, and rounds up to whole users. Level 2 takes any alpha and power. Level 3 takes a lift stated as a share of the baseline, with relative=True. Level 4 adds days_to_run, which turns users into days, in whole weeks.

From four choices to a number of daysInteractive
you choose = a 10% baseline, a lift to 12%, two-sided alpha 0.05, 80% power.

You don't write it yet. The lesson starts with the two ways a test can be wrong, builds the formula one piece at a time, then turns users into days and answers the follow-ups: uneven splits, CUPED, clusters and ratio metrics. At the end you solve the whole problem, level by level, in an interview simulation with a 30-minute timer.

This lesson builds on the A/B test lesson, which read a finished test with the two-proportion z-test. This one decides, before the test starts, how much data that test gets. The CUPED lesson comes next and gets the same answer from fewer users.