Z-Statistic for the A/B Test
Everything a Marlow & Finch checkout test produces comes down to three numbers: Variant A's conversion rate, Variant B's, and the standard error of the difference — the typical wobble you would expect between the two arms even if the button changed nothing. In June those were 5%, 6.5% and 0.0104. The analyst runs the same line over every test the team has finished.
A gap on its own can never be judged. 1.5 percentage points is enormous if the arms would normally sit within a tenth of a point of each other and completely unremarkable if they routinely swing two points apart. The z-statistic is the translation: it restates the observed gap in units of that expected wobble. A z of 3 means the arms landed three wobbles apart, which rarely happens by luck. A z below 1 means they landed closer together than an ordinary quiet month.
The conventions:
- Direction is Variant B against Variant A, so B being ahead gives a positive z and B being behind gives a negative one.
- Use the standard error exactly as supplied. It has already been rounded to 4 decimals, which is deliberate.
- Round the answer once, at the end, to 2 decimals.
Task: Print the z-statistic for the difference between the two conversion rates, rounded to 2 decimals.
Input
Three lines. The first holds Variant A's conversion rate as a proportion, the second holds Variant B's, and the third holds the standard error of the difference, also on the proportion scale and greater than zero.
Output
One line holding the z-statistic, rounded to 2 decimals and printed the way Python prints a float — a negative answer keeps its minus sign.
Example:
Input:
0.05
0.065
0.0104
Output:
1.44
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