Title: Time Series
1Time Series Forecasting Basics Regression
Based Trend Models
Topics Components of a Time Series Measures of
Forecast Error Testing for Randomness Autocorrelat
ion Trend Fitting with Excel Tool Assessing Trend
Models Forecasting with Trend Models Implementatio
ns in StatTools
2Trend Component
- When observations, Yt, increase or decrease
regularly through time.
3Seasonal Component
- When observations, Yt, exhibit a regularly
wavelike pattern through time.
4Cyclic Component
- When wave pattern is irregular and time between
peaks exceeds 1 year
5Random Component
6Forecast Error
7Measures of Forecast Error
Usually Based on historical time series
observations Reported in Stat-Tools Software
8Measures of Forecast Error
9Measures of Forecast Error
10Interpreting Measures of Forecast Error
- Good Models give small values for MAE, RMSE, and
MAPE - When comparing several forecast models choose
model with lowest values of all 3 - MAPE easier to interpret
11Building Forecast Models
- Requires identification and appropriate modeling
of Trend and Seasonal Components - Left over variation assumed to be random
12Residual Analysis
- If Forecast model is successful residuals should
be truly random - Check with plot of residuals vs. time
- Follow-up with Runs Test and Correlogram
13Classical Departures from Randomness Trend
14Classical Departures from Randomness
Non-constant Variance
15Classical Departures from Randomness Seasonality
16Classical Departures from Randomness Meandering
Pattern
17Runs Test for Randomness
- Choose a base value such as the mean of the
series - Define a run as a consecutive series of
observations that remain on one side of this base
level
18Runs Test for Randomness
- If too many or too few runs in series, conclude
series is not random - StatTools output gives p-value for Runs test
- If p-value lt a (say 0.05) conclude series not
random
19Lagged Series and Autocorrelation
- Autocorrelation exists when successive series
observations are correlated with one another - To lag by 1 time unit, we shift the series to
make Yt in new series Yt-1 in original series
20Lagged Series and Autocorrelation
- Lag can equal 1, 2,.k time units
- Correlation between lagged series and original
series measures autocorrelation
21Correlogram
- This is a chart showing autocorrelations between
original series and lagged series for lag 1,
2,.k - Available in StatTools
22Interpreting Correlograms
- Any autocorrelation gt 2 std. errors in magnitude
suggests non-randomness - StatTools automatically highlights lags with
significant positive autocorrelations
23Interpreting Correlograms
24Interpreting Correlograms
25Trend Modeling Problem Scenario
- A company wants to forecast sales ( units sold)
based on monthly time series data collected over
the last 5 years. They believe sales have been
growing by a constant percentage - Is there a good trend model?
26Exploring the Best Trend Model with Excel
27Exploring the Best Trend Model with Excel
28Interpretation of Exponential Model
- Rewrite equation Y 5779e0.026t in log form
Log(Y) 0.026t log(5779) - Coefficient of t Unit Sales grew at a constant
rate of 2.6 per month
29Interpretation of Linear Model
- Equation Y 342.7t 3706.4
- Coefficient of t Unit Sales grew at a constant
rate of 343 units, on average, per month
30Computing Forecast Error for Exponential Model
- Transform Sales to Ln(sales) and regress it (as Y
variable) against time in months - Let slope b and intercept a
- Compute Forecast Sales for each month Ft
eaebt
31Assessing Forecast Error for Exponential Model
- Compute Forecast Error for each month Et Yt
Ft - Compute MAE, RMSE, MAPE from the Et values
applying formulas in Excel
32Interpreting Forecast Error for Exponential Model
- In each of the past 60 months the exponential
model forecast the Sales with a mean error of
8.3 - The monthly forecast was off by 1103 units on
average
33Computing and Assessing Forecast Error for Linear
Model
- Compute Forecast Sales for each month Ft
342.7t 3706.4 - Compute Forecast Error for each month Et Yt
Ft - Compute MAE, RMSE, MAPE from the Et values
applying formulas in Excel
34Interpreting Forecast Error for Linear Model
- In each of the past 60 months the Linear model
forecast the Sales with a mean error of 10.1 - The monthly forecast was off by 1169 units on
average
35Forecast for Future Time Periods (Exponential
Model)
- Plug in appropriate value for t in the equation
Ft eaebt - E.g. for first month in 6th year, use t 61
- F61 5779e0.02661 28,226
36Runs Test in StatTools
- Name the data set in the usual way
- Place the cursor anywhere in the spreadsheet and
click on the Time Series Forecasting icon (4th
from left) - Select Runs test for Randomness from drop down
menu
37Runs Test in StatTools
- Select the variable of interest by clicking in
the box next to it - Accept the default radio button for Cut-off
value then click O.K - StatTools will insert new worksheet with
Runs-Test output
38Correlogram in StatTools
- Name the data set in the usual way
- Place the cursor anywhere in the spreadsheet and
click on the Time Series Forecasting icon (4th
from left) - Select Autocorrelation from drop down menu
39Correlogram in StatTools
- Select the variable of interest by clicking in
the box next to it - Accept the defaults for Number of Lags and
Create Autocorrel Chart then click O.K - StatTools will insert new worksheet with
Correlogram