KatInterview

Diagnose a Skewed Revenue Distribution and Pick the Right Test

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsstatisticsa-b-testingdistributions

Last updated

Read five summary statistics from a zero-heavy e-commerce dataset, name the distribution, and choose appropriate metrics and tests for an A/B experiment.

Setup

A data science team hands you the following summary of 10,000 session-level revenue observations from an online store. No raw data, just these numbers:

StatisticValue
Count10,000
Mean$12.50
Std dev$45.00
P50 (median)$0.00
P75$0.00
P90$15.00
P99$250.00

All values are non-negative. Your job is to reason about what these numbers reveal, explain the pitfalls of naive analysis, and design a sound comparison strategy.

Questions

  1. Name and characterize the distribution. What do the percentiles tell you about the shape? Estimate roughly what fraction of sessions have zero revenue, and what a typical buying session looks like.

  2. Critique a standard t-test on the raw means. A colleague suggests running a two-sample t-test to compare mean revenue between a control and a treatment group. What are the specific failure modes here? Be precise — "the data aren't normal" is not sufficient.

  3. Report a "typical user" value. A product manager asks for a single number representing the typical session. Why is the mean misleading, and why is the median equally uninformative? What would you report instead?

  4. Design a robust A/B comparison. Propose a concrete testing strategy for comparing two groups of this revenue data in an experiment. Address how you handle zeros, outliers, and the choice of estimand.

Constraints

  • Revenue is non-negative; zeros represent real non-purchasing sessions, not missing data.
  • Outliers should be handled, not discarded.
  • Your chosen test or metric should remain tied to a business-meaningful quantity.

Hints

Hint 1

Work through the percentiles sequentially. P50 = P75 = $0 tells you the zero share is above 75%. P90 = $15 means it's below 90%. That range is your first concrete fact. Then compute implied average spend among buyers as mean / (1 - zero_share) to get a number stakeholders can actually use.

Hint 2

The t-test's validity rests on the sample mean being approximately normal, not the underlying data. The real issues are skewness slowing CLT convergence, a few very large sessions dominating the variance, and the equal-variance assumption breaking if treatment affects the tail. Think about each of these separately.

Hint 3

A decomposition beats any single metric here. Splitting revenue per session into (conversion rate) × (revenue given purchase) tells you *why* a change happened — more buyers, bigger baskets, or both. Build your testing strategy around that decomposition rather than searching for one magic test.