18/36
Part 4 of 6 · Days and powerLearn and do

From users to days

The formula gives users. A schedule needs days, and the days come in whole weeks. days_for(users, users_per_day) is the function you write at the end of this step: the days to collect users, in whole weeks.

from math import ceil

# both arms, at 1,500 a day with half in the test
for n_per_arm in (3839, 5139, 14749):
    print(days_for(2 * n_per_arm, 1500 * 0.5))
Predict

1,500 new users a day, half of them in the test. How long does the 2-point test run?

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