Challenge - 5 Problems
Autocorrelation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateUnderstanding Autocorrelation
What does a high positive autocorrelation at lag 1 indicate in a time series?
Attempts:
2 left
💡 Hint
Think about how values close in time relate to each other.
✗ Incorrect
High positive autocorrelation at lag 1 means the value now is similar to the value one step before, showing a pattern or trend.
❓ Predict Output
intermediateOutput of Autocorrelation Calculation
What is the output of the following Python code calculating autocorrelation for lag 1?
ML Python
import numpy as np from statsmodels.tsa.stattools import acf data = np.array([1, 2, 3, 4, 5]) result = acf(data, nlags=1, fft=False) print(round(result[1], 2))
Attempts:
2 left
💡 Hint
Autocorrelation at lag 0 is always 1. Check how values relate at lag 1.
✗ Incorrect
The autocorrelation at lag 1 for this increasing sequence is 0.8 approximately, showing strong positive correlation.
❓ Model Choice
advancedChoosing Model Based on Autocorrelation
You observe strong autocorrelation at multiple lags in your time series data. Which model is best suited to capture this pattern?
Attempts:
2 left
💡 Hint
Look for models designed for time series with autocorrelation.
✗ Incorrect
ARIMA models explicitly model autocorrelation through autoregressive and moving average terms, making them ideal for such data.
❓ Hyperparameter
advancedSelecting Lag Parameter for Autocorrelation
When computing autocorrelation for a time series, what is the effect of increasing the maximum lag parameter?
Attempts:
2 left
💡 Hint
Think about what lag means in time series.
✗ Incorrect
Increasing max lag lets you check autocorrelation between points separated by more time steps, revealing longer-term patterns.
🔧 Debug
expertDebugging Autocorrelation Calculation Error
What error will this code raise when calculating autocorrelation on a constant time series?
ML Python
import numpy as np from statsmodels.tsa.stattools import acf data = np.array([5, 5, 5, 5, 5]) result = acf(data, nlags=2, fft=False) print(result)
Attempts:
2 left
💡 Hint
Consider variance of constant data in autocorrelation formula.
✗ Incorrect
Autocorrelation calculation divides by variance. Constant data has zero variance causing division by zero error.
