Diagnosing a Sudden KPI Shift and Testing the Remedy
Statistics & ExperimentsModel answerLast updated
Explain how to find the root cause of an abrupt move in a core product metric, then design and analyze a controlled experiment that checks whether a proposed fix actually works.
Scenario
You work on analytics for a two-sided marketplace app. Overnight, a key business metric (for example, completed orders per day) jumps or falls sharply. Leadership wants to know why. Once you have a likely cause and a proposed fix, they also want proof that the fix works before rolling it out.
Questions
- How would you investigate the cause of the sudden change in a core metric? Describe a systematic process, not a list of guesses.
- How would you design and analyze an A/B experiment to validate the fix? Cover the key steps, assumptions, and the criteria you would use to call the test a success.
What a strong answer includes
- A clear definition of the metric and a way to tell real change from noise.
- A ranked order of checks, with reasons for the order.
- A concrete experiment plan: hypothesis, metrics, randomization unit, sample size, runtime, diagnostics, and a decision rule.
- Awareness of marketplace-specific pitfalls such as interference between treatment and control.
Hints
Hint 1
Before looking for business causes, ask whether the number is even real: check instrumentation, pipelines, and an independent data source.
Hint 2
To localize a change, slice by segment (region, platform, app version, user type) and break the metric into funnel stages; also check whether traffic mix shifted rather than behavior.
Hint 3
For the experiment, fix one primary metric, guardrails, the randomization unit, the minimum detectable effect, and the runtime before launch. Consider whether treatment and control users share a limited resource.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Part 1: Investigating the sudden change
Step 0: Pin down the facts
- Get the exact metric definition. Check whether the numerator, the denominator, or both moved (e.g. orders vs. sessions).
- Quantify size, direction, and the exact start time. Compare against the same weekday last week, the same period last year, and a forecast band. If the value sits inside normal variance, stop: it may be noise.
- Classify the shape. A step change usually points to a release, a bug, or an outage. A gradual drift points to seasonality, competition, or mix shift.
Step 1: Rule out data problems first Most metric "emergencies" are measurement problems.
- Logging changes, a new app version dropping events, delayed or failed ETL jobs, late-arriving data, changed dedup logic, timezone bugs, bot or test traffic.
- Cross-check against an independent source, such as payments or a transaction ledger. If the two disagree, it is a data bug and the business did not change.
Step 2: Line up internal and external events
- Internal: deploys, feature flags, experiments ramping, pricing or incentive changes, campaign start or end, outages.
- External: holidays, weather, local events, strikes, competitor promotions, regulation.
- Align the change-point timestamp with the deploy log and the experiment registry.
Step 3: Segment to localize Slice by geography, platform, app version, new vs. returning users, product type, time of day, and acquisition channel. A change confined to one slice (say, one Android version) points directly at a cause. A uniform change suggests something global such as pricing, an outage, or a macro event.
Check for mix shift. The overall rate can move while every segment is flat, simply because segment shares changed:
Δ metric = Σ(Δ share × segment rate) + Σ(share × Δ segment rate)
The first term is the mix effect and the second is the rate effect. This avoids a Simpson's-paradox misread.
Step 4: Decompose the funnel Break the metric into stages (visit, request, match, fulfil, complete) and find the stage whose conversion moved. In a two-sided marketplace, always check the other side: a demand-side drop is often a supply problem (fewer providers online, longer wait times, more abandonment).
Step 5: Hypothesize, confirm, quantify
- Rank hypotheses by evidence and confirm the leading one with a targeted before/after cut on the affected cohort.
- Quantify how much of the delta it explains. If it explains 60%, keep looking for the other 40%.
- Report: what happened, evidence, impact, recommended action, owner.
Part 2: Designing the A/B test for the fix
1. Hypothesis and metrics
- Hypothesis: "Showing accurate wait-time estimates at request time raises request-to-completion conversion by reducing cancellations."
- Primary metric: one metric chosen in advance, e.g. completions per exposed user.
- Secondary: cancellation rate, estimate accuracy, satisfaction rating.
- Guardrails: revenue per order, provider earnings or utilization, latency, crash rate, support contacts.
2. Unit of randomization and interference User-level randomization is the default and is fine when one user's treatment does not affect another's outcome. In a marketplace this often fails: treated and control users compete for the same supply, so a treatment that pulls supply toward treated users inflates the measured lift (a SUTVA violation).
Options when interference is likely:
- Switchback: randomize city by time-window blocks (e.g. 30-60 minutes). Common for pricing and dispatch changes.
- Geo or cluster randomization: randomize whole regions. Less bias, but fewer units and lower power.
State the trade-off: cluster designs reduce bias but cost power, so inflate sample size by the design effect.
3. Assignment
- Deterministic hashing of the unit ID for stable assignment.
- 50/50 for maximum power, with a staged ramp (1% to 10% to 50%) for safety.
- Analyze all exposed units as assigned (intent-to-treat).
4. Power and sample size For a proportion metric, per-group sample size is
n = 2 (z₁₋α/₂ + z₁₋β)² σ² / δ²
Worked example: baseline 20%, minimum detectable effect 1 percentage point, α = 0.05, power 80%.
- σ² = 0.2 × 0.8 = 0.16
- (1.96 + 0.84)² ≈ 7.84
- n ≈ 2 × 7.84 × 0.16 / 0.0001 ≈ 25,100 per group
At about 5,000 eligible users per arm per day this takes roughly five days. Round up to at least one full week, preferably two, to cover day-of-week cycles. CUPED (pre-period covariate adjustment) can shorten the run.
5. Pre-launch checks
- Run an A/A test or review historical variance.
- Confirm the primary metric is logged correctly for both arms.
- Write down the runtime and decision rule in advance, and do not peek and stop early on a p-value.
6. Analysis
- Sanity checks first: sample ratio mismatch (chi-square on assignment counts), pre-period balance, exposure logging. If SRM fails, do not trust the result.
- Estimate: report the difference with a 95% confidence interval, not just a p-value. Use a two-proportion z-test or t-test; for ratio metrics use the delta method or bootstrap, with cluster-robust standard errors when the analysis unit differs from the randomization unit.
- Multiple comparisons: correct (Bonferroni or Benjamini-Hochberg) when examining many metrics or segments. Treat segment findings as hypotheses for a follow-up test.
- Novelty and primacy: plot the effect over time and check whether it decays or grows.
7. Success criteria and decision Ship if the primary metric shows a statistically significant lift whose confidence interval clears a practically meaningful threshold, no guardrail regresses beyond its tolerance, and diagnostics pass. If the result is flat, report the confidence interval to show what effect sizes are ruled out. If the primary improves but a guardrail breaks, decide explicitly on the trade-off rather than shipping by default.
Common mistakes
- Blaming a business cause before checking instrumentation.
- Reading an overall change without separating mix from rate effects.
- Randomizing users in a marketplace and ignoring interference.
- Picking the metric or runtime after seeing the data.
- Stopping the test the moment p < 0.05.
- Skipping the SRM check.
- Reporting many segment cuts without correction.