Challenge - 5 Problems
Time Series Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Identifying trend in a time series
Which of the following best describes the trend component in a time series?
Attempts:
2 left
💡 Hint
Think about whether the data is generally going up or down over a long period.
✗ Incorrect
The trend component shows the overall direction of the data over time, such as a steady rise or fall. Seasonality is about repeating cycles, and noise is random variation.
❓ Predict Output
intermediate2:00remaining
Output of seasonal decomposition
Given a time series with yearly seasonality and an upward trend, what will the seasonal component look like after decomposition?
ML Python
import numpy as np import pandas as pd from statsmodels.tsa.seasonal import seasonal_decompose time = pd.date_range(start='2020-01-01', periods=24, freq='M') data = 10 + 0.5 * np.arange(24) + 3 * np.sin(2 * np.pi * np.arange(24) / 12) series = pd.Series(data, index=time) result = seasonal_decompose(series, model='additive', period=12) seasonal = result.seasonal.round(2).tolist()
Attempts:
2 left
💡 Hint
Seasonal component repeats every 12 months and oscillates around zero.
✗ Incorrect
The seasonal component captures the repeating yearly pattern, shown as a sine wave oscillating around zero. The trend is separate and increases steadily.
❓ Model Choice
advanced1:30remaining
Choosing a model for trend and seasonality
You have monthly sales data with a clear upward trend and yearly seasonal peaks. Which model is best to capture both components?
Attempts:
2 left
💡 Hint
Consider models that explicitly handle seasonality.
✗ Incorrect
SARIMA models include seasonal terms to capture repeating patterns like yearly seasonality, plus trend components. ARIMA without seasonality misses seasonal cycles.
❓ Hyperparameter
advanced1:00remaining
Selecting period parameter in seasonal decomposition
When using seasonal_decompose on daily data with weekly seasonality, what should the
period parameter be set to?Attempts:
2 left
💡 Hint
Think about how many days make a week.
✗ Incorrect
The period parameter defines the length of one seasonal cycle. For weekly seasonality in daily data, the cycle length is 7 days.
❓ Metrics
expert2:00remaining
Evaluating model fit on decomposed components
After decomposing a time series into trend, seasonal, and residual components, which metric best measures how well the trend component fits the original data's long-term movement?
Attempts:
2 left
💡 Hint
Focus on measuring difference between trend and original data ignoring seasonality and noise.
✗ Incorrect
MAE between original and trend shows how close the trend captures the long-term pattern. RMSE on seasonal or R-squared on residuals do not measure trend fit.