All problems

Standard Error of the Difference

easyPythonA/B Testing

The Marlow & Finch analyst has the null-hypothesis rate for a checkout test: the rate both arms would share if the new button did nothing. The next question is the one that decides the whole test. Suppose the button really is useless. If you reran the month again and again, with a fresh set of visitors in each arm every time, the gap between the two arms would still bounce around - sometimes A ahead, sometimes B, purely from who happened to show up. How wide is that bouncing?

The measure of it is the standard error of the difference: roughly the typical size of the gap you would see between the arms when nothing is actually different. It is the ruler the observed gap gets held up against, and it is worked out afresh for every test the growth team runs, since no two tests share a rate or a traffic split.

The conventions:

  • This is the standard error of the difference between two proportions, not the standard error of one arm's rate on its own.
  • Both arms are assumed to share the pooled rate. That is why only one rate is supplied instead of two, and it is what makes this the version used for a significance test.
  • The two arms need not be the same size, and each arm's own size is what governs its share of the wobble.
  • The answer stays on the proportion scale, between 0 and 1 - not percentage points.
  • Round once, at the end, to 4 decimals.

Task: Print the standard error of the difference between the two conversion rates, rounded to 4 decimals.

Input

Three lines: the pooled conversion rate as a decimal between 0 and 1, then the number of visitors in arm A, then the number in arm B. Both arm sizes are whole numbers of at least 1.

Output

One line holding the standard error, rounded to 4 decimals and printed the way Python prints a float - 0.0104, and 0.02 rather than 0.0200.

Example:

Input:
0.0575
1000
1000

Output:
0.0104

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…