Pooled Conversion Rate
Before anyone at Marlow & Finch can say whether the new checkout button really beat the old one, the analyst has to build the yardstick the comparison will be judged against. That yardstick starts from a deliberately boring assumption, called the null hypothesis: pretend the button changed nothing at all, and the two arms are really the same page wearing different paint.
If that were true there would be no such thing as A's rate and B's rate. There would be one underlying rate, and every visitor in the test would be a draw from it. The pooled conversion rate is that single rate: the conversion rate of the whole test treated as one undivided group.
Conventions: the pooled rate describes the combined group as though it had been one arm all along, which is not the same thing as the midpoint of the two arms' rates whenever the arms are different sizes. The analyst reruns this for every test the team has shipped, and the arms are not always balanced. Report it as a proportion between 0 and 1, unrounded.
Task: Print the pooled conversion rate across both variants, as an unrounded proportion between 0 and 1.
Input
Four lines, each holding one whole number, in this order: the control arm's orders, the control arm's visitors, the redesign arm's orders, the redesign arm's visitors. Each visitor count is at least 1.
Output
One line holding the pooled rate as a proportion, printed the way Python prints a float.
Example:
Input:
50
1000
65
1000
Output:
0.0575
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