Time Series & Arima Model of Forecasting
Time Series & ARIMA Model (Forecasting)
What is Time Series?
A time series is a sequence of data points recorded at evenly spaced time intervals, such as:
hourly temperature readings
daily stock prices
annual population
monthly sales
Each point represents a value measured over time.
Importance of Time Series Analysis
Predict future trends
Detect patterns and anomalies
Risk mitigation
Strategic planning
Competitive advantage
Components of Time Series
1. Trend
Long-term movement or direction of data
Can be increasing, decreasing, linear, or nonlinear
2. Seasonality
Patterns repeating at fixed intervals
Examples: yearly festivals, monthly sales peaks, weekly cycles
3. Cyclical Variation
Long-term fluctuations without a fixed period
Usually related to economic or business cycles
4. Irregular/Noise
Random, unpredictable variations
Not explained by trend, seasonality or cycles
Time Series Forecasting
It uses historical data to predict future values.
Example: Forecasting population of India for 2037, 2047, 2057 using past population data.
ARIMA Model
ARIMA stands for:
A – Autoregressive (AR)
I – Integrated (I)
MA – Moving Average (MA)
It is a popular forecasting technique for time series data that changes with time (population, temperature, sales etc.).
1. Autoregressive (AR)
Current value depends on past values of the series.
Linear relationship.
Formula:
2. Integrated (I)
Uses differencing to make the series stationary.
Stationary means: mean, variance, covariance do not change over time.
1.
Original time series data
Example: temperature, stock price, population, sales, etc.
2.
The differencing operator
It removes trend and makes the series stationary.
First difference:
Second difference:
3.
Order of differencing
Tells how many times the data is differenced
Purpose: make the series stationary
Usually
4.
The stationary transformed series after differencing
This is then used by the AR and MA parts of ARIMA.
Hyperparameter Summary
Symbol | Meaning | Role in ARIMA |
|---|---|---|
Original data | Input series | |
Differencing operator | Removes trend | |
Differencing order | Hyperparameter (I part) | |
Stationary series | Passed to AR and MA |
If you want, I can also explain with a
3. Moving Average (MA)
Current value depends on past forecast errors.
ARIMA = AR + I + MA
ARIMA combines all three components to build accurate time-based predictions.
Model Parameters (p, d, q)
Parameter | Meaning |
|---|---|
p | Order of AR → number of past observations used |
d | Differencing order → number of times data is differenced |
q | Order of MA → number of past forecast errors used |
These are hyperparameters and are tuned (trial & error) to get the best forecasting model.
