All problems

The Campaign Lift

mediumPythonAnalyticsA/B Testing

Lantern tested a new pricing page against the old one for a fortnight. The two arms did not end up with the same number of visitors, so the raw conversion totals cannot be set against each other. The write-up needs the headline every experiment report leads with: how much better the new page did, stated relative to the old one.

Task: Print the treatment's lift over the control, as a percentage.

Input

Two lines. Each holds two integers separated by a single space: how many visitors that arm received, then how many of them converted. The first line is the control, the old page; the second is the treatment, the new one. Neither arm had zero visitors, and the control always converted somebody.

Output

One line: a percentage with exactly one digit after the decimal point. The control's rate is the baseline the change is measured against — this is the relative improvement, not the gap between the two rates. A treatment that did worse prints negative; two equal rates print 0.0.

Example:

Input:
1000 50
1000 65

Output:
30.0

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…