InterviewStack.io LogoInterviewStack.io

Trend Analysis and Anomaly Detection Questions

Covers methods for detecting and interpreting deviations in metric behavior over time and determining whether changes reflect real product or user behavior versus noise. Topics include baseline establishment, seasonality and holiday effects, time series decomposition, smoothing and aggregation choices, statistical detection techniques such as control charts, z scores, EWMA and CUSUM, thresholding strategies, and modern algorithmic approaches like isolation forest or LSTM-based detectors. Also covers visualization and dashboarding practices for communicating trends, setting sensible alerting rules, triage workflows for investigating anomalies, and assessing business impact to prioritize fixes or rollbacks.

HardTechnical
49 practiced
When labeled anomalies are scarce, precision/recall are insufficient to evaluate detectors. Describe alternative evaluation strategies for unsupervised anomaly detection: use of proxy labels, unsupervised scoring metrics, human-in-the-loop evaluation, and continuous monitoring metrics. Explain pros/cons of each approach.
MediumTechnical
44 practiced
Implement an EWMA anomaly detector in Python using pandas. Write a function detect_ewma(df, value_col, span, k) that returns the input DataFrame with columns for EWMA, rolling residual, rolling std, and a boolean 'anomaly' where abs(residual) > k * rolling_std. Explain parameter choices (span vs alpha) and how you would choose k for moderate sensitivity.
EasyTechnical
46 practiced
You're the Data Analyst for a consumer app and asked to establish a robust baseline for Daily Active Users (DAU). Describe the step-by-step approach you would take to define that baseline, including how you would select the historical window, handle growth trends, control for weekly seasonality and holidays, exclude outliers or one-off events, choose smoothing or aggregation (daily vs. weekly), validate the baseline, and monitor baseline drift over time. Explain trade-offs of short vs long windows.
HardTechnical
42 practiced
You observe multiple related metrics degrade (page load time increases, conversion drops). Propose a method to identify the root metric (the likely root cause) versus downstream effects, using dependency graphs, Granger causality, or intervention analysis. Explain data needed and limitations.
MediumTechnical
46 practiced
A metric's daily sample size differs by country (some countries have low user counts). How would you set anomaly thresholds that are fair across segments and avoid flagging noise in low-count segments? Discuss options like standardization, proportion tests, Bayesian shrinkage, and minimum-sample rules.

Unlock Full Question Bank

Get access to hundreds of Trend Analysis and Anomaly Detection interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.