Chapter 4 Class 2. Form of weighted moving average Weights decline exponentially Most recent data weighted most Requires smoothing constant (

Embed Size (px)

Citation preview

  • Slide 1

Chapter 4 Class 2 Slide 2 Form of weighted moving average Weights decline exponentially Most recent data weighted most Requires smoothing constant ( ) Ranges from 0 to 1 Subjectively chosen Involves little record keeping of past data Exponential Smoothing Slide 3 New forecast =last period s forecast + (last period s actual demand last period s forecast) F t = F t 1 + (A t 1 - F t 1 ) whereF t =new forecast F t 1 =previous forecast =smoothing (or weighting) constant (0 1) Slide 4 Exponential Smoothing Example Predicted demand = 142 Ford Mustangs Actual demand = 153 Smoothing constant =.20 New forecast= 142 +.2(153 142) = 142 + 2.2 = 144.2 144 cars Slide 5 Problem 4.4 A check-processing center uses exponential smoothing to forecast the number of incoming checks each month. The number of checks received in June was 40 million, while the forecast was 42 million. A smoothing constant of.2 is used. A) What is the forecast for July? B) If the center received 45 million checks in July, what would be the forecast for August? C) Why might this be an inappropriate forecasting method for this situation? Slide 6 Problem 4.4 A) What is the forecast for July? B) If the center received 45 million checks in July, what would be the forecast for August? C) Why might this be an inappropriate forecasting method for this situation? Slide 7 Problem 4.18 Consider the following actual (At) and forecast (Ft) demand levels for a product. The first forecast, F 1, was derived by observing A 1 and setting equal to A 1. Subsequent forecast averages were derived by exponential smoothing. Using the exponential smoothing method, find the forecast for time period 5 Slide 8 Problem 4.18 We need to find the smoothing constant . We know in general that F t = F t1 + (A t1 F t1 ); t = 2, 3, 4. Choose either t = 3 or t = 4 (t = 2 wont let us find because F 2 = 50 = 50 + (50 50) holds for any ). Lets pick t = 3. Then F 3 = 48 = 50 + (42 50) or 48 = 50 + 42 50 or 2 = 8 So,.25 = Now we can find F 5 : F 5 = 50 + (46 50) F 5 = 50 + 46 50 = 50 4 For =.25, F 5 = 50 4(.25) = 49 The forecast for time period 5 = 49 units. Slide 9 Common Measures of Error Mean Absolute Deviation (MAD) MAD = |actual - forecast| n Mean Squared Error (MSE) MSE = (forecast errors) 2 n Slide 10 Common Measures of Error Mean Absolute Percent Error (MAPE) MAPE = 100 |actual i - forecast i |/actual i n n i = 1 Slide 11 Comparison of Forecast Error RoundedAbsoluteRoundedAbsolute ActualForecastDeviationForecastDeviation Tonnagewithforwithfor QuarterUnloaded =.10 =.10 =.50 =.50 118017551755 2168176817810 31591751617314 417517321669 51901731717020 62051753018025 7180178219313 818217841864 84100 Slide 12 Comparison of Forecast Error RoundedAbsoluteRoundedAbsolute ActualForecastDeviationForecastDeviation Tonagewithforwithfor QuarterUnloaded =.10 =.10 =.50 =.50 118017551755 2168176817810 31591751617314 417517321669 51901731717020 62051753018025 7180178219313 818217841864 84100 MAD = |deviations| n = 84/8 = 10.50 For =.10 = 100/8 = 12.50 For =.50 Slide 13 Comparison of Forecast Error RoundedAbsoluteRoundedAbsolute ActualForecastDeviationForecastDeviation Tonagewithforwithfor QuarterUnloaded =.10 =.10 =.50 =.50 118017551755 2168176817810 31591751617314 417517321669 51901731717020 62051753018025 7180178219313 818217841864 84100 MAD10.5012.50 = 1,558/8 = 194.75 For =.10 = 1,612/8 = 201.50 For =.50 MSE = (forecast errors) 2 n Slide 14 Comparison of Forecast Error RoundedAbsoluteRoundedAbsolute ActualForecastDeviationForecastDeviation Tonagewithforwithfor QuarterUnloaded =.10 =.10 =.50 =.50 118017551755 2168176817810 31591751617314 417517321669 51901731717020 62051753018025 7180178219313 818217841864 84100 MAD10.5012.50 MSE194.75201.50 = 45.62/8 = 5.70% For =.10 = 54.8/8 = 6.85% For =.50 MAPE = 100 |deviation i |/actual i n i = 1 Slide 15 Comparison of Forecast Error RoundedAbsoluteRoundedAbsolute ActualForecastDeviationForecastDeviation Tonnagewithforwithfor QuarterUnloaded =.10 =.10 =.50 =.50 118017551755 2168176817810 31591751617314 417517321669 51901731717020 62051753018025 7180178219313 818217841864 84100 MAD10.5012.50 MSE194.75201.50 MAPE5.70%6.85% Slide 16 Problem 4.14 following are two weekly forecasts made by two different methods for the number of gallons of gasoline, in thousands, demanded at a local gasoline station. Also shown are actual demand levels in thousands of gallons: What are the MAD and MSE for each method? Slide 17 Problem 4.14 What are the MAD and MSE for each method? Method 1:MAD: (0.20 + 0.05 + 0.05 + 0.20)/4 =.125 MSE : (0.04 + 0.0025 + 0.0025 + 0.04)/4 =.021 Method 2:MAD: (0.1 + 0.20 + 0.10 + 0.11) / 4 =.1275 MSE : (0.01 + 0.04 + 0.01 + 0.0121) / 4 =.018 Slide 18 Exponential Smoothing with Trend Adjustment When a trend is present, exponential smoothing must be modified Forecast including (FIT t ) = trend exponentiallyexponentially smoothed (F t ) +(T t )smoothed forecasttrend Slide 19 F t = (A t - 1 ) + (1 - )(F t - 1 + T t - 1 ) T t = (F t - F t - 1 ) + (1 - )T t - 1 Step 1: Compute F t Step 2: Compute T t Step 3: Calculate the forecast FIT t = F t + T t Exponential Smoothing with Trend Adjustment Slide 20 Exponential Smoothing with Trend Adjustment Example Forecast ActualSmoothedSmoothedIncluding Month(t)Demand (A t )Forecast, F t Trend, T t Trend, FIT t 11211213.00 217 320 419 524 621 731 828 936 10 Table 4.1 Slide 21 Forecast ActualSmoothedSmoothedIncluding Month(t)Demand (A t )Forecast, F t Trend, T t Trend, FIT t 11211213.00 217 320 419 524 621 731 828 936 10 Table 4.1 F 2 = A 1 + (1 - )(F 1 + T 1 ) F 2 = (.2)(12) + (1 -.2)(11 + 2) = 2.4 + 10.4 = 12.8 units Step 1: Forecast for Month 2 Exponential Smoothing with Trend Adjustment Example Slide 22 Forecast ActualSmoothedSmoothedIncluding Month(t)Demand (A t )Forecast, F t Trend, T t Trend, FIT t 11211213.00 21712.80 320 419 524 621 731 828 936 10 Table 4.1 T 2 = (F 2 - F 1 ) + (1 - )T 1 T 2 = (.4)(12.8 - 11) + (1 -.4)(2) =.72 + 1.2 = 1.92 units Step 2: Trend for Month 2 Exponential Smoothing with Trend Adjustment Example Slide 23 Forecast ActualSmoothedSmoothedIncluding Month(t)Demand (A t )Forecast, F t Trend, T t Trend, FIT t 11211213.00 21712.801.92 320 419 524 621 731 828 936 10 Table 4.1 FIT 2 = F 2 + T 1 FIT 2 = 12.8 + 1.92 = 14.72 units Step 3: Calculate FIT for Month 2 Exponential Smoothing with Trend Adjustment Example Slide 24 Forecast ActualSmoothedSmoothedIncluding Month(t)Demand (A t )Forecast, F t Trend, T t Trend, FIT t 11211213.00 21712.801.9214.72 320 419 524 621 731 828 936 10 Table 4.1 15.182.1017.28 17.822.3220.14 19.912.2322.14 22.512.3824.89 24.112.0726.18 27.142.4529.59 29.282.3231.60 32.482.6835.16 Exponential Smoothing with Trend Adjustment Example Slide 25 Figure 4.3 |||||||||123456789123456789|||||||||123456789123456789 Time (month) Product demand 35 35 30 30 25 25 20 20 15 15 10 10 5 5 0 0 Actual demand (A t ) Forecast including trend (FIT t ) Exponential Smoothing with Trend Adjustment Example Slide 26 Problem 4.19 Income at the law firm of Smith and Wesson for the period February to July was as follows: MonthFEBMARAPRMAYJUNEJUL Income70.068.564.871.771.372.8 (In $ thousand) Use trend-adjusted exponential smoothing to forecast the law firms August income. Assume that the initial forecast for February is $65,000 and the initial trend adjustment is 0.The smoothing constants selected are = 0.1 and =0.2 Slide 27 Problem 4.19 Slide 28 Trend Projections Fitting a trend line to historical data points to project into the medium-to-long-range Linear trends can be found using the least squares technique y = a + bx ^ where y= computed value of the variable to be predicted (dependent variable) a= y-axis intercept b= slope of the regression line x= the independent variable ^ Slide 29 Least Squares Method Time period Values of Dependent Variable Figure 4.4 Deviation 1 Deviation 5 Deviation 7 Deviation 2 Deviation 6 Deviation 4 Deviation 3 Actual observation (y value) Trend line, y = a + bx ^ Slide 30 Time period Values of Dependent Variable Figure 4.4 Deviation 1 Deviation 5 Deviation 7 Deviation 2 Deviation 6 Deviation 4 Deviation 3 Actual observation (y value) Trend line, y = a + bx ^ Least squares method minimizes the sum of the squared errors (deviations) Least Squares Method Slide 31 Equations to calculate the regression variables b = xy - nxy x 2 - nx 2 y = a + bx ^ a = y - bx Least Squares Method Slide 32 Least Squares Example b = = = 10.54 xy - nxy x 2 - nx 2 3,063 - (7)(4)(98.86) 140 - (7)(4 2 ) a = y - bx = 98.86 - 10.54(4) = 56.70 TimeElectrical Power YearPeriod (x)Demandx 2 xy 1999174174 20002794158 20013809240 200249016360 2003510525525 2004614236852 2005712249854 x = 28y = 692x 2 = 140xy = 3,063 x = 4y = 98.86 Slide 33 Least Squares Example b = = = 10.54 xy - nxy x 2 - nx 2 3,063 - (7)(4)(98.86) 140 - (7)(4 2 ) a = y - bx = 98.86 - 10.54(4) = 56.70 TimeElectrical Power YearPeriod (x)Demandx 2 xy 1999174174 20002794158 20013809240 200249016360 2003510525525 2004614236852 2005712249854 x = 28y = 692x 2 = 140xy = 3,063 x = 4y = 98.86 The trend line is y = 56.70 + 10.54x ^ Slide 34 ||||||||| 199920002001200220032004200520062007 160 160 150 150 140 140 130 130 120 120 110 110 100 100 90 90 80 80 70 70 60 60 50 50 Year Power demand Trend line, y = 56.70 + 10.54x ^ Least Squares Example Slide 35 Least Squares Requirements 1.We always plot the data to insure a linear relationship 2.We do not predict time periods far beyond the database 3.Deviations around the least squares line are assumed to be random Slide 36 Problem 4.25 The following gives the number of accidents that occurred on Florida State Highway 101 during the last 4 months: Forecast the number of accidents that will occur in May, using least squares regression to derive a trend equation. MonthNumber of Accidents January30 February40 March60 April90 Slide 37 Problem 4.25 Slide 38