9/3/2023 Learning Objectives Forecasting Why forecasting is necessary? • Planning and control for operations requires an estimate of the demand for the product or the service that the organization expects to provide in the future • Understand the importance of forecasting • What are the different types of forecasting methodologies • Different types of models which we can build for the forecasting • Discuss and calculate various methods for evaluating forecast accuracy Defining Forecasting • So, planning and control for operations requires an estimation of the demand. So, whether it is a manufacturing function or a service function you need to have some kind of estimation that, what is going to be the demand, and that estimation is called forecasting • This forecasting is equally responsible for product organizations, the manufacturing organization or the service organization • Eg- Car Mfg OR Hospital Setup 1 9/3/2023 The Effect of Inaccurate Forecasting Time span for forecasting • Current needs/short term (1 day-30 days) • Intermediate range (1 month- 12 months) • Long range plans (more than a year) Basic categories of Forecasting • Extrapolative methods • Causal methods • Qualitative Quantitative Basic categories of Forecasting • Extrapolative methods-Time Series Method/analysis Considers historical data or past data The limitation of the Time Series analysis, is that we are forecasting for the coming period but the information, the data which you are using for that purpose that is of the previous period 2 9/3/2023 Basic categories of Forecasting • Causal methods - cause effect method Considers demand based on various factors Eg- Demand of a product is directly related to the advertisement expenses Y = a + bX, where Y is demand and X is those independent factors Basic categories of Forecasting • Qualitative Historical data not available Not knowing the factors which are affecting the demand Eg- Y = a + b1 X1 + b2 X2 + b3 X3 Basic categories of Forecasting • Qualitative forecasting types Delphi Market survey Brainstorming Extrapolative Methods/Time series Methods For our good Time Series analysis, we need to identify that pattern in the historical data 1. Horizontal component 2. Trend 3. Seasonal 4. Cyclic 3 9/3/2023 Comparative analysis of components of historical data Horizontal Trend Seasonal Cyclic can very easily forecast requires some amount of efforts require more efforts require extraordinary efforts some minor fluctuations are there but more or less it is around a straight line will not be a smooth curve. There will be zigzag movements but overall effect is either increasing or decreasing. after a particular when demand is interval demand will going to increase, increase to a high that we do not know level and for rest of the period demand remains to a low level Comparative analysis of components of historical data Product life cycle Forms of Forecast Movement Comparative analysis of components of historical data Failure rate of a product 4 9/3/2023 Time Series Forecasting • We can pick models based on Simple Moving Average method 1. Time horizon to forecast 2. Data availability 3. Accuracy required 4. Size of forecasting budget 5. Availability of qualified personnel Simple Moving Average method Time Series Forecasting 5 9/3/2023 Weighted moving average method Weighted moving average method • Weighted moving average method is a method which is differentiating between different periods. It gives different weight to the different periods’ demand • While the simple moving average formula gives equal weight, the weighted moving average method permits an unequal weighting on prior time periods Weighted moving average method Weighted Moving Average • Adjusts moving average method to more closely reflect data fluctuations WMAn = n W i Di i=1 where W i = the weight for period i, between 0 and 100 percent Wi = 1.00 6 9/3/2023 Weighted Moving Average Example MONTH August September October WEIGHT DATA 17% 33% 50% 130 110 90 Weighted Moving Average Example MONTH August September October WEIGHT DATA 17% 33% 50% 130 110 90 3 November Forecast WMA3 = i=1 W i Di November Forecast WMA3 = 3 W i Di i=1 = (0.50)(90) + (0.33)(110) + (0.17)(130) = 103.4 orders Simple exponential smoothing • In exponential smoothing method, we assign weights, but these weights are decreasing in the exponential order from the present period to the past periods 7 9/3/2023 Exponential Smoothing • • • • • Averaging method Weights most recent data more strongly Reacts more to recent changes Widely used, accurate method Smoothing constant, α • applied to most recent data Exponential Smoothing Simple exponential smoothing St = St-1 + α (D (Dt- St-1) OR St = α Dt + (1(1-α) St-1 Here, we are updating the base value, updating the base value means, we are trying to find out the current base value and this current base value is nothing but the forecast for the next period. St = Ft+1 Ft +1 = Dt + (1 - )Ft where: Ft +1 = forecast for next period Dt = actual demand for present period Ft = previously determined forecast for present period = weighting factor, smoothing constant Therefore Ft+1 = α Dt + (1(1-α) Ft 8 9/3/2023 Simple exponential smoothing Effect of Smoothing Constant 0.0 1.0 If = 0.20, then Ft +1 = 0.20Dt + 0.80 Ft If = 0, then Ft +1 = 0Dt + 1 Ft = Ft Forecast does not reflect recent data If = 1, then Ft +1 = 1Dt + 0 Ft =Dt Forecast based only on most recent data Simple exponential smoothing • Use Simple moving average method with an average period (AP) of 3 days to develop a forecast of the call volume in the Day 13 F13= (168+198+159)/3=175 calls 9 9/3/2023 Use Exponential smoothing • Use Weighted moving average method with an average period (AP) of 3 days and weights of 0.1, 0.3 and 0.6 for oldest to recent datum to develop a forecast of the call volume in the Day 13 • If a smoothing constant value of 0.25 is used and the exponential smoothing forecast for day 11 was 180.76 calls, what is the exponential smoothing forecast for Day 13? Ft+1 = α Dt + (1(1-α) Ft F13= α D12 + (1(1-α) F12 F12= α D11 + (1(1-α) F11 F13=0.1(168)+0.3(198)+0.6(159)=171.6 calls = (0.25x198) + (0.75x180.76) =185.07 Exponential Smoothing (α=0.30) F13= α D12 + (1-α) F12 = (0.25x159) + (0.75x185.07) =178.55 PERIOD 1 2 3 4 5 6 7 8 9 10 11 12 MONTH Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec DEMAND 37 40 41 37 45 50 43 47 56 52 55 54 F2 = D1 + (1 - )F1 F3 = D2 + (1 - )F2 10 9/3/2023 Exponential Smoothing Exponential Smoothing (α=0.30) PERIOD 1 2 3 4 5 6 7 8 9 10 11 12 MONTH Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec DEMAND 37 40 41 37 45 50 43 47 56 52 55 54 F2 = D1 + (1 - )F1 = (0.30)(37) + (0.70)(37) = 37 F3 = D2 + (1 - )F2 = (0.30)(40) + (0.70)(37) = 37.9 Exponential Smoothing PERIOD MONTH DEMAND 1 2 3 4 5 6 7 8 9 10 11 12 13 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan 37 40 41 37 45 50 43 47 56 52 55 54 – PERIOD MONTH DEMAND 1 2 3 4 5 6 7 8 9 10 11 12 13 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan 37 40 41 37 45 50 43 47 56 52 55 54 – FORECAST, Ft + 1 ( = 0.3) ( = 0.5) – – Exponential Smoothing FORECAST, Ft + 1 ( = 0.3) ( = 0.5) – 37.00 37.90 38.83 38.28 40.29 43.20 43.14 44.30 47.81 49.06 50.84 51.79 – 37.00 38.50 39.75 38.37 41.68 45.84 44.42 45.71 50.85 51.42 53.21 53.61 11 9/3/2023 Exponential Smoothing with Trend and Seasonality Exponential Smoothing with Trend and Seasonality • Simple Exponential Smoothing model was having only one component that was the base component and the fluctuations are around this base value and we wanted to smoothen those fluctuation • Simple Exponential Smoothing doesn’t have any trend and seasonality • Winters and Pegels, over the period of 10 years, from 1960s to 1970, developed exponential smoothing models by incorporating the fact of trend as well as seasonality in the historical data Exponential Smoothing with Trend and Seasonality Exponential Smoothing with Trend and Seasonality • Hence, we have 9 different types of models and we can develop our extrapolative or exponential smoothing models for all these 9 types of models • When we have trend also in our data, we will use one more smoothing constant that is beta, beta will be used for smoothing the fluctuations of your trend data • When we have seasonality also in our demand data, you will use one more smoothing constant that is gamma 12 9/3/2023 Smoothing Constants α= Smoothing constant for average β = Smoothing constant for trend γ = Smoothing constant for seasonality Double exponential smoothing • Incorporating a trend component into exponential smoothing forecast is also known as double exponential smoothing • Two smoothing constants, alpha and beta are used • One is for smoothing the fluctuations of your base value, and second the smoothing the fluctuation of your trend value Smoothing Constants • We have possibility of using either alpha alone, you can use alpha and beta, you can use alpha and gamma and you can use alpha, beta, gamma altogether • Use of any smoothing constant depends upon the type of demand data • There is no restriction on the combination of alpha, beta and gamma’s value, the only limitation is the boundary condition of the values will vary between 0 to 1 Adjusted Exponential Smoothing/Trend corrected exponential smoothing/Holt’s model • ADJUSTED FORECAST AFt +1 = Ft +1+Tt +1 Where Ft +1 = forecast of average for next period Ft+1 = α Dt + (1-α) Ft Tt +1 = forecast of trend for next period Tt+1= (Ft+1 - Ft) + (1 - ) Tt 13 9/3/2023 Trend corrected exponential smoothing(α=0.5 and β=0.30) PERIOD MONTH DEMAND 1 2 3 4 5 6 7 8 9 10 11 12 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 37 40 41 37 45 50 43 47 56 52 55 54 T3 = (F3 - F2) + (1 - ) T2 AF3 = F3 + T3 T13 = (F13 - F12) + (1 - ) T12 AF13 = F13 + T13 = Trend corrected exponential smoothing/Holt’s smoothing model (α=0.5 and β=0.30) PERIOD MONTH DEMAND 1 2 3 4 5 6 7 8 9 10 11 12 13 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan 37 40 41 37 45 50 43 47 56 52 55 54 – FORECAST Ft +1 TREND Tt +1 ADJUSTED FORECAST AFt +1 Trend corrected exponential smoothing (α=0.5 and β=0.30) PERIOD MONTH DEMAND 1 2 3 4 5 6 7 8 9 10 11 12 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 37 40 41 37 45 50 43 47 56 52 55 54 T3 = (F3 - F2) + (1 - ) T2 = (0.30)(38.5 - 37.0) + (0.70)(0) = 0.45 AF3 = F3 + T3 = 38.5 + 0.45 = 38.95 T13 = (F13 - F12) + (1 - ) T12 = (0.30)(53.61 - 53.21) + (0.70)(1.77) = 1.36 AF13 = F13 + T13 = 53.61 + 1.36 = 54.97 Trend corrected exponential smoothing PERIOD MONTH DEMAND FORECAST Ft +1 TREND Tt +1 ADJUSTED FORECAST AFt +1 1 2 3 4 5 6 7 8 9 10 11 12 13 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan 37 40 41 37 45 50 43 47 56 52 55 54 – 37.00 37.00 38.50 39.75 38.37 38.37 45.84 44.42 45.71 50.85 51.42 53.21 53.61 – 0.00 0.45 0.69 0.07 0.07 1.97 0.95 1.05 2.28 1.76 1.77 1.36 – 37.00 38.95 40.44 38.44 38.44 47.82 45.37 46.76 58.13 53.19 54.98 54.96 14 9/3/2023 Trend corrected exponential smoothing Holt’s model • Example 2. (Assignment-2) An electronics manufacturer has seen demand for its latest Smartphone increase over the past 6 months. Observed demand in thousands has been D1=8415, D2=8732, D3=9014, D4=9808, D5=10413 and D6=11961. Forecast demand for period 7 using trend corrected exponential smoothing with α=0.1 and β =0.2. Time Series Decomposition Seasonal variation (additive or multiplicative) • Chronologically ordered data are referred to as a time series • A time series may contain one or many elements • Trend, seasonal, cyclical, autocorrelation, and random • Identifying these elements and separating the time series data into these components is known as decomposition • Seasonal variation may be either additive or multiplicative 15 9/3/2023 Seasonal factor/index • The seasonal factor is defined as the ratio of amount sold during each season to the average of all seasons • It is the amount of correction needed in a time series to adjust for the season of the year Example: (seasonal factor/index) • In past years, a firm sold an average of 1,000 units each year • • • • 200 in spring 350 in summer 300 in fall 150 in winter • Find the seasonal factors • Using those factors, if we expected demand for next year to be 1,100 units, compute demand per period Example : Finding Seasonal Factors Example 18.3: Forecast for Next Year 16 9/3/2023 Linear Regression Analysis • Regression can be defined as the functional relationship between two or more correlated variables • Linear regression refers to the special class of regression where the relationship between variables forms a straight line • The major restriction in using linear regression forecasting is that the past data and future projections are assumed to fall in about a straight line Least Squares Example x(PERIOD) 1 2 3 4 5 6 7 8 9 10 11 12 y(DEMAND) 37 40 41 37 45 50 43 47 56 52 55 54 xy x2 Linear Regression Analysis y = a + bx xy - nxy x2 - nx2 a = y-bx b = where a = intercept b = slope of the line x = time period y = forecast for demand for period x where n = number of periods x x = = mean of the x values n y y = n = mean of the y values Least Squares Example xy x2 1 2 3 4 5 6 7 8 9 10 11 12 37 40 41 37 45 50 43 47 56 52 55 54 37 80 123 148 225 300 301 376 504 520 605 648 1 4 9 16 25 36 49 64 81 100 121 144 78 557 3867 650 x(PERIOD) y(DEMAND) 17 9/3/2023 Least Squares Example x = y = b = xy - nxy = x2 - nx2 a = y - bx Linear trend line y = 35.2 + 1.72x Forecast for period 13 y = 35.2 + 1.72(13) = 57.56 units Least Squares Example x = 78 = 6.5 12 y = 557 = 46.42 12 b = xy - nxy = x2 - nx2 3867 - (12)(6.5)(46.42) =1.72 650 - 12(6.5)2 a = y - bx = 46.42 - (1.72)(6.5) = 35.2 Trend and seasonality corrected exponential smoothing (Winter’s model) Example: • A hospital wants to improve its forecasting by applying both trend and seasonal indices to 66 months of data it has collected. It will then forecast “patient days” over the coming year 18 9/3/2023 Trend and seasonality corrected exponential smoothing (Winter’s model) Trend and seasonality corrected exponential smoothing (Winter’s model) Determine the forecast till December i.e till 78th period Using 66 months of inpatient days the following equation was computed y= 8090+21.5x Where y= patient days x=time in months Based on this model the patients day forecast for 67th month should be ? y67= 8090+(21.5X67)= 9530 days Trend and seasonality corrected exponential smoothing (Winter’s model) Trend and seasonality corrected exponential smoothing (Winter’s model) The following table provides seasonal indices based on the same 6 6months data. 19 9/3/2023 Trend and seasonality corrected exponential smoothing (Winter’s model) Neither trend data nor the seasonal data alone provide a reasonable forecast for the hospital. Only when the hospital multiplied the trend adjusted data with respective seasonal index, it obtain good forecasts Thus for 67th month the patient days= (Trend adjusted forecast)(Monthly seasonal index) =(9530X1.04) =9911 Advantage of combined Trend and Seasonal Adjustments With trend only, the September forecast is 9702 but with both trend and seasonal adjustments the forecast is 9411 By combining trend and seasonal data the hospital is better able to forecast inpatient days and the related staffing and budgeting vital to effective operations Trend and seasonality corrected exponential smoothing (Winter’s model) Determine the combined trend and seasonal forecast Trend and seasonality corrected exponential smoothing (Winter’s model) Question: If the slope of the trend line for patient days is 22 and the index for December is 0.99, what is the new forecast for December inpatient days? Answer: 9708 days 20 9/3/2023 Accuracy of Forecasts Mean Absolute Deviation (MAD) • Forecast Error (FE) Difference between forecast and actual demand FE= Ft –Dt The popular methods of error measurement • MAD = Dt - Ft n where t = period number Dt = demand in period t Ft = forecast for period t n = total number of periods = absolute value Mean Absolute Deviation (MAD) • Mean Absolute Percent Deviation (MAPD) • Cumulative Error (E) • Average error or bias MAD Example PERIOD 1 2 3 4 5 6 7 8 9 10 11 12 DEMAND, Dt 37 40 41 37 45 50 43 47 56 52 55 54 Ft ( =0.3) 37.00 37.00 37.90 38.83 38.28 40.29 43.20 43.14 44.30 47.81 49.06 50.84 MAD Calculation (Dt - Ft) – |Dt - Ft| – MAD = Dt - Ft n 21 9/3/2023 MAD Example PERIOD 1 2 3 4 5 6 7 8 9 10 11 12 DEMAND, Dt 37 40 41 37 45 50 43 47 56 52 55 54 Ft ( =0.3) 37.00 37.00 37.90 38.83 38.28 40.29 43.20 43.14 44.30 47.81 49.06 50.84 557 MAD Calculation (Dt - Ft) |Dt - Ft| – 3.00 3.10 -1.83 6.72 9.69 -0.20 3.86 11.70 4.19 5.94 3.15 – 3.00 3.10 1.83 6.72 9.69 0.20 3.86 11.70 4.19 5.94 3.15 49.31 53.39 Other Accuracy Measures Mean absolute percent deviation (MAPD) |Dt - Ft| MAPD = Dt Cumulative error E = et Dt - Ft n 53.39 = 11 MAD = = 4.85 Comparison of Forecasts FORECAST MAD MAPD E (E) Exponential smoothing (= 0.30) Exponential smoothing (= 0.50) Adjusted exponential smoothing (= 0.50, = 0.30) Linear trend line 4.85 4.04 3.81 9.6% 8.5% 7.5% 49.31 33.21 21.14 4.48 3.02 1.92 2.29 4.9% – – Average error (E) = et n 22 9/3/2023 Tracking Signal Values Forecast Control Tracking signal • It helps to detect any drift in the forecasting system Tracking signal = (Dt - Ft) E MAD = MAD DEMAND Dt FORECAST, Ft 1 2 3 4 5 6 7 8 9 10 11 12 37 40 41 37 45 50 43 47 56 52 55 54 37.00 37.00 37.90 38.83 38.28 40.29 43.20 43.14 44.30 47.81 49.06 50.84 TS3 = ERROR D t - Ft – 3.00 3.10 -1.83 6.72 9.69 -0.20 3.86 11.70 4.19 5.94 3.15 E = (Dt - Ft) MAD – 3.00 6.10 4.27 10.99 20.68 20.48 24.34 36.04 40.23 46.17 49.32 – 3.00 3.05 2.64 3.66 4.87 4.09 4.06 5.01 4.92 5.02 4.85 DEMAND Dt FORECAST, Ft 1 2 3 4 5 6 7 8 9 10 11 12 37 40 41 37 45 50 43 47 56 52 55 54 37.00 37.00 37.90 38.83 38.28 40.29 43.20 43.14 44.30 47.81 49.06 50.84 ERROR D t - Ft – 3.00 3.10 -1.83 6.72 9.69 -0.20 3.86 11.70 4.19 5.94 3.15 E = (Dt - Ft) MAD – 3.00 6.10 4.27 10.99 20.68 20.48 24.34 36.04 40.23 46.17 49.32 – 3.00 3.05 2.64 3.66 4.87 4.09 4.06 5.01 4.92 5.02 4.85 Tracking Signal Plot Tracking Signal Values PERIOD PERIOD TRACKING SIGNAL – 1.00 2.00 1.62 3.00 4.25 5.01 6.00 7.19 8.18 9.20 10.17 6.10 = 2.00 3.05 23