All problems

Relative Lift of Variant B

easyPythonA/B Testing

The Marlow & Finch checkout test has reported, and so have the tests the growth team ran after it. Each one comes down to two conversion rates: Variant A, the unchanged page, and Variant B, the challenger. The redesign lead has one line in Monday's deck and wants the figure the industry quotes: the relative lift.

Relative lift answers: how much bigger is the new arm's rate when it is held against the old arm's rate? It is expressed as a percentage of the baseline, which is a different thing from the raw gap between the two rates — and confusing the two is the most common mistake in this whole topic.

The conventions, so nothing is left to guess:

  • The baseline is Variant A, the unchanged page. B is measured against A, never the other way round; swapping them gives a different number.
  • A positive answer means B did better, a negative one means B did worse.
  • The answer is a percentage, so an answer of 100 would mean B converted twice as often as A.
  • Round once, at the very end, to 2 decimals.

Task: Print the relative lift of Variant B over Variant A as a percentage, rounded to 2 decimals.

Input

The first line holds Variant A's conversion rate as a proportion between 0 and 1. The second line holds Variant B's, in the same form. A's rate is never zero.

Output

One line holding the relative lift as a percentage, rounded to 2 decimals and printed the way Python prints a float — 30.0, never 30.00.

Example:

Input:
0.05
0.065

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…