KatInterview

Diagnosing Recurring and One-Off Traffic Anomalies in an E-Commerce Platform

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentstime-seriesanomaly-detectioncausal-reasoning

Last updated

Given three years of weekly session data with consistent autumn spikes and a single summer anomaly, identify plausible causes and validate hypotheses through segmentation and decomposition.

Scenario

You are given a three-year weekly time-series of shopping sessions on a large e-commerce platform. Two patterns stand out:

  1. Recurring spikes every autumn — traffic rises sharply at roughly the same time each year.
  2. A single isolated spike in the summer of Year 3 — it does not appear in Years 1 or 2 and has not recurred since.

What you are asked to do

Part 1 — Business reasoning

Propose plausible real-world explanations for each pattern. Separate the recurring seasonal effect from the one-off anomaly. For each explanation, state what evidence would confirm it and what would rule it out.

Part 2 — Data exploration

Using a dataset of your choice of tool (Python, R, or a spreadsheet), go beyond eyeballing the chart. Describe or implement the steps you would take to:

  • Quantify each spike against an appropriate baseline.
  • Check whether the spike reflects genuine demand or a measurement problem.
  • Identify which segment (geography, channel, device, merchant concentration) accounts for the excess sessions.
  • State at least two falsifiable hypotheses and the data you would need to test each one.

You are expected to walk through your reasoning, show code or pseudocode for the key steps, and explain how you would interpret the results.

Hints

Hint 1

Before explaining a spike, ask whether it is real. Check conversion rate, session duration, and bounce rate during the anomalous weeks — bot traffic and tracking bugs inflate sessions while leaving conversion flat or worse.

Hint 2

For the recurring autumn pattern, express each year's peak as a ratio to its own pre-spike baseline rather than comparing raw heights. That separates genuine seasonal demand from a growing platform baseline.

Hint 3

For the one-off summer spike, segment by merchant concentration first. If a handful of merchants account for most of the excess, the cause is likely a viral product or a single large campaign rather than a platform-wide event.