0% found this document useful (0 votes)
9 views13 pages

Arima

ARIMA is a powerful time series forecasting model that combines AutoRegression, Integration, and Moving Average components to predict future values based on past data. Stationarity is crucial for ARIMA as it ensures stable relationships between past and future observations, allowing for reliable predictions. The modeling process involves checking for stationarity, identifying parameters (p, d, q), building the model, evaluating it, and making predictions.

Uploaded by

Arshika Selvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views13 pages

Arima

ARIMA is a powerful time series forecasting model that combines AutoRegression, Integration, and Moving Average components to predict future values based on past data. Stationarity is crucial for ARIMA as it ensures stable relationships between past and future observations, allowing for reliable predictions. The modeling process involves checking for stationarity, identifying parameters (p, d, q), building the model, evaluating it, and making predictions.

Uploaded by

Arshika Selvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

ARIMA

Autoregressive (AR) Model:


An AR model explains the value of a time series variable in terms of its past values. In
other words, it uses the dependent relationship between an observation and a number
of lagged observations (previous time points).

In real life, think of an AR (Autoregressive) model like predicting tomorrow's weather


based on today's and yesterday's weather.

For example:

● If you're trying to predict tomorrow's temperature, you might say, "Tomorrow's


temperature will be similar to today’s temperature, and the day before that."
Understanding ARIMA
ARIMA is one of the most powerful and widely used models for Time Series
Forecasting. It combines three important components:

1. AutoRegression (AR) – Uses past values to predict future values.


2. Integration (I) – Makes the time series stationary (removing trends).
3. Moving Average (MA) – Uses past forecast errors to improve predictions.
Breaking Down ARIMA (p, d, q)
● p (AutoRegressive part): The number of past values (lags) used for prediction.
● d (Integration part): The number of times differencing is applied to make the
series stationary.
● q (Moving Average part): The number of past errors used to refine the prediction.
Why Stationarity is Important in ARIMA?
Imagine you're trying to predict the price of a product over time, but the price keeps
changing in a consistent pattern—maybe it increases every month due to inflation or
decreases seasonally because of demand. Now, imagine you want to predict the price
for next month based on past data. If the price is constantly changing (non-stationary),
your predictions will be unreliable because the relationship between past and future
prices is not stable.
Why Stationarity is Important in ARIMA?
● Predictability: In a stationary scenario, the future behaves in a way that is
similar to the past (stable mean, variance, and autocorrelation). This makes it
easier to predict future values based on past data.
● Consistency: With a stationary series, you can use past data to make predictions
because the statistical properties (mean, variance, and correlation) don’t change
over time. For example, if the price of a product is fluctuating in a stable way, you
can predict the next value based on the current trend.

On the other hand, non-stationary data (like a changing price) means the rules of the
pricing are inconsistent. The model will struggle to predict the future because it's not
clear how the past influences the future.

In short, stationarity ensures that patterns in the data are stable enough for ARIMA to
work effectively in predicting future values.
Step-by-Step ARIMA Modeling
Step 1: Check for Stationarity

A stationary series has constant mean, variance, and no seasonality.


To check stationarity:

● Plot the time series → Look for trends or seasonality.


● Use Augmented Dickey-Fuller (ADF) Test → If p-value > 0.05, the series is not
stationary.

If the series is non-stationary, apply differencing (subtract the previous value from the
current value).
Step-by-Step ARIMA Modeling
Step 2: Identify ARIMA (p, d, q) Parameters

● Choose d by differencing until the series is stationary.


● Choose p by checking the Partial Autocorrelation Function (PACF) plot.
● Choose q by checking the Autocorrelation Function (ACF) plot.
Step-by-Step ARIMA Modeling
Step 3: Build and Train the ARIMA Model

Once you identify p, d, q, use statsmodels in Python to build the ARIMA model.

Step 4: Evaluate the Model

Check metrics like Mean Squared Error (MSE), AIC, and BIC to find the best model.

Step 5: Make Predictions

Use the trained ARIMA model to forecast future values.


Exercise!
Calculate ARIMA values for the following examples (Give a shot to R)

● [10, 12, 15, 18, 17, 20, 22, 23, 25, 30]
● [1, 5, 10, 12, 20, 22, 30, 35, 40, 50]
● [3, 6, 9, 12, 17, 22, 28, 35, 41, 50]
Example: Real-Life Applications of ARIMA
ARIMA is widely used for:

● Stock Market Forecasting: Predicting price movements based on historical data.


● Demand Forecasting: Predicting future sales based on past trends.
● Weather Forecasting: Estimating temperature trends.
● Financial Forecasting: Predicting revenue and market trends.

You might also like