Time Series Analysis and Forecasting

Slides:



Advertisements
Similar presentations
Decomposition Method.
Advertisements

Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)
Part II – TIME SERIES ANALYSIS C3 Exponential Smoothing Methods © Angel A. Juan & Carles Serrat - UPC 2007/2008.
ECON 251 Research Methods 11. Time Series Analysis and Forecasting.
19- 1 Chapter Nineteen McGraw-Hill/Irwin © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved.
Exponential Smoothing Methods
Time Series Analysis Autocorrelation Naive & Simple Averaging
Ka-fu Wong © 2003 Chap Dr. Ka-fu Wong ECON1003 Analysis of Economic Data.
Analyzing and Forecasting Time Series Data
Chapter 5 Time Series Analysis
MOVING AVERAGES AND EXPONENTIAL SMOOTHING
1 Time Series Analysis Thanks to Kay Smith for making these slides available to me!
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Time Series and Forecasting Chapter 16.
Time Series and Forecasting
Slides 13b: Time-Series Models; Measuring Forecast Error
CHAPTER 18 Models for Time Series and Forecasting
© 2003 Prentice-Hall, Inc.Chap 12-1 Business Statistics: A First Course (3 rd Edition) Chapter 12 Time-Series Forecasting.
Lecture 4 Time-Series Forecasting
1 1 Slide © 2009 South-Western, a part of Cengage Learning Chapter 6 Forecasting n Quantitative Approaches to Forecasting n Components of a Time Series.
Slides by John Loucks St. Edward’s University.
© 2002 Prentice-Hall, Inc.Chap 13-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 13 Time Series Analysis.
Demand Management and Forecasting
TIME SERIES by H.V.S. DE SILVA DEPARTMENT OF MATHEMATICS
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Chapter 16: Time-Series Analysis
Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
DSc 3120 Generalized Modeling Techniques with Applications Part II. Forecasting.
Time-Series Forecasting Learning Objectives 1.Describe What Forecasting Is 2. Forecasting Methods 3.Explain Time Series & Components 4.Smooth a Data.
1 DSCI 3023 Forecasting Plays an important role in many industries –marketing –financial planning –production control Forecasts are not to be thought of.
MBA.782.ForecastingCAJ Demand Management Qualitative Methods of Forecasting Quantitative Methods of Forecasting Causal Relationship Forecasting Focus.
Time Series Analysis and Forecasting
Chapter 6 Business and Economic Forecasting Root-mean-squared Forecast Error zUsed to determine how reliable a forecasting technique is. zE = (Y i -
Time series Decomposition Farideh Dehkordi-Vakil.
Time-Series Forecasting Overview Moving Averages Exponential Smoothing Seasonality.
Time series Model assessment. Tourist arrivals to NZ Period is quarterly.
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 20 Time Series Analysis and Forecasting.
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
4-1 Operations Management Forecasting Chapter 4 - Part 2.
© 1999 Prentice-Hall, Inc. Chap Chapter Topics Component Factors of the Time-Series Model Smoothing of Data Series  Moving Averages  Exponential.
Economics 173 Business Statistics Lecture 23 © Fall 2001, Professor J. Petry
Time Series Analysis and Forecasting. Introduction to Time Series Analysis A time-series is a set of observations on a quantitative variable collected.
Economics 173 Business Statistics Lecture 26 © Fall 2001, Professor J. Petry
COMPLETE BUSINESS STATISTICS
Economics 173 Business Statistics Lecture 25 © Fall 2001, Professor J. Petry
Time Series and Forecasting
MGS3100_03.ppt/Feb 11, 2016/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Time Series Forecasting Feb 11, 2016.
Economics 173 Business Statistics Lecture 27 © Fall 2001, Professor J. Petry
1 1 Chapter 6 Forecasting n Quantitative Approaches to Forecasting n The Components of a Time Series n Measures of Forecast Accuracy n Using Smoothing.
Forecasting is the art and science of predicting future events.
Time Series and Forecasting Chapter 16 McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
MBF1413 | Quantitative Methods Prepared by Dr Khairul Anuar 8: Time Series Analysis & Forecasting – Part 1
Chapter 20 Time Series Analysis and Forecasting. Introduction Any variable that is measured over time in sequential order is called a time series. We.
Statistics for Business and Economics Module 2: Regression and time series analysis Spring 2010 Lecture 7: Time Series Analysis and Forecasting 1 Priyantha.
Chapter 15 Forecasting. Forecasting Methods n Forecasting methods can be classified as qualitative or quantitative. n Such methods are appropriate when.
Chapter 20 Time Series Analysis and Forecasting. Introduction Any variable that is measured over time in sequential order is called a time series. We.
Forecasting. Model with indicator variables The choice of a forecasting technique depends on the components identified in the time series. The techniques.
3-1Forecasting Weighted Moving Average Formula w t = weight given to time period “t” occurrence (weights must add to one) The formula for the moving average.
TIME SERIES MODELS. Definitions Forecast is a prediction of future events used for planning process. Time Series is the repeated observations of demand.
©The McGraw-Hill Companies, Inc. 2008McGraw-Hill/Irwin Time Series and Forecasting Chapter 16.
Yandell – Econ 216 Chap 16-1 Chapter 16 Time-Series Forecasting.
Lecture 9 Forecasting. Introduction to Forecasting * * * * * * * * o o o o o o o o Model 1Model 2 Which model performs better? There are many forecasting.
Keller: Stats for Mgmt & Econ, 7th Ed
Time Series And Business Forecasting
Chapter Nineteen McGraw-Hill/Irwin
Statistics for Managers using Microsoft Excel 3rd Edition
John Loucks St. Edward’s University . SLIDES . BY.
MBF1413 | Quantitative Methods Prepared by Dr Khairul Anuar
Chapter Nineteen McGraw-Hill/Irwin
Exponential Smoothing
TIME SERIES MODELS – MOVING AVERAGES.
Presentation transcript:

Time Series Analysis and Forecasting Chapter 20 Time Series Analysis and Forecasting

Chapter 20 Introduction Any variable that is measured over time in sequential order is called a time series. We analyze time series to detect patterns. The patterns help in forecasting future values of the time series. Predicted value The time series exhibit a downward trend pattern.

20.1 Components of a Time Series A time series can consist of four components. Long - term trend (T). Cyclical effect (C). Seasonal effect (S). Random variation (R). A trend is a long term relatively smooth pattern or direction, that persists usually for more than one year.

Components of a Time Series A time series can consists of four components. Long - term trend (T) Cyclical variation (C) Seasonal variation (S) Random variation (R) 6/90 6/93 6/96 6/99 6/02 A cycle is a wavelike pattern describing a long term behavior (for more than one year). Cycles are seldom regular, and often appear in combination with other components.

Components of a Time Series A time series can consists of four components. Long - term trend (T). Cyclical effect (C). Seasonal effect (S). Random variation (R). 6/97 12/97 6/98 12/98 6/99 The seasonal component of the time series exhibits a short term (less than one year) calendar repetitive behavior.

Components of a Time Series A time series can consists of four components. Long - term trend (T). Cyclical effect (C). Seasonal effect (S). Random variation (R). We try to remove random variation thereby, identify the other components. Random variation comprises the irregular unpredictable changes in the time series. It tends to hide the other (more predictable) components.

20.2 Smoothing Techniques To produce a better forecast we need to determine which components are present in a time series. To identify the components present in the time series, we need first to remove the random variation. This can be done by smoothing techniques.

Moving Averages A k-period moving average for time period t is the arithmetic average of the time series values around period t. For example: A 3-period moving average at period t is calculated by (yt-1 + yt + yt+1)/3

Moving Average: Example To forecast future gasoline sales, the last four years quarterly sales were recorded. Calculate the three-quarter and five-quarter moving average. Show the relevant graphs. Xm20-01

Moving Average: Example Solution Solving by hand * * * (39+37+61+58+18)/5= (39+37+61)/3= (37+61+58)/3=

Moving Average: Smoothing effect 3-period moving average Comment: We can identify a trend component . Notice how the averaging process removes some of the random variation.

Moving Average: Smoothing effect 3-period moving average The 5-period moving average removes more variation than the 3-period moving average. 5-period moving average

Centered Moving Average With an even number of observations included in the moving average, the average is placed between the two periods in the middle. To place the moving average in an actual time period, we need to center it. Two consecutive moving averages are centered by taking their average, and placing it in the middle between them. (This is used to graph the points.)

Centered Moving Average: Example Calculate the 4-period moving average and center it, for the data given below: Period Time series Moving Avg. Centerd Mov.Avg. 1 15 2 27 3 20 4 14 5 25 6 11 19.0 (2.5) 20.25 (3.5) 21.5 19.50 (4.5) 17.5

Exponential Smoothing The exponential smoothing method provides smoothed values for all the time periods observed. When smoothing the time series at time t, the exponential smoothing method considers all the data available at t (yt, yt-1,…) The moving average method does not provide smoothed values (moving average values) for the first and last set of periods. the moving average method considers only the observations included in the calculation of the average value, and “forgets” the rest.

Exponentially Smoothed Time Series St = wyt + (1-w)St-1 St = exponentially smoothed time series at time t. yt = time series at time t. St-1 = exponentially smoothed time series at time t-1. w = smoothing constant, where 0 £ w £ 1.

The Exponentially Smoothed Process Example 20.2 (Xm20-01) Calculate the gasoline sale smoothed time series using exponential smoothing with w = .2, and w = .7. Set S1 = y1 S1 = 39 S2 = wy2 + (1-w)S1 S2 = (.2)(37) + (1-.2)(39) = 38.6 S3 = wy3 + (1-w)S2 S3 = (.2)(61) + (1-.2)(38.6) = 43.1

The Exponentially Smoothed Process Example 20.2-continued Small ‘w’ provides a lot of smoothing Neither value of ‘w’ reveals the seasonality.

The Exponentially Smoothed Process We will let Minitab do our exponential smoothing Stat>Time Series > Single Exp Smoothing This will give us the smoothed graph

20.3 Trend and Seasonal Effects Trend Analysis The trend component of a time series can be linear or non-linear. It is easy to isolate the trend component using linear regression. For linear trend use the model y = b0 + b1t + e. For non-linear trend with one (major) change in slope use the quadratic model y = b0 + b1t + b2t2 + e

Seasonal Analysis Seasonal variation may occur within a year or within a shorter period (month, week) To measure the seasonal effects we construct seasonal indexes. Seasonal indexes express the degree to which the seasons differ from the average time series value across all seasons.

Computing Seasonal Indexes Remove the effects of the seasonal and random variations by regression analysis = b0 + b1t For each time period compute the ratio yt/yt which removes most of the trend variation > This is based on the Multiplicative Model. For each season calculate the average of yt/yt which provides the measure of seasonality. Adjust the average above so that the sum of averages of all seasons is 1 (if necessary) >

The additive and multiplicative models There are two mostly used general models to describe the composition of a time series The multiplicative model The additive model yt = Tt + St + Rt In the seasonal index analysis performed here we use the multiplicative model because it is mathematically easier to handle. (Assuming no cyclical effects).

Seasonal indexes analysis The multiplicative model The regression line represents trend. We see that the ratio represents the seasonality and the random effects. Averaging these ratios for each season type removes the random effects and leaves the seasonality.

Seasonal indexes analysis The multiplicative model Note how no trend is observed, but seasonality and randomness still exist. Averaging the ratios for each season type removes the random effects and leaves the seasonality.

Computing Seasonal Indexes Example 20.3 (Xm20-03) Calculate the quarterly seasonal indexes for hotel occupancy rate in order to measure seasonal variation. Data:

Computing Seasonal Indexes Rationale for seasonal indexes Computing Seasonal Indexes Perform regression analysis for the model y = b0 + b1t + e where t represents the time, and y represents the occupancy rate. Time (t) Rate 1 0.561 2 0.702 3 0.800 4 0.568 5 0.575 6 0.738 7 0.868 8 0.605 . . The regression line represents trend.

yt / yt The Ratios > t yt Ratio .561 .645 .561/.645=.870 .561 .645 .561/.645=.870 .702 .650 .702/.650=1.08 …………………………………………………. =.639368+.005245(1) No trend is observed, but seasonality and randomness still exist.

The Average Ratios by Seasons To remove most of the random variation but leave the seasonal effects,average the terms for each season. Average ratio for quarter 1: (.870 + .864 + .865 + .879 + .913)/5 = .878 Average ratio for quarter 2: (1.080+1.100+1.067+.993+1.138)/5 = 1.076 Average ratio for quarter 3: (1.221+1.284+1.046+1.122+1.181)/5 = 1.171 Average ratio for quarter 4: (.860 +.888 + .854 + .874 + .900)/ 5 = .875

Adjusting the Average Ratios In this example the sum of all the averaged ratios must be 4, such that the average ratio per season is equal to 1. If the sum of all the ratios is not 4, we need to adjust them proportionately. (Seasonal averaged ratio) (number of seasons) Sum of averaged ratios Seasonal index = Suppose the sum of ratios is equal to 4.1. Then each ratio will be multiplied by 4/4.1. In our problem the sum of all the averaged ratios is equal to 4: .878 + 1.076 + 1.171 + .875 = 4.0. No normalization is needed. These ratios become the seasonal indexes.

Interpreting the Seasonal Indexes The seasonal indexes tell us what is the ratio between the time series value at a certain season, and the overall seasonal average. In our problem: 17.1% above the annual average Quarter 3 Quarter 3 87.8% 107.6% 117.1% 87.5% 7.6% above the annual average 12.5% below the annual average Annual average occupancy (100%) Quarter 2 Quarter 2 12.2% below the annual average Quarter 1 Quarter 1 Quarter 4 Quarter 4

The Smoothed Time Series The trend component and the seasonality component are recomposed using the multiplicative model. In period #1 ( quarter 1): In period #2 ( quarter 2): Actual series Smoothed series The linear trend (regression) line

Deseasonalized Time Series Seasonally adjusted time series = Actual time series Seasonal index By removing the seasonality, we can identify changes in the other components of the time series, that might have occurred over time.

Deseasonalized Time Series In period #1 ( quarter 1): In period #2 ( quarter 2): In period #5 ( quarter 1): There was a gradual increase in occupancy rate

20.4 Introduction to Forecasting There are many forecasting models available ? * o * o o o o o o o Model 1 Model 2 Which model performs better?

20.4 Introduction to Forecasting A forecasting method can be selected by evaluating its forecast accuracy using the actual time series. The two most commonly used measures of forecast accuracy are: Mean Absolute Deviation Sum of Squares for Forecast Error

Measures of Forecast Accuracy Choose SSE if it is important to avoid (even a few) large errors. Otherwise, use MAD. A useful procedure for model selection. Use some of the observations to develop several competing forecasting models. Run the models on the rest of the observations. Calculate the accuracy of each model (by comparing to actual data at a later time period). Select the model with the best (lowest) accuracy measure.

Selecting a Forecasting Model Annual data from 1970 to 1996 were used to develop three forecasting models. Use MAD and SSE to determine which model performed best for 1997, 1998, 1999, and 2000.

Solution For model 1 Summary of results Actual y in 1991 Forecast for y in 1991 Summary of results

Selecting a Forecasting Model In this case, Model 2 is inferior to both Models 1 and 3 Using MAD Model 3 is best Using SSE Model 1 is most accurate Choice – prefer model that consistently produces moderately accurate forecasts (Model 3) or one whose forecasts come quite close usually but misses badly in a small number of time periods (Model 1)

20.5 Forecasting Models The choice of a forecasting technique depends on the components identified in the time series. The techniques discussed next are: Exponential smoothing Seasonal indexes Autoregressive models (a brief discussion)

Forecasting with Exponential Smoothing The exponential smoothing model can be used to produce forecasts when the time series… exhibits gradual(not a sharp) trend no cyclical effects no seasonal effects Forecast for period t+k is computed by Ft+k = St t is the current period; St = wyt + (1-w)St-1

Forecasting with Exponential Smoothing - Example The quarterly sales (in $ millions) of a department store chain were recorded for the years 1997 – 2000

Forecasting with Exponential Smoothing - Example Quarter 1997 1998 1999 2000 1 18 33 25 41 2 22 20 36 3 27 38 44 52 4 31 26 29 45

Forecasting with Exponential Smoothing - Example Y16 = 45 S16 = 41.8

Forecasting with Exponential Smoothing - Example Forecast for period t+k is computed by (t = 16) Ft+k = St t is the current period; St = wyt + (1-w)St-1 F17= S16 = 41.8 F18= S16 = 41.8 F19= S16 = 41.8 F20= S16 = 41.8

Computing Seasonal Indexes Example 20.3 (Xm20-03) Calculate the quarterly seasonal indexes for hotel occupancy rate in order to measure seasonal variation. Data:

Forecasting with Seasonal Indexes; Example Use the seasonal indexes calculated in Example 21.3 along with the trend line, to forecast each quarter occupancy rate in 2001. The solution procedure Use simple linear regression to find the trend line. Use the trend line to calculate the trend values. To calculate Ft multiply the trend value for period t by the seasonal index of period t.

Forecasting with Seasonal Indexes; Example The solution procedure 1. Use simple linear regression to find the trend line. From Minitab (Using decomposition ) Yt = .639 + .00525t

Forecasting with Seasonal Indexes; Example The solution procedure: We previously used 20 time periods Quarter 1: 0.639 + 0.00525(21) = 0.749 Quarter 2: 0.639 + 0.00525(22) = 0.755 Quarter 3: 0.639 + 0.00525(23) = 0.760 Quarter 4: 0.639 + 0.00525(24) = 0.765 2. Use the trend line to calculate the trend values Yt = .639 + .00525t

Forecasting with Seasonal Indexes; Example The solution procedure 3. To calculate Ft multiply the trend value for period t by the seasonal index of period t. Quarter 1: 0.749 X 0.878 = 0.658 Quarter 2: 0.755 X 1.076 = 0.812 Quarter 3: 0.760 X 1.171 = 0.890 Quarter 4: 0.765 X 0.875 = 0.670 We forecast that the quarterly occupancy rates for the next year will be 65.8%, 81.2%, 89% and 67%.

Forecasting with Seasonal Indexes: Example (Summary) Solution The trend line was obtained from the regression analysis. For the year 2001 we have: F21 = .749(.878) t Trend value Quarter SI Forecast 21 .749 1 .878 .658 22 .755 2 1.076 .812 23 .760 3 1.171 .890 24 .765 4 .875 .670

Problem 20-47 The revenues (in $millions) of a chain of ice-cream stores are listed for each quarter during the previous 5 years. Use the handout with the plots etc. to answer the questions.

Quarter 1996 1997 1998 1999 2000 1 16 14 17 18 21 2 25 27 31 29 30 3 32 40 45 52 4 24 23

20-47 1. Plot the time series. Is there a pattern? Does there appear to be A long term trend A cyclic effect A seasonal effect 2. Plot the 3-year moving balance. Does this change any of your answers from # 1?

20-47 - Answers Seems to be a long term trend – going upward. Does not seem to be a cyclic effect. Because we know the data is in quarter years, this seems to be a strong seasonal effect. The three year moving average plot strengthens these observations.

20-47 Why is exponential smoothing not recommended as a forecasting tool in this problem? Look at the exponential smoothing plot (w = 0.3) Does this confirm your answer above?

20-47 - Answers Exponential smoothing is not recommended as a forecasting tool for this problem because of the strong seasonal effect. The 0.3 gives a large smoothing effect, and the seasonality is no larger as evident.

20-47 Look at the trend analysis plots. Does the Linear or the Quadratic trend model seem to be better? Why? What is the equation of the trend line?

20-47 - Answers The linear model seems to fit well. The quadratic model doesn’t show much of a curve. Checking the MAD for both models shows 6.8716 for the linear model and 6.8784 for the quadratic model. Since the linear model has a slightly smaller MAD we will use it. The equation of the trend line, then, is Y = 20.2105 + 0.732331t

20.47 Predict the sales for the next 4 quarters using the trend analysis line.

20-47 - Answer The next 4 quarters are numbers 21, 22, 23, 24 Y = 20.21 + 0.732 t Y21 = [20.21 + 0.732 (21)] = 35.58 Y22 = [20.21 + 0.732 (22)] = 36.31 Y23 = [20.21 + 0.732 (23)] = 37.05 Y24 = [20.21 + 0.732 (24)] = 37.78

20-47 Using the seasonal indexes and the trend line, forecast revenues for the next four quarters.

20-47 - Answer The Fitted trend equation for the decomposition plot is Y = 21.7511 + 0.567732 t The next time period is number 21. Y21 = [21.75 + 0.568 (21)] * 0.63581 = 21.41 Y22 = [21.75 + 0.568 (22)] * 1.05732 = 36.21 Y23 = [21.75 + 0.568 (23)] * 1.36851 = 47.64 Y24 = [21.75 + 0.568 (24)] * 0.93835 = 33.20

20-47 (continued) If the actual sales numbers for the next four quarters were 24, 40, 48, 36. Calculate the MAD for the predictions from the trend line and seasonal indexes.

20-47 - Answer MAD = |21.41 - 24| + |36.21 – 40| + |47.46 – 48| + |33.2 – 36| / 4 = (2.59 + 3.79 + .54 + .2.8 ) / 4 = 9.72/4 = 2.43

20-47 Go back to the linear trend equation forecasts. If the actual sales numbers for the next four quarters were 24, 40, 48, 36. Calculate the MAD. Which method of forecasting did a better job in this case?

20-47 Answers MAD = |35.58 - 24| + |36.31 – 40| + |37.05 – 48| + |37.78 – 36| / 4 = (11.58 + 3.69 + 10.95 + 1.78 ) / 4 = 28/4 = 7 This is the MAD for the trend analysis. The MAD for the seasonal trend analysis was 2.43. The seasonal trend analysis did the better job of forecasting.