Mastering Time Series Analysis:
Interview Guide & FAQs
A comprehensive guide to Forecasting, ARIMA, Stationarity, and the Top 20 Questions asked in Data Science Interviews.
A sequence of data points collected in strict chronological order. Unlike standard data, the order cannot be shuffled because the "Time" aspect is the primary axis.
Examples: Stock prices, Heart rate monitoring, Daily temperature.
1. Time Series vs. Regression (Cross-Sectional)
This is the most fundamental question. Why can't we just use Linear Regression?
| Feature | Regression | Time Series |
|---|---|---|
| Order | Doesn't matter (Can shuffle rows) | Strictly Ordered |
| Independence | Assumes data is Independent | Assumes data is Dependent (Autocorrelation) |
| Goal | Predict Y using Features (X) | Predict Yt using History (Yt-1) |
| Cross Validation | Random K-Fold | Rolling Window (Time Split) |
2. Why do we perform Time Series Analysis?
- Forecasting: Predicting the future (e.g., Inventory planning).
- Descriptive Analysis: Finding patterns like seasonality (e.g., "Sales peak on Fridays").
- Anomaly Detection: Identifying weird behavior (e.g., Credit Card Fraud).
3. Requirements & Pre-processing
To run models like ARIMA, your data must meet specific criteria:
- Chronological Order: Sorted by date.
- Constant Interval: No missing timestamps (Daily means every day).
- Stationarity: Mean and Variance should not change over time.
4. Correlation vs. Autocorrelation
Correlation: Relationship between two different variables (Price vs. Demand).
Autocorrelation: Relationship of a variable with itself from the past (Price Today vs. Price Yesterday).
In Regression, autocorrelation violates the assumption of independence (bad).
In Time Series, Autocorrelation IS the signal. If the past isn't correlated with the future, the data is just random noise, and we cannot forecast it.
5. Properties: Trend, Seasonality, Noise
Time Series data ($Y_t$) is usually decomposed into:
- Trend (T): Long-term direction (Upward/Downward).
- Seasonality (S): Repeating pattern at fixed intervals (e.g., Monthly).
- Cyclicity (C): Long-term waves (Economic recessions).
- Irregularity (I): Random noise (Residuals).
6. Visualizing ACF & PACF Plots
These plots tell us the order of the ARIMA model.
Top 20 Time Series Interview FAQs
Prepare for your exam or interview with these essential questions.
Cyclicity: Fluctuations with no fixed duration (e.g., Economic Recessions).
P-value < 0.05 = Stationary (Good).
P-value > 0.05 = Non-Stationary.
Null Hypothesis = Series IS Stationary.
If P-value < 0.05, the data is Non-Stationary.
MA (Moving Average): Uses past forecast errors ($\epsilon_{t-1}$).
MA Model: ACF cuts off; PACF decays.
ARMA: Both decay gradually.
Multiplicative: Trend × Seasonality (Seasonal height grows with trend).
Expert Guide to Time Series Analysis | Data Science & Machine Learning Interviews
0 Comments
I’m here to help! If you have any questions, just ask!