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
52 practiced
You're building an LSTM-based anomaly detector for multiple time-series metric types. Describe data preprocessing (normalization, windowing, handling missing values), model architecture choices (sequence length, layers, bidirectional?), loss functions (reconstruction vs next-step prediction), training regime, and how to serve the model for low-latency online inference. Also address model monitoring and fallback strategies.
EasyTechnical
40 practiced
Define Exponentially Weighted Moving Average (EWMA) and provide the recursive update formula. Explain how the smoothing factor alpha controls responsiveness versus noise reduction and give an example heuristic for choosing alpha when you want to detect a sudden 10% drop in conversion rate.
EasyTechnical
70 practiced
Explain the difference between a one-off anomaly (outlier), a structural change (change-point), and a sustained trend shift in time series metrics such as daily active users. For each type, give (1) a product-telemetry example, (2) a simple detection approach a data engineer would implement, and (3) which downstream stakeholders should be notified and why.
HardTechnical
43 practiced
A daily PySpark job computes anomaly scores for 200M data points and currently takes 6 hours. Propose concrete optimizations (repartitioning, avoiding wide shuffles, vectorized UDF alternatives, caching, adaptive query execution, tuning memory/executor configs) and show example Spark config changes or code snippets that could reduce runtime toward under 1 hour.
MediumTechnical
54 practiced
You're using Isolation Forest to detect anomalies across thousands of time series. Describe how you would turn raw time-series into feature vectors for the model: windowing approach, summary statistics, trend/seasonality features, and pitfalls such as leakage or seasonal bias.

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.