KatInterview

Plan a Checkout Experiment with Safety Metrics and Pre-Set Rules

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsab-testingexperiment-designpower-analysis

Last updated

Design a controlled experiment for a redesigned checkout flow: hypothesis, sample size, randomization, non-inferiority guardrails, a frozen analysis plan, and multiplicity control.

An online retailer has rebuilt its checkout flow and wants to know whether to roll it out to everyone. You are asked to design the experiment end to end and defend your choices.

Assume these figures:

  • Current purchase conversion among users who reach checkout is 10%.
  • The smallest improvement worth shipping is 0.5 percentage points (10% to 10.5%).
  • You test at 5% significance, two-sided, with 80% power.
  • About 20,000 users per day reach checkout, split evenly between control and treatment.

Walk through the following:

  1. Hypothesis and metrics. State the null and alternative hypotheses. Choose one primary metric and say which population it is computed on. Propose secondary metrics and guardrail metrics, and explain how each is tested.
  2. Sample size and duration. Compute the required users per arm and translate that into run time. Say whether you would run exactly that long.
  3. Randomization. Choose the unit of randomization and the assignment method. Describe contamination risks and the checks you would run before trusting any result.
  4. Pre-registration. List what you would lock down before launch.
  5. Multiple comparisons and peeking. Explain how you would control false positives across the primary metric, secondary metrics, guardrails, and segment cuts, and how you would handle people looking at results early.
  6. Decision rule. Say how the final ship / don't ship call is made when the primary metric and the guardrails disagree.

Aim for a structured answer with real arithmetic, not just a list of buzzwords.

Hints

Hint 1

Pick exactly one primary metric and restrict the analysis to users who actually reach checkout; this removes dilution from people who never see the change.

Hint 2

For two proportions, n per arm = (z_{1-α/2} + z_{1-β})² · [p1(1-p1) + p2(1-p2)] / δ². With z values 1.96 and 0.84, the squared sum is about 7.84.

Hint 3

'Not significant' on a guardrail does not mean 'safe'. Think about a one-sided test against a pre-agreed margin, and check that each guardrail has enough power on its own.

Hint 4

Think about what must be written down before launch so nobody can switch metrics, slice segments after the fact, or stop the test when the numbers look good.