- Time Series - Discussion
- Time Series - Useful Resources
- Time Series - Quick Guide
- Time Series - Further Scope
- Time Series - Applications
- Time Series - Error Metrics
- Time Series - LSTM Model
- Time Series - Prophet Model
- Time Series - Walk Forward Validation
- Time Series - Exponential Smoothing
- Time Series - Variations of ARIMA
- Time Series - ARIMA
- Time Series - Moving Average
- Time Series - Auto Regression
- Time Series - Naive Methods
- Time Series - Parameter Calibration
- Time Series - Modeling
- Data Processing & Visualization
- Time Series - Python Libraries
- Time Series - Programming Languages
- Time Series - Introduction
- Time Series - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Time Series - Moving Average
For a stationary time series, a moving average model sees the value of a variable at time ‘t’ as a pnear function of residual errors from ‘q’ time steps preceding it. The residual error is calculated by comparing the value at the time ‘t’ to moving average of the values preceding.
Mathematically it can be written as −
$$y_{t} = c:+:epsilon_{t}:+: heta_{1}:epsilon_{t-1}:+: heta_{2}:epsilon_{t-2}:+:...+: heta_{q}:epsilon_{t-q}:$$
Where‘q’ is the moving-average trend parameter
$epsilon_{t}$ is white noise, and
$epsilon_{t-1}, epsilon_{t-2}...epsilon_{t-q}$ are the error terms at previous time periods.
Value of ‘q’ can be capbrated using various methods. One way of finding the apt value of ‘q’ is plotting the partial auto-correlation plot.
A partial auto-correlation plot shows the relation of a variable with itself at prior time steps with indirect correlations removed, unpke auto-correlation plot which shows direct as well as indirect correlations, let’s see how it looks pke for ‘temperature’ variable of our data.
Showing PACP
In [143]:
from statsmodels.graphics.tsaplots import plot_pacf plot_pacf(train, lags = 100) plt.show()
A partial auto-correlation is read in the same way as a correlogram.
Advertisements