Time Series & Arima Model of Forecasting

PUBLISHED: MAY 2, 20262 MIN READ

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:hour

Abhijeet Singh Rajput Profile Photo
Abhijeet Singh RajputAuthor
marowak
#105
marowak

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:

xt=ϕ1xt1+ϕ2xt2++ϕpxtp+ϵtx_{t}=\phi_1x_{t-1}+\phi_2x_{t-2}+\dots+\phi_{p}x_{t-p}+\epsilon_{t}

2. Integrated (I)

  • Uses differencing to make the series stationary.
  • Stationary means: mean, variance, covariance do not change over time.
yt=(xtxt1)y_{t}=\left(x_{t}-x_{t-1}\right)
yt=Δdxty_t = \Delta^dx_t

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:
Δxt=xtxt1\Delta x_{t}=x_{t}-x_{t-1}
  • 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

SymbolMeaningRole in ARIMA
Original dataInput series
Differencing operatorRemoves trend
Differencing orderHyperparameter (I part)
Stationary seriesPassed to AR and MA

If you want, I can also explain with a

3. Moving Average (MA)

  • Current value depends on past forecast errors.
ϵt(ϵt1,ϵt2,,ϵtq)\epsilon_{t}\sim(\epsilon_{t-1},\epsilon_{t-2},\cdot\cdot\cdot,\epsilon_{t-q})

ARIMA = AR + I + MA

ARIMA combines all three components to build accurate time-based predictions.

Model Parameters (p, d, q)

ParameterMeaning
pOrder of AR → number of past observations used
dDifferencing order → number of times data is differenced
qOrder of MA → number of past forecast errors used

These are hyperparameters and are tuned (trial & error) to get the best forecasting model.