Lesson 4 -Part A Forecasting Quantitative Approaches to Forecasting Components of a Time Series Measures of Forecast Accuracy Smoothing Methods Trend Projection Trend and Seasonal Components Regression Analysis
Forecasting Methods ForecastingMethodsForecastingMethods QuantitativeQuantitativeQualitativeQualitative CausalCausal Time Series SmoothingSmoothingTrendProjectionTrendProjection Trend Projection Adjusted for Seasonal Influence Trend Projection Adjusted for Seasonal Influence
Quantitative Approaches to Forecasting Quantitative methods are based on an analysis of historical data concerning one or more time series. A time series is a set of observations measured at successive points in time or over successive periods of time. If the historical data used are restricted to past values of the series that we are trying to forecast, the procedure is called a time series method. If the historical data used involve other time series that are believed to be related to the time series that we are trying to forecast, the procedure is called a causal method.
Time Series Methods Three time series methods are: –smoothing –trend projection –trend projection adjusted for seasonal influence
Components of a Time Series The pattern or behavior of the data in a time series has several components. The four components we will study are: TrendTrendCyclicalCyclicalSeasonalSeasonal IrregularIrregular
Components of a Time Series Trend Component –The trend component accounts for the gradual shifting of the time series to relatively higher or lower values over a long period of time. - Trend is usually the result of long-term factors such as changes in the population, demographics, technology, or consumer preferences.
Components of a Time Series –Any regular pattern of sequences of values above and below the trend line lasting more than one year can be attributed to the cyclical component. Cyclical Component –Usually, this component is due to multiyear cyclical movements in the economy.
Components of a Time Series The seasonal component accounts for regular patterns of variability within certain time periods, such as a year. The seasonal component accounts for regular patterns of variability within certain time periods, such as a year. Seasonal Component The variability does not always correspond with the seasons of the year (i.e. winter, spring, summer, fall). The variability does not always correspond with the seasons of the year (i.e. winter, spring, summer, fall). There can be, for example, within-week or within- day “seasonal” behavior. There can be, for example, within-week or within- day “seasonal” behavior.
Components of a Time Series The irregular component is caused by short-term, unanticipated and non-recurring factors that affect the values of the time series. The irregular component is caused by short-term, unanticipated and non-recurring factors that affect the values of the time series. Irregular Component It is unpredictable. It is unpredictable. This component is the residual, or “catch-all,” factor that accounts for unexpected data values. This component is the residual, or “catch-all,” factor that accounts for unexpected data values.
Measures of Forecast Accuracy The average of the squared forecast errors for the historical data is calculated. The forecasting method or parameter(s) that minimize this mean squared error is then selected. The mean of the absolute values of all forecast errors is calculated, and the forecasting method or parameter(s) that minimize this measure is selected. (The mean absolute deviation measure is less sensitive to large forecast errors than the mean squared error measure.) Mean Squared Error Mean Absolute Deviation
Smoothing Methods Three common smoothing methods are: In cases in which the time series is fairly stable and has no significant trend, seasonal, or cyclical effects, one can use smoothing methods to average out the irregular component of the time series. Exponential Smoothing Weighted Moving Averages Moving Averages
Smoothing Methods The moving averages method consists of computing an average of the most recent n data values for the series and using this average for forecasting the value of the time series for the next period. Moving Averages
Sales of Comfort brand headache medicine for the past ten weeks at Rosco Drugs are shown on the next slide. If Rosco Drugs uses a 3-period moving average to forecast sales, what is the forecast for Week 11? Example: Rosco Drugs Smoothing Methods: Moving Averages
Example: Rosco Drugs Smoothing Methods: Moving Averages WeekWeekSalesSales
Time Series Plot using MINITAB
Time series appears to be stable over time, though random variability is present. Thus, smoothing methods are applicable.
Smoothing Methods: Moving Averages WeekSales3MAForecast ( )/3
Moving Averages using MINITAB
You can specify this i.e. 4, 6, 12, … & its depend on the problem # of future forecasts needed # of data points
Moving Average for Sales Moving Average: Length 3 Time Sales MA Predict Error * * * * * * * * Forecasts Period Forecast 95% CI
MSE # of values to be included in the moving average is chosen such that it minimizes the MSE
Smoothing Methods Weighted Moving Averages – The more recent observations are typically given more weight than older observations. – For convenience, the weights usually sum to 1. –To use this method we must first select the number of data values to be included in the average. –Next, we must choose the weight for each of the data values.
Smoothing Methods Weighted Moving Averages –An example of a 3-period weighted moving average (3WMA) is: 3WMA =.2(110) +.3(115) +.5(125) = 119 Most recent of the three observations Weights (.2,.3, and.5) sum to 1
Smoothing Methods Exponential Smoothing –This method is a special case of a weighted moving averages method; we select only the weight for the most recent observation. –The weights for the other data values are computed automatically and become smaller as the observations grow older. –The exponential smoothing forecast is a weighted average of all the observations in the time series.
Smoothing Methods Exponential Smoothing Model F t +1 = Y t + (1 – ) F t where F t +1 = forecast of the time series for period t + 1 Y t = actual value of the time series in period t F t = forecast of the time series for period t = smoothing constant (0 < < 1) To start the calculations, we let F 1 = Y 1 To start the calculations, we let F 1 = Y 1
–With some algebraic manipulation, we can rewrite F t+1 = Y t + (1 – )F t as: Smoothing Methods Exponential Smoothing Model F t +1 = F t + Y t – F t ) –We see that the new forecast F t+1 is equal to the previous forecast F t plus an adjustment, which is times the most recent forecast error, Y t – F t.
Sales of Comfort brand headache medicine for the past ten weeks at Rosco Drugs are shown on the next slide. If Rosco Drugs uses exponential smoothing to forecast sales, which value for the smoothing constant ,.1 or.8, gives better forecasts? Example: Rosco Drugs Smoothing Methods: Exponential Smoothing
Example: Rosco Drugs WeekWeekSalesSales Smoothing Methods: Exponential Smoothing
Exponential Smoothing ( =.1, 1 - =.9) F 1 = 110 F 2 =.1Y 1 +.9F 1 =.1(110) +.9(110) = 110 F 3 =.1Y 2 +.9F 2 =.1(115) +.9(110) = F 4 =.1Y 3 +.9F 3 =.1(125) +.9(110.5) = F 5 =.1Y 4 +.9F 4 =.1(120) +.9(111.95) = F 6 =.1Y 5 +.9F 5 =.1(125) +.9(112.76) = F 7 =.1Y 6 +.9F 6 =.1(120) +.9(113.98) = F 8 =.1Y 7 +.9F 7 =.1(130) +.9(114.58) = F 9 =.1Y 8 +.9F 8 =.1(115) +.9(116.12) = F 10 =.1Y 9 +.9F 9 =.1(110) +.9(116.01) =
Smoothing Methods: Exponential Smoothing Exponential Smoothing ( =.8, 1 - =.2) F 1 = 110 F 2 =.8(110) +.2(110) = 110 F 3 =.8(115) +.2(110) = 114 F 4 =.8(125) +.2(114) = F 5 =.8(120) +.2(122.80) = F 6 =.8(125) +.2(120.56) = F 7 =.8(120) +.2(124.11) = F 8 =.8(130) +.2(120.82) = F 9 =.8(115) +.2(128.16) = F 10 =.8(110) +.2(117.63) =
Smoothing Methods: Exponential Smoothing [( Y 2 - F 2 ) 2 + ( Y 3 - F 3 ) 2 + ( Y 4 - F 4 ) ( Y 10 - F 10 ) 2 ]/9 Mean Squared Error In order to determine which smoothing constant gives the better performance, we calculate, for each, the mean squared error for the nine weeks of forecasts, weeks 2 through 10.
Smoothing Methods: Exponential Smoothing Week =.1 =.8 FtFtFtFt FtFtFtFt ( Y t - F t ) Sum Sum Sum/ Sum/ MSE YtYtYtYt
Exponential Smoothing using MINITAB
# of future forecasts needed # of data points value for the smoothing constant
Single Exponential Smoothing for Sales Smoothing Constant Alpha 0.1 Time Sales Smooth Predict Error Forecasts Period Forecast Lower Upper
Single Exponential Smoothing for Sales Smoothing Constant Alpha 0.8 Time Sales Smooth Predict Error Forecasts Period Forecast Lower Upper
smoothing Value of the smoothing constant constant is chosen such that it minimizes the MSE