Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
117 views29 pages

Time Series Forecasting

1) The document introduces time series forecasting and discusses different methodologies for forecasting a time series, including using regression models, smoothing methods, and ARIMA models. 2) It provides an example of forecasting monthly ridership data for Amtrak trains using different regression models that include linear trend, polynomial trend, seasonality, and trend with seasonality components. 3) The document also covers partitioning time series data into training and validation sets, setting a baseline forecast, evaluating models based on error metrics, examining autocorrelation, and assessing predictability. 4) Finally, it discusses smoothing methods like moving averages and exponential smoothing, and the Holt-Winters exponential smoothing technique for handling

Uploaded by

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

Time Series Forecasting

1) The document introduces time series forecasting and discusses different methodologies for forecasting a time series, including using regression models, smoothing methods, and ARIMA models. 2) It provides an example of forecasting monthly ridership data for Amtrak trains using different regression models that include linear trend, polynomial trend, seasonality, and trend with seasonality components. 3) The document also covers partitioning time series data into training and validation sets, setting a baseline forecast, evaluating models based on error metrics, examining autocorrelation, and assessing predictability. 4) Finally, it discusses smoothing methods like moving averages and exponential smoothing, and the Holt-Winters exponential smoothing technique for handling

Uploaded by

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

Time Series Forecasting

Sumeet Gupta
Outline
• Introducing a Time Series
• Forecasting a time series
• Dataset – Monthly Ridership Data for Amtrak Trains
Introduction
• Time series is a data set collected from a process with equally spaced
periods of time
• Sampling adjacent points in time introduce a correlation
Examples
• Stock Market Data
• Dow Jones Industrial Averages
• Daily data on sales
• Monthly Inventory
• Daily Customers
• Monthly Interest rates
Goals of Time Series Analysis
• Identifying the nature of the phenomenon represented by the
sequence of observations
• Useful for Policy Decision Making
• Forecasting (predicting future values of the time series variable)
• Useful for predicting future values in a time series
Components of a Time Series
• Trend (T) – Gradual long term movement (up or down). Easiest to Detect.
E.g., Population Growth in India
• Cyclical Patterns (S) – Results form events recurrent but not periodic in
nature. Any up and down repetitive movement in demand. Repeat itself
over a long period of time. E.g., Economic Recession
• Seasonal Patterns (S) – Results from events that are periodic and recurrent
in nature. Any up and down repetitive movement within a trend occurring
periodically. E.g., Sales during festive season
• Irregular Component (Noise) – Disturbance or residual variation that
remains after all other behaviors have been accounted for. Erratic
movements that are not predictable because they do not follow a pattern.
E.g., Earthquake
Methodologies for Forecasting a Time Series
• Using Regression Models
• Simple Linear Regression
• Polynomial Trend
• Trend +Season
• Using Smoothing Methods
• Moving Average
• Exponential Smoothing
Methodology
• Divide the series into training and validation series
• Build a suitable model (Trend, Polynomial, Season, Trend + Season)
• Check the RMSE / MAPE of each model. The model with lowest RMSE
/ MAPE is a good model
• Check the Autocorrelation (Acf) in the Model for any significant lags
as well as in the residuals.
• Use the residuals to build a forecasting model depending upon the lag
in the ACF plot.
• Finally check the predictability of a time-series. If the series is a
random walk, it cannot be predicted
Time Series Forecasting Using
Regression
Amtrak Data: Fitting a Linear Trend
Partitioning a Time Series
• Partitioning is not done at
random as in Regression
• A part of the time series from the
beginning is considered as the
Training Data
• Rest of the data comprises Test
Data
• Performance of the model on
the Test Dataset determines the
accuracy of our model
Setting the Baseline
• Setting the Baseline
• Naive Forecast

• Seasonal Naïve Forecast


A Model with Linear Trend
A Model with Linear Trend
A Model with Exponential Trend
A Model with Polynomial Trend
A Model with Seasonality
A Model with Trend and Seasonality
Time Series Forecasting: Autocorrelation and
ARIMA Models
• Here the lag is present due to lag Here the lag is present at 1
at 12 and negative correlation at
6
Time Series Forecasting: Fitting AR(1) Model
Evaluating Predictability of a Time Series
• Test whether the series is a random walk
• A random walk is a series in which changes from one time period to
the next are random.
• A random walk is a special case of an AR(1) model, where the slope
coefficient is equal to 1
• Forecasts from such a model are basically equal to the most recent
observed value
• #(the naive forecast), reflecting the lack of any other information.
• #If a series is a random walk, it cannot be predicted (E.g., Stock
Prices)
Forecasting using Smoothing
Methods
Moving Average: Centered Vs Trailing
Moving Average: Centered Vs Trailing
Exponential Smoothing
Advanced Exponential Smoothing
• Series with a Trend

• Updating the Series


Advanced Exponential Smoothing
• Series with Seasonality (Run Holt Winter’s Exponential Smoothing)

• Updating the Series


Advanced Exponential Smoothing

You might also like