KatInterview

Sequential A/B Test, FDR Control, Bot Posterior, Skewed AOV

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentshypothesis-testingsequential-testingmultiple-comparisons

Last updated

Four applied statistics tasks: a two-proportion test with group-sequential boundaries, BH vs Bonferroni, a Bayes flag posterior, and robust inference for a skewed order-value metric.

Work through the four parts below. Show your arithmetic and say what each result means for a decision.

Part 1: Conversion test with repeated peeking. An experiment has been monitored at 5 planned looks. The latest data are:

ArmUsersConversions
Control12,0001,380
Treatment12,2001,512
  • Compute the two-sided p-value for the difference in conversion rates, and a 95% confidence interval for that difference.
  • The team used an O'Brien–Fleming alpha-spending plan. Without recomputing a full spending function, explain whether the result would still count as significant, and how the answer depends on whether this look is the last one.

Part 2: Many metrics. You track 5 metrics. Their sorted p-values are 0.001, 0.012, 0.019, 0.070 and 0.300. Apply Benjamini–Hochberg at FDR q = 0.05 and list the discoveries. Then compare with Bonferroni at familywise α = 0.05 and explain when you would pick each.

Part 3: Bot flagging. 5% of users are bots. The classifier has a 2% false-positive rate and a 10% false-negative rate. Given that a user is flagged, what is the probability they really are a bot? Show Bayes' theorem with numbers and describe the product implications.

Part 4: Skewed order value. Average order value is right-skewed (mean 32, SD 15, heavy right tail). Propose a robust plan for outliers and inference. Compare the IQR rule, z-scores, and MAD / Huber M-estimators. Recommend a log transform together with the delta method, and explain how to report the effect on the original currency scale using a smearing estimator.

Hints

Hint 1

For Part 1, use the pooled variance for the z-test and the unpooled variance for the confidence interval. Then compare z with the final O'Brien–Fleming boundary, roughly 2.04 for 5 equally spaced looks, and ask whether look 5 is the last planned look.

Hint 2

For Part 2, BH is a step-up rule: find the largest rank i with p(i) <= (i/m)q, and everything at or below that rank is a discovery. Bonferroni just divides alpha by m.

Hint 3

For Part 4, separate removing invalid data (bots, test orders, currency errors) from taming genuine big spenders. Remember that exp of a mean log difference is a ratio of geometric means, not arithmetic means, which is why a smearing factor is needed.