Copyright 2011 John Wiley & Sons, Inc. 1 Chapter 11 Time Series and Business Forecasting 11.1 Time Series Data 11.2 Simple Moving Average Model 11.3 Weighted Moving Average 11.4 Exponential Smoothing
Copyright 2011 John Wiley & Sons, Inc. 2 Time-series data Data gathered on a given characteristic over a period of time at regular intervals Forecasting. To analyze time series in order to detect patterns that will enable us to forecast future values of the time series Time-series forecasting techniques Attempt to account for changes over time by examining patterns, cycles, trends, or using information about previous time periods Method in time series forecasting Averaging Smoothing 11.1 Time-Series Data
Copyright 2011 John Wiley & Sons, Inc. 3 Time Series Components Trend – long term general direction. Cycles (Cyclical effects) – patterns of highs and lows through which data move over time periods usually of more than a year. Seasonal effects – shorter cycles, which usually occur in time periods of less than one year. Irregular fluctuations – rapid changes or “bleeps” in the data, which occur in even shorter time frames than seasonal effects. Stationary time-series - data that contain no trend, cyclical, or seasonal effects.
Copyright 2011 John Wiley & Sons, Inc. 4 Time-Series Effects
Copyright 2011 John Wiley & Sons, Inc Time Series Data Trend A.k.a secular trend. Long term smooth pattern/direction exhibited by a series. Have a duration of more than one year. Not always linear
Copyright 2011 John Wiley & Sons, Inc Time Series Data Cyclical Wavelike pattern describing long term-trend. Have a duration over a number of years. Resulting in a cyclical effect. Hard to make prediction.
Copyright 2011 John Wiley & Sons, Inc Time Series Data Seasonal. Cycles that occur over short repetitive periods, which is less than one year. E.g: Systematic pattern that occur during a month.
Copyright 2011 John Wiley & Sons, Inc Time Series Data Irregular. Causes by unpredictable changes in a time series that are not cause by any other components. Exist in almost all time series. This component need to be reduce in order to describe and measure other components – to make accurate predictions.
Copyright 2011 John Wiley & Sons, Inc. 9 Error of individual forecast e t – the difference between the actual value x t and the forecast of that value F t. Measurement of Forecasting Error
Copyright 2011 John Wiley & Sons, Inc. 10 Mean Absolute Deviation (MAD) - is the mean, or average, of the absolute values of the errors. Mean Square Error (MSE) - circumvents the problem of the canceling effects of positive and negative forecast errors. Computed by squaring each error and averaging the squared errors.
Copyright 2011 John Wiley & Sons, Inc. 11 YearActualForecastError Nonfarm Partnership Tax Returns: Actual and Forecast
Copyright 2011 John Wiley & Sons, Inc. 12 YearActualForecastError|Error| Mean Absolute Deviation: Nonfarm Partnership Forecasted Data
Copyright 2011 John Wiley & Sons, Inc. 13 Mean Square Error: Nonfarm Partnership Forecasted Data YearActualForecastErrorError
Copyright 2011 John Wiley & Sons, Inc. 14 Smoothing Techniques Several techniques are available to forecast time- series data that are stationary or that include no significant trend, cyclical, or seasonal effects. This technique called smoothing technique. Smoothing techniques produce forecasts based on “smoothing out” the irregular fluctuation effects in the time-series data. Three general categories of smoothing technique 1.Naïve forecasting models 2.Averaging models 3.Exponential smoothing
Copyright 2011 John Wiley & Sons, Inc. 15 Naive Forecasting Models Simple models in which it is assumed that the more recent time periods of data represent the best predictions or forecasts for future outcomes. The assumption of this method is what happen yesterday will also happen today. where
Copyright 2011 John Wiley & Sons, Inc Time Series Data Example: An operator of five independent gas stations recorded the quarterly fuel sale (in thousand litre) for the past 4 years. Forecast the fuel sale for period 2 through period 16 using naïve method. Time period YearQuarterFuel sale (in thousand litre)
Copyright 2011 John Wiley & Sons, Inc Time Series Data Solution Time periodFuel sale (X)Naïve method (F)
Copyright 2011 John Wiley & Sons, Inc. 18 MonthYear Cents per GallonMonthYear Cents per Gallon January261.3January358.2 February63.3February58.3 March62.1March57.7 April59.8April56.7 May58.4May56.8 June57.6June55.5 July55.7July53.8 August55.1August52.8 September55.7September October56.7October November57.2November December58.0December Simple Average Model The monthly average last 12 months was 56.45, so I predict for September. The monthly average last 12 months was 56.45, so I predict for September. The forecast for time period t is the average of the values for a given number of previous time periods. Cost of Residential Heating Oil
Copyright 2011 John Wiley & Sons, Inc Moving Average A moving average is an average that is updated or recomputed for every new time period being considered. The most recent information is utilized in each new moving average. Disadvantage: 1.It is difficult to choose optimal length of time for which to compute moving average 2.Moving average do not usually adjust for time series effects as trend, cycles or seasonality To determine the more optimal length, we need to forecast with several average length and compare error produce by them
Copyright 2011 John Wiley & Sons, Inc. 20 Shown in the following table here are shipments (in millions of dollars) for electric lighting and wiring equipment over a 12-month period. Use these data to compute a 4-month moving average for all available months. Demonstration Problem 15.1: Four-Month Simple Moving Average
Copyright 2011 John Wiley & Sons, Inc. 21 MonthsShipments 4-Mo Moving Average Forecast Error January1056 February1345 March1381 April1191 May June July August September October November December Demonstration Problem 15.1: Four-Month Simple Moving Average
Copyright 2011 John Wiley & Sons, Inc. 22 Demonstration Problem 15.1: Four-Month Moving Average
Copyright 2011 John Wiley & Sons, Inc Simple moving Average Example An operator of five independent gas stations recorded the quarterly fuel sale (in thousand litre) for the past 4 years. Calculate the three-moving averages and five-moving averages. Time period YearQuarterFuel sale (in thousand litre)
Copyright 2011 John Wiley & Sons, Inc Simple moving Average Solution Time periodFuel sale (D) Three-Moving averages (F) Five-Moving averages (F) Moving Average 5-Moving Average
Copyright 2011 John Wiley & Sons, Inc. 25 A moving average in which some time periods are weighted differently than others Weighted Moving Average Forecasting Model Where last month’s value value for the previous month value for the month before the previous month The denominator = the total number of weights Example 3 month Weighted average
Copyright 2011 John Wiley & Sons, Inc. 26 Demonstration Problem 15.2: Compute a 4-month weighted moving average for the electric lighting and wiring data from Demonstration Problem 15.1, using weights of 4 for last month's value, 2 for the previous month's value, and 1 for each of the values from the 2 months prior to that
Copyright 2011 John Wiley & Sons, Inc. 27 MonthsShipments 4-Month Weighted Moving Average Forecast Error January1056 February1345 March1381 April1191 May June July August September October November December Demonstration Problem 15.2: Four-Month Weighted Moving Average
Copyright 2011 John Wiley & Sons, Inc. 28 is the exponential smoothing constant Used to weight data from previous time periods with exponentially decreasing importance in the forecast 11.4 Exponential Smoothing
Copyright 2011 John Wiley & Sons, Inc. 29 The U.S. Census Bureau reports the total units of new privately owned housing started over a 16-year recent period in the United States are given here. Use exponential smoothing to forecast the values for each ensuing time period. Work the problem using =.2,.5, and.8. Demonstration Problem 15.3: = 0.2
Copyright 2011 John Wiley & Sons, Inc. 30 = 0.2 Year Housing Units (1,000)Fe|e|e2e MAD209.8 MSE53110 Demonstration Problem 15.3: = 0.2
Copyright 2011 John Wiley & Sons, Inc. 31 = 0.8 Year Housing Units (1,000)Fe|e|e2e MAD111.2 MSE Demonstration Problem 15.3: = 0.8
Copyright 2011 John Wiley & Sons, Inc. 32 Exercise Use the following time-series data to answer the given questions A.Develop forecasts for periods 5 through 10 using 4-month moving averages. B.Develop forecasts for periods 5 through 10 using 4-month weighted moving averages. Weight the most recent month by a factor of 4, the previous month by 2, and the other months by 1. C.Compute the errors of the forecasts in parts (a) and (b) and observe the differences in the errors forecast by the two different techniques.
Copyright 2011 John Wiley & Sons, Inc. 33 Solution a.) 4-mo. mov. avg. error b.) 4-mo. wt. mov. avg. error c.) difference in errors = In each time period, the four-month moving average produces greater errors of forecast than the four- month weighted moving average.