25. Components of Demand Figure 4.1 Demand for product or service | | | | 1 2 3 4 Year Average demand over four years Seasonal peaks Trend component Actual demand Random variation
26.
27.
28.
29.
30.
31.
32. Moving Average Example (12 + 13 + 16)/3 = 13 2 / 3 (13 + 16 + 19)/3 = 16 (16 + 19 + 23)/3 = 19 1 / 3 January 10 February 12 March 13 April 16 May 19 June 23 July 26 Actual 3-Month Month Shed Sales Moving Average 10 12 13 ( 10 + 12 + 13 )/3 = 11 2 / 3
33. Graph of Moving Average | | | | | | | | | | | | J F M A M J J A S O N D Shed Sales 30 – 28 – 26 – 24 – 22 – 20 – 18 – 16 – 14 – 12 – 10 – Actual Sales Moving Average Forecast
34.
35. Weighted Moving Average [(3 x 16) + (2 x 13) + (12)]/6 = 14 1 / 3 [(3 x 19) + (2 x 16) + (13)]/6 = 17 [(3 x 23) + (2 x 19) + (16)]/6 = 20 1 / 2 January 10 February 12 March 13 April 16 May 19 June 23 July 26 Actual 3-Month Weighted Month Shed Sales Moving Average 10 12 13 [(3 x 13 ) + (2 x 12 ) + ( 10 )]/6 = 12 1 / 6 Weights Applied Period 3 Last month 2 Two months ago 1 Three months ago 6 Sum of weights
36.
37. Moving Average And Weighted Moving Average Figure 4.2 30 – 25 – 20 – 15 – 10 – 5 – Sales demand | | | | | | | | | | | | J F M A M J J A S O N D Actual sales Moving average Weighted moving average
38.
39. Exponential Smoothing 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 ) where F t = new forecast F t – 1 = previous forecast = smoothing (or weighting) constant (0 ≤ ≤ 1)
45. Choosing The objective is to obtain the most accurate forecast no matter the technique We generally do this by selecting the model that gives us the lowest forecast error Forecast error = Actual demand - Forecast value = A t - F t
46. Common Measures of Error Mean Absolute Deviation (MAD) MAD = ∑ |Actual - Forecast| n Mean Squared Error (MSE) MSE = ∑ (Forecast Errors) 2 n
47. Common Measures of Error Mean Absolute Percent Error (MAPE) MAPE = ∑ 100|Actual i - Forecast i |/Actual i n n i = 1
53. Exponential Smoothing with Trend Adjustment When a trend is present, exponential smoothing must be modified Forecast including (FIT t ) = trend Exponentially Exponentially smoothed (F t ) + (T t ) smoothed forecast trend
54. Exponential Smoothing with Trend Adjustment 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
55. Exponential Smoothing with Trend Adjustment Example Table 4.1 Forecast Actual Smoothed Smoothed Including Month(t) Demand (A t ) Forecast, F t Trend, T t Trend, FIT t 1 12 11 2 13.00 2 17 3 20 4 19 5 24 6 21 7 31 8 28 9 36 10
56. Exponential Smoothing with Trend Adjustment Example 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 Forecast Actual Smoothed Smoothed Including Month(t) Demand (A t ) Forecast, F t Trend, T t Trend, FIT t 1 12 11 2 13.00 2 17 3 20 4 19 5 24 6 21 7 31 8 28 9 36 10
57. Exponential Smoothing with Trend Adjustment Example 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 Forecast Actual Smoothed Smoothed Including Month(t) Demand (A t ) Forecast, F t Trend, T t Trend, FIT t 1 12 11 2 13.00 2 17 12.80 3 20 4 19 5 24 6 21 7 31 8 28 9 36 10
58. Exponential Smoothing with Trend Adjustment Example 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 Forecast Actual Smoothed Smoothed Including Month(t) Demand (A t ) Forecast, F t Trend, T t Trend, FIT t 1 12 11 2 13.00 2 17 12.80 1.92 3 20 4 19 5 24 6 21 7 31 8 28 9 36 10
59. Exponential Smoothing with Trend Adjustment Example Table 4.1 15.18 2.10 17.28 17.82 2.32 20.14 19.91 2.23 22.14 22.51 2.38 24.89 24.11 2.07 26.18 27.14 2.45 29.59 29.28 2.32 31.60 32.48 2.68 35.16 Forecast Actual Smoothed Smoothed Including Month(t) Demand (A t ) Forecast, F t Trend, T t Trend, FIT t 1 12 11 2 13.00 2 17 12.80 1.92 14.72 3 20 4 19 5 24 6 21 7 31 8 28 9 36 10
60. Exponential Smoothing with Trend Adjustment Example Figure 4.3 | | | | | | | | | 1 2 3 4 5 6 7 8 9 Time (month) Product demand 35 – 30 – 25 – 20 – 15 – 10 – 5 – 0 – Actual demand (A t ) Forecast including trend (FIT t ) with = .2 and = .4
61. 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 ^
62. Least Squares Method Figure 4.4 Time period Values of Dependent Variable Deviation 1 (error) Deviation 5 Deviation 7 Deviation 2 Deviation 6 Deviation 4 Deviation 3 Actual observation (y value) Trend line, y = a + bx ^
63. Least Squares Method Figure 4.4 Least squares method minimizes the sum of the squared errors (deviations) Time period Values of Dependent Variable Deviation 1 Deviation 5 Deviation 7 Deviation 2 Deviation 6 Deviation 4 Deviation 3 Actual observation (y value) Trend line, y = a + bx ^
64. Least Squares Method Equations to calculate the regression variables b = xy - nxy x 2 - nx 2 y = a + bx ^ a = y - bx
65. 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 Time Electrical Power Year Period (x) Demand x 2 xy 2001 1 74 1 74 2002 2 79 4 158 2003 3 80 9 240 2004 4 90 16 360 2005 5 105 25 525 2005 6 142 36 852 2007 7 122 49 854 ∑ x = 28 ∑ y = 692 ∑ x 2 = 140 ∑ xy = 3,063 x = 4 y = 98.86
66. 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 Time Electrical Power Year Period (x) Demand x 2 xy 1999 1 74 1 74 2000 2 79 4 158 2001 3 80 9 240 2002 4 90 16 360 2003 5 105 25 525 2004 6 142 36 852 2005 7 122 49 854 x = 28 y = 692 x 2 = 140 xy = 3,063 x = 4 y = 98.86 The trend line is y = 56.70 + 10.54x ^
69. Seasonal Variations In Data The multiplicative seasonal model can adjust trend data for seasonal variations in demand
70.
71. Seasonal Index Example Jan 80 85 105 90 94 Feb 70 85 85 80 94 Mar 80 93 82 85 94 Apr 90 95 115 100 94 May 113 125 131 123 94 Jun 110 115 120 115 94 Jul 100 102 113 105 94 Aug 88 102 110 100 94 Sept 85 90 95 90 94 Oct 77 78 85 80 94 Nov 75 72 83 80 94 Dec 82 78 80 80 94 Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
72. Seasonal Index Example 0.957 Jan 80 85 105 90 94 Feb 70 85 85 80 94 Mar 80 93 82 85 94 Apr 90 95 115 100 94 May 113 125 131 123 94 Jun 110 115 120 115 94 Jul 100 102 113 105 94 Aug 88 102 110 100 94 Sept 85 90 95 90 94 Oct 77 78 85 80 94 Nov 75 72 83 80 94 Dec 82 78 80 80 94 Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index Seasonal index = average 2005-2007 monthly demand average monthly demand = 90/94 = .957
73. Seasonal Index Example Jan 80 85 105 90 94 0.957 Feb 70 85 85 80 94 0.851 Mar 80 93 82 85 94 0.904 Apr 90 95 115 100 94 1.064 May 113 125 131 123 94 1.309 Jun 110 115 120 115 94 1.223 Jul 100 102 113 105 94 1.117 Aug 88 102 110 100 94 1.064 Sept 85 90 95 90 94 0.957 Oct 77 78 85 80 94 0.851 Nov 75 72 83 80 94 0.851 Dec 82 78 80 80 94 0.851 Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index
74. Seasonal Index Example Expected annual demand = 1,200 Jan 80 85 105 90 94 0.957 Feb 70 85 85 80 94 0.851 Mar 80 93 82 85 94 0.904 Apr 90 95 115 100 94 1.064 May 113 125 131 123 94 1.309 Jun 110 115 120 115 94 1.223 Jul 100 102 113 105 94 1.117 Aug 88 102 110 100 94 1.064 Sept 85 90 95 90 94 0.957 Oct 77 78 85 80 94 0.851 Nov 75 72 83 80 94 0.851 Dec 82 78 80 80 94 0.851 Demand Average Average Seasonal Month 2005 2006 2007 2005-2007 Monthly Index Jan x .957 = 96 1,200 12 Feb x .851 = 85 1,200 12 Forecast for 2008
75. Seasonal Index Example 140 – 130 – 120 – 110 – 100 – 90 – 80 – 70 – | | | | | | | | | | | | J F M A M J J A S O N D Time Demand 2008 Forecast 2007 Demand 2006 Demand 2005 Demand
76. San Diego Hospital Figure 4.6 Trend Data 10,200 – 10,000 – 9,800 – 9,600 – 9,400 – 9,200 – 9,000 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Inpatient Days 9530 9551 9573 9594 9616 9637 9659 9680 9702 9724 9745 9766
77. San Diego Hospital Figure 4.7 Seasonal Indices 1.06 – 1.04 – 1.02 – 1.00 – 0.98 – 0.96 – 0.94 – 0.92 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Index for Inpatient Days 1.04 1.02 1.01 0.99 1.03 1.04 1.00 0.98 0.97 0.99 0.97 0.96
78. San Diego Hospital Figure 4.8 Combined Trend and Seasonal Forecast 10,200 – 10,000 – 9,800 – 9,600 – 9,400 – 9,200 – 9,000 – | | | | | | | | | | | | Jan Feb Mar Apr May June July Aug Sept Oct Nov Dec 67 68 69 70 71 72 73 74 75 76 77 78 Month Inpatient Days 9911 9265 9764 9520 9691 9411 9949 9724 9542 9355 10068 9572
79. Associative Forecasting Used when changes in one or more independent variables can be used to predict the changes in the dependent variable Most common technique is linear regression analysis We apply this technique just as we did in the time series example
80. Associative Forecasting Forecasting an outcome based on predictor variables 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 though to predict the value of the dependent variable ^
82. Associative Forecasting Example Sales, y Payroll, x x 2 xy 2.0 1 1 2.0 3.0 3 9 9.0 2.5 4 16 10.0 2.0 2 4 4.0 2.0 1 1 2.0 3.5 7 49 24.5 ∑ y = 15.0 ∑ x = 18 ∑ x 2 = 80 ∑ xy = 51.5 x = ∑ x/6 = 18/6 = 3 y = ∑ y/6 = 15/6 = 2.5 b = = = .25 ∑ xy - nxy ∑ x 2 - nx 2 51.5 - (6)(3)(2.5) 80 - (6)(3 2 ) a = y - bx = 2.5 - (.25)(3) = 1.75
83. Associative Forecasting Example Sales = 1.75 + .25(payroll) If payroll next year is estimated to be $6 billion, then: Sales = 1.75 + .25(6) Sales = $3,250,000 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Sales Area payroll y = 1.75 + .25x ^ 3.25
84.
85. Standard Error of the Estimate where y = y-value of each data point y c = computed value of the dependent variable, from the regression equation n = number of data points S y,x = ∑ (y - y c ) 2 n - 2
86. Standard Error of the Estimate Computationally, this equation is considerably easier to use We use the standard error to set up prediction intervals around the point estimate S y,x = ∑ y 2 - a ∑ y - b ∑ xy n - 2
87. Standard Error of the Estimate S y,x = .306 The standard error of the estimate is $306,000 in sales 4.0 – 3.0 – 2.0 – 1.0 – | | | | | | | 0 1 2 3 4 5 6 7 Sales Area payroll 3.25 S y,x = = ∑ y 2 - a ∑ y - b ∑ xy n - 2 39.5 - 1.75(15) - .25(51.5) 6 - 2
90. Correlation Coefficient r = n xy - x y [n x 2 - ( x) 2 ][n y 2 - ( y) 2 ] y x (a) Perfect positive correlation: r = +1 y x (b) Positive correlation: 0 < r < 1 y x (c) No correlation: r = 0 y x (d) Perfect negative correlation: r = -1
91.
92. Multiple Regression Analysis If more than one independent variable is to be used in the model, linear regression can be extended to multiple regression to accommodate several independent variables Computationally, this is quite complex and generally done on the computer y = a + b 1 x 1 + b 2 x 2 … ^
93. Multiple Regression Analysis In the Nodel example, including interest rates in the model gives the new equation: An improved correlation coefficient of r = .96 means this model does a better job of predicting the change in construction sales Sales = 1.80 + .30(6) - 5.0(.12) = 3.00 Sales = $3,000,000 y = 1.80 + .30x 1 - 5.0x 2 ^
94.
95. Monitoring and Controlling Forecasts Tracking signal RSFE MAD = Tracking signal = ∑ (Actual demand in period i - Forecast demand in period i) ∑ |Actual - Forecast|/n)
96. Tracking Signal Tracking signal + 0 MADs – Upper control limit Lower control limit Time Signal exceeding limit Acceptable range
98. Tracking Signal Example The variation of the tracking signal between -2.0 and +2.5 is within acceptable limits Cumulative Absolute Absolute Actual Forecast Forecast Forecast Qtr Demand Demand Error RSFE Error Error MAD 1 90 100 -10 -10 10 10 10.0 2 95 100 -5 -15 5 15 7.5 3 115 100 +15 0 15 30 10.0 4 100 110 -10 -10 10 40 10.0 5 125 110 +15 +5 15 55 11.0 6 140 110 +30 +35 30 85 14.2 Tracking Signal (RSFE/MAD) -10/10 = -1 -15/7.5 = -2 0/10 = 0 -10/10 = -1 +5/11 = +0.5 +35/14.2 = +2.5
99. Adaptive Forecasting It’s possible to use the computer to continually monitor forecast error and adjust the values of the and coefficients used in exponential smoothing to continually minimize forecast error This technique is called adaptive smoothing
100.
101.
102. Fast Food Restaurant Forecast Figure 4.12 20% – 15% – 10% – 5% – 11-12 1-2 3-4 5-6 7-8 9-10 12-1 2-3 4-5 6-7 8-9 10-11 (Lunchtime) (Dinnertime) Hour of day Percentage of sales