Demand Forecasting Dr. M. Shamim Uddin Khan Introduction: A forecast is a prediction of future events used for planning purposes. Forecasts are vital to every business organization and for every significant management decision. Forecasting is the basis of corporate long-run planning. In the functional areas finance and accounting, forecasts provide the basis for budgetary planning and cost control. In human resources, forecasts provide hiring activities including recruitment, interviewing, training, layoff planning including outplacement, and counseling. MIS forecasting provides new (or revised) information systems and internet services. Marketing relies on sales forecasting to plan new products, compensate sales personnel, and make other key decisions. Production and operations personnel use forecasts to make periodic decisions involving process selection, capacity planning and facility layout as well as for continual decisions about production planning, scheduling and inventory. At any organization, management needed accurate forecasts to ensure value chain success. Changing business conditions resulting from global competition, rapid technological change, and increasing environmental concerns exerts pressure on a firm’s capability to generate accurate forecasts. There are two basic sources of demand: dependent demand and independent demand. Dependent demand is the demand for a product or service caused by the demand for other products or services. Elements of a Good Forecast: A properly prepared forecast should fulfill certain requirements: 1. The forecast should be timely. 2. The forecast should be accurate and the degree of accuracy should be stated. 3. The forecast should be reliable. 4. The forecast should be expressed in meaningful units. 5. The forecast should be in writing. 6. The forecasting technique should be simple to understand and use. Steps in the Forecasting Process: There are six basic steps in the forecasting process: 1. Determine the purpose of the forecast 2. Establish a time horizon 3. Select a forecasting technique 4. Gather and analyze relevant data 5. Prepare the forecast 6. Monitor the forecast. Types of Forecasting: Forecasting can be classified into four basic types: qualitative, time series analysis, causal relationships and simulation. A. Qualitative: (i) Grass Roots: (ii) Market Research: (iii) Panel Consensus: (iv) Historical Analogy: (v) Delphi Method: This is a group process intended to achieve a consensus forecast. The Delphi method was developed by the Rand Corporation in the 1950’s. The step by step procedure is Step-1: Choose the experts to participate. There should be a variety of knowledgeable people in different areas. Step-2: Through a questionnaire (or e-mail) obtain forecast (and any premises or qualifications for the forecasts) from all participants. Step-3: Summarize the results and redistribution them to the participants along with appropriate new questions. Step-4: Summarize again, refining forecasts and conditions and again develop new questions. Step-5: Repeat Step 4 if necessary. Distribute the final results to all participants. The Delphi technique can usually achieve satisfactory results in three rounds. The time required is a function of the number of participants, how much work is involved for them to develop their forecasts and their speed in responding. B. Quantitative (a) Time series analysis: (i) Simple Moving Average (ii) Weighted Moving Average (iii) Exponential Smoothing (iv) Regression Analysis (v) Box Jenkins Technique (vi) Shiskin Time Series (vii) Trend Projections (b) Causal Relationships: (i) Regression Analysis (ii) Econometric Models (iii) Input/Output Models (iv) Leading Indicators Example-1: (a) Compute a three-week moving average forecast for the arrival of medical clinic patients in week 4. The numbers of arrivals for the past 3 weeks were as follows: Week Patient Arrivals 1 400 2 380 3 411 (b) If the actual number of patient arrivals in week 4 is 415, what is the forecast error for week 4? (c) What is the forecast for week 5? 411 + 380 + 400 = 397 Solution: (a) The moving average forecast at the end of week 3 is F4 = 3 (b) The forecast error for week 4 is E4 = D4 − F4 = 415 − 397 = 18 (c) The forecast for week 5 requires the actual arrivals from weeks 2 through 4, the three 415 + 411 + 380 = 402 most recent weeks of data F5 = 3 Example-2: Forecasts based on averages. Given the following data: Period Number of complaints 1 60 2 65 3 55 4 58 5 64 Prepare a forecast using each of these approaches: (a) The appropriate naive approach. (b) A three-period moving average. (c) A weighted average using weights of 0.50 (most recent), 0.30 and 0.20. (d) Exponential smoothing with a smoothing constant of 0.40 Solution: (a) The values are stable. Therefore, the most recent value of the series becomes the next forecast: 64. 55 + 58 + 64 = 59 (b) MA3 = 3 (c) F = 0.50(64) + 0.30(58) + 0.20(55) = 60.4 (d) Period 1 Number of complaints 60 2 3 4 5 6 65 55 58 64 Forecast 60 62 59.2 58.72 60.83 Calculations [The previous value of series is used as the starting forecast] 60 + 0.40(65 – 60) = 62 62 + 0.40(55 – 62) = 59.2 59.2 + 0.40(58 – 59.2) = 58.72 58.72 + 0.40(64 – 58.72) = 60.83 Example-3: The Polish General’s Pizza Parlor is a small restaurant catering to patrons with a taste for European pizza. One of its specialties is Polish Prize pizza. The manager must forecast weekly demand for these special pizzas so that he can order pizza shells weekly. Recently demand has been as follows: Week Pizzas Week Pizzas June 2 50 June 23 56 June 9 65 June 30 55 June 16 52 July 7 60 (a) Forecast the demand for pizza for June 23 to July 14by using the simple moving average method with n = 3. Then repeat the forecast by using the weighted moving average method with n = 3 and weights of o.50, 0.30 and 0.20, with 0.50 applying to the most recent demand. (b) Calculate the MAD for each method. Solution: (a) The simple moving average method and weighted moving average method give the following results. Current Simple Moving Average Weighted Moving Average Week Forecast for next week Forecast for next week June [(0.5 52) + (0.3 65) + (0.2 50)] = 55.5 or 56 52 + 65 + 50 = 55.7 or 56 16 3 June or [(0.5 56) + (0.3 52) + (0.2 65)] = 56.6 56 + 52 + 65 = 57.7 or 58 23 57 3 June or [(0.5 55) + (0.3 56) + (0.2 52)] = 54.7 55 + 56 + 52 = 54.3 or 54 30 55 3 July 7 or [(0.5 60) + (0.3 55) + (0.2 56)] = 57.7 60 + 55 + 56 = 57.0 or 57 58 3 (b) The mean absolute deviation is calculated as follows: Simple Moving Average Weighted Moving Average Week Actual Forecast Forecast Absolute Errors Et Absolute Errors Et Demand June 23 56 56 56 56 − 56 = 0 56 − 56 = 0 June 30 55 58 55 − 58 = 3 57 55 − 57 = 2 July 7 60 54 60 − 54 = 6 55 60 − 55 = 5 MAD = 0+ 3+ 6 =3 3 MAD = 0+2+5 = 2 .3 3 Example-4: The monthly demand for units manufactured by the Acme Rocket Company has been as follows: Month Units Month Units May 100 September 105 June 80 October 110 July 110 November 125 August 115 December 120 (a) Use the exponential smoothing method to forecast the number of units for June to January. The initial forecast for May was 105 units, = 0.2 (b) Calculate the absolute percentage error for each month from June through December and the MAD and MAPE of forecast error as of the end of December. (c) Calculate the tracking signal as of the end of December. What can you say about the performance of your forecasting method? Solution: (a) Current Month, t Ft +1 = Dt + (1 − ) Ft Forecast for Month, t + 1 May June July August September October November December (b) Current Month, t June July August September October November December Total 0.2(100) + 0.8(105) = 104.0 or 104 0.2(80) + 0.8(104) = 99.2 or 99 0.2(110) + 0.8(99.2) = 101.4 or 101 0.2(115) + 0.8(101.4) = 104.1 or 104 0.2(105) + 0.8(104.1) =1 04.3 or 104 0.2(110) + 0.8(104.3) = 105.4 or 105 0.2(125) + 0.8(105.4) = 109.3 or 109 0.2(120) + 0.8(109.3) = 111.4 or 111 Actual Forecast, Ft Demand 80 110 115 105 110 125 120 765 104 99 101 104 104 105 109 Error Et = Dt – Ft -24 11 14 1 6 20 11 39 June July August September October November December January Absolute Error Et 24 11 14 1 6 20 11 87 Absolute Percentage Error, Et ( )(100%) Dt 30.0 10.0 12.2 0.9 5.4 16.0 9.2 83.7% E ( t Dt )100 83.7% 87 MAD = = = 12.4 and MAPE = = = 11.96 n 7 n 7 (c) As of the end of December, the cumulative sum of forecast errors (CFE) is 39. Using the mean absolute deviation calculated in part (b), we calculate the tracking signal: CFE 39 = = 3.14 Tracking signal = MAD 12.4 The probability that a tracking signal value of 3.14 could be generated completely by chance is small. Consequently, we should revise our approach. The long string of forecasts lower than the actual demand suggests use of a trend method. Et Regression and Correlation Analysis Dr M. Shamim Uddin Khan Introduction: Regression and correlation analyses are the techniques of studying how the variations in one series are related to variations in another series. Measurement of the degree of relationship between two or more variables is called correlation analysis and using the relationship between a known variable and an unknown variable to estimate the unknown one is termed as regression analysis. Thus, correlation measures the degree of relationship between the variables while regression analysis shows how the variables are related. According to Blair, ‘Regression is the measure of the average relationship between two or more variables in terms of the original units of the data’. The technique of regression analysis is used to determine the statistical relationship between two (or more variables) and to make prediction of one variable on the basis of the other(s). Assumptions of Regression Analysis: While making use of the regression analysis for making predictions it is always assumed: 1. There is an actual relationship between the dependent and independent variables. 2. The values of the dependent variable are random but the values of the independent variable are fixed quantities without error and are chosen by the users. 3. There is clear indication of direction of the relationship. This means that dependent variable is a function of independent variable. (For example when we say that advertising has an effect on sales, then we are not saying that sales has an effect on advertising). 4. The analysis can be used to predict values within the range (and not for values outside the range) for which it is valid. Differences between Correlation and Regression: Correlation Correlation is the relationship between two or more variables, which vary in sympathy with the other in the same or opposite direction. It finds out the degree of relationship between two and not the cause and effect of the variables. It is used for testing and verifying the relation between two variables and gives limited information. It has limited application because it is confined only to linear relationship between the variables. It is not very useful for further mathematical treatment. Regression Regression means going back and it is a mathematical measure showing the average relationship between two or more variables. It indicates the cause and effect relationship between the variables and establishes a function relationship. Besides verification, it is used for the prediction of one value in relationship to the other given value. It has wide application as it studies linear and nonlinear relationship between the variables. It is widely used for further mathematical treatment. Example-1: For the following set of data: (a) Plot the scatter diagram. (b) Develop the estimating equation that best describes the data. (c) Predict Y for X = 10, 15, 20. X 13 16 14 11 17 9 13 17 Y 6.2 8.6 7.2 4.5 9.0 3.5 6.5 9.3 18 9.5 12 5.7 Solution: (b) X 13 16 14 11 17 9 13 17 18 12 x = 140 X = 140 = 14, 10 Y = x y Y 6.2 8.6 7.2 4.5 9.0 3.5 6.5 9.3 9.5 5.7 y = 70 XY 80.6 137.6 100.8 49.5 153.0 31.5 84.5 158.1 171.0 68.4 xy = 1035 X2 169 256 196 121 289 81 169 289 324 144 2 x = 2038 70 =7 10 (140)(70) n 10 b= = = 0.7051 2 2 ( x ) ( 140 ) 2038 − x2 − n 10 a = Y − bX = 7 − (0.7051)(14) = −2.8714 ) Thus, Y = −2.8714 + 0.7051X ) X = 10, Y = −2.8714 + 0.7051(10) = 4.1796 ) (c) X = 15, Y = −2.8714 + 0.7051(15) = 7.7051 ) X = 20, Y = −2.8714 + 0.7051(20) = 11.2306 Example-2: Cost accountants often estimate overhead based on the level of production. At the standard Knitting Co. they have collected information on overhead expenses and units produced at different plants, and want to estimate a regression equation to predict future overhead. Overheads 191 170 272 155 280 173 234 116 153 178 Units 40 42 53 35 56 39 48 30 37 40 (a) Develop the regression equation for the cost accountants. (b) Predict overhead when 50 units are produced. (c) Calculate the standard error of estimates. Solution: (a) Let Y = overhead and X = units produced. X Y XY X2 Y2 40 191 7640 1600 36481 42 170 7140 1764 28900 53 272 14416 2809 73984 35 155 5425 1225 24025 56 280 15680 3136 78400 39 173 6747 1521 29929 48 234 11232 2304 54756 30 116 3480 900 13456 37 153 5661 1369 23409 40 178 7120 1600 31684 2 2 x = 420 y = 1922 xy = 84541 x = 18228 y = 395024 xy − X = 420 = 42, 10 Y = 1035 − 1922 = 192.2 10 x y (420)(1922) n 10 b= = = 6.4915 2 2 ( x ) ( 420 ) 18228 − x2 − n 10 a = Y − bX = 192.2 − 6.4915(42) = −80.4430 ) Thus, Y = −80.4430 − 6.4915 X ) (b) X = 50, Y = −80.4430 + 6.4915(50) = 244.1320 xy − Y 84541 − − a Y − b XY 395024 − (−80.4430)(1922) − 6.4915(84541) = 10.2320 n−2 8 Example-3: Campus stores has been selling the Believe It or Not: Wonders of Statistics Study Guide for 12 semesters and would like to estimate the relationship between sales and number of sections of elementary statistics taught in each semester. The following data have been collected: Sales (units) 33 38 24 61 52 45 65 82 29 63 50 79 No. of Sections 3 7 6 6 10 12 12 13 12 13 14 15 (a) Develop the estimating equation that best fits the data. (b) Calculate the sample co-efficient of determination and the sample coefficient of correlation. Solution: Let Y = sales and X = number of sections. X Y XY X2 Y2 3 33 99 9 1089 7 38 266 49 1444 6 24 144 36 576 6 61 366 36 3721 10 52 520 100 2704 12 45 540 144 2025 12 65 780 144 4225 13 82 1066 169 6724 12 29 348 144 841 13 63 819 169 3969 14 70 700 196 2500 15 79 1185 225 6241 2 2 x = 123 y = 621 xy = 6833 x = 1421 y = 36059 (c) S e = 2 = 123 621 = 10.25, Y = = 51.75 12 12 x y 6833 − (123)(621) xy − n 12 b= = = 2.9189 2 2 ( x ) ( 123 ) 1421 − x2 − n 12 a = Y − bX = 51.75 − 2.9189(10.25) = 21.8313 ) Thus, Y = 21.8313 + 2.9189 X (c) Coefficient of correlation, ( x ) ( y ) (30)(63) 290 − xy − n 8 r= = = 0.59 2 2 2 2 ( x ) ( y ) ( 30 ) ( 63 ) }{ y 2 − } {172 − }{595 − { x 2 − 8 8 n n X = Coefficient of determination, r 2 = 0.3481 Example-4: The person in charge of production scheduling for a company must prepare forecasts of product demand in order to plan for appropriate production quantities. During a luncheon meeting the marketing manager gives her information about the advertising budget for a brass door hinge. The following are sales and advertising data for the past 5 months: Month Sales Advertising (thousands of units) (Thousands of $) 1 264 2.5 2 116 1.3 3 165 1.4 4 101 1.0 5 209 2.0 The marketing manager says that next month the company will spend $1750 on advertising for the product. Use linear regression to develop an equation and a forecast for this period. Solution: We use the computer to calculate the best values of a and b the correlation coefficient and the coefficient of determination. a = −8.135, b = 109.229 r = 0.980, r 2 = 0.960 The regression equation is Y = −8.135 + 109.229 X As the advertising expenditure will be $1750, the forecast for month 6 is Y = −8.135 + 109.229(1.75) = 183.016 or 183016 units Example-5: RC Cola is studying the effect of its latest advertising campaign. People chosen at random were called and asked how many cans of RC Cola they bought in the past week and how many RC Cola advertisement they had either read or seen in the past week. X (Number of Ads) 4 9 0 1 6 2 3 5 Y(Cans purchased) 12 14 6 3 5 4 7 10 Required: (a) Find the regression equation that best fits the data. (b) Forecast the number of cans purchased when the number of advertisement seen or read in the past week were 10. Solution: Requirement (a) Let Y = Cans purchased and X = Number of Ads X Y XY X2 Y2 4 12 48 16 144 9 14 126 81 196 0 6 0 0 36 1 3 3 1 9 6 5 30 36 25 2 4 8 4 16 3 7 21 9 49 5 10 50 25 100 2 x = 30 y = 61 x y = 286 x = 172 y 2 = 575 61 = 7.63 8 x y 286 − (30)(61) xy − n 8 b= = = 0.96 2 2 ( x ) ( 30 ) 172 − x2 − n 8 a = Y − bX = 7.63 − 0.96(3.75) = 4.03 ) Thus, Y = 4.03 + 0.96 X Requirement (b) ) When X= 10, then Y = 4.03 + 0.96(10) = 13.25 X = 30 = 3.75, 8 Y = Example-6: Zippy Cola is studying the effect of its latest advertising campaign. People chosen at random were called and asked how many cans of Zippy Cola they bought in the past week and how many Zippy Cola advertisement they had either read or seen in the past week. X (Number of Ads) 4 9 3 0 1 6 2 5 Y(Cans purchased) 12 14 7 6 3 5 6 10 Required: (a) Develop the estimating equation that best fits the data. (b) Calculate the sample co-efficient of determination and interpret it. (c) Forecast the number of cans purchased when the number of advertisement seen or read in the past week were 10. Solution: Requirement (a) Let Y = Cans purchased and X = Number of Ads X Y XY 4 12 48 9 14 126 3 7 21 0 6 0 1 3 3 6 5 30 2 6 12 5 10 50 x = 30 y = 63 x y = 290 30 = 3.75, 8 X2 16 81 9 0 1 36 4 25 x 2 = 172 Y2 144 196 49 36 9 25 36 100 y 2 = 595 63 = 7.88 8 x y 290 − (30)(63) xy − n 8 b= = = 0.90 2 ( x ) ( 30 )2 2 172 − x − n 8 a = Y − bX = 7.88 − 0.90(3.75) = 4.51 ) Thus, Y = 4.51 + 0.90 X Requirement (b) (c) Coefficient of correlation, ( x) ( y) (30)(63) 290 − xy − n 8 r= = = 0.70 2 2 2 2 ( x ) ( y ) ( 30 ) ( 63 ) {172 − }{595 − { x 2 − }{ y 2 − } 8 8 n n 2 Coefficient of determination, r = 0.49 The value of r2 is the proportion of the variation in the dependent variable Y explained by regression on the independent variable X. Further, the co-efficient of determination (i.e. the square of the correlation co-efficient) r2, which is used for judging the explanatory power of the linear regression of Y on X. r2 is a measure of the goodness of fit of the regression line. The co-efficient of correlation: r = 0.49 = 0.7 There is a high degree of positive correlation between number of ads and cans purchased. Requirement (c) ) When X= 10, then Y = 4.51 + 0.90(10) = 13.51 X = Y = Example-7: The following data relate to advertising expenditure (Tk. in lakh) and their corresponding sales (Tk. in crore): Year Advertising expenditure Sales 2007 10 14 2008 12 17 2009 15 23 2010 23 25 2011 20 21 Requirements: (a) Co-efficient of correlation (b) Regression equations (c) The sales corresponding to advertising expenditure of Tk.30 lakhs. (d) The advertising expenditure for a sales target of Tk.35 crores. Solution: Let advertising expenditure be denoted by x and sales by y. X Y Y −Y = y y2 X −X =x x2 10 -6 36 14 -6 36 12 -4 16 17 -3 9 15 -1 1 23 3 9 23 7 49 25 5 25 20 4 16 21 1 1 2 2 X = 80 x = 0 x = 118 Y = 100 y = 0 y = 80 (a) Co-efficient of correlation r = xy x y 2 2 = 84 118 80 xy 36 12 -3 35 4 xy = 84 = 0.86 (b) Regression equation of Y on X is Y = a1 + b1 X X = 80 = 16 X = N 5 Y = 100 = 20 Y = N 5 xy = 84 = 0.712 b1 = x 2 118 a1 = Y − b1 X = 20 − 0.712(16) = 8.608 Again the regression equation of X on Y is X = a2 + b2Y xy = 84 = 1.05 b2 = y 2 80 a2 = X − b2Y = 16 − 1.05(20) = −5 X = −5 + 1.05Y The co-efficient of correlation is the geometric mean of the two regression co-efficients. Symbolically r = byx bxy = b1 b2 = 0.712 1.05 = 0.8646 (c) Y (30) = 8.608 + 0.712(30) = 29.968 (d) X (35) = −5 + 1.05(35) = 31.75 Example-8: Calculate the two regression equations and the co-efficient of correlation from the given below: Marks in Statistics (Out of 50) 40 38 35 42 30 Marks in Mathematics (Out of 50) 30 35 40 36 29 Solution: Let the marks in Statistics be denoted by X and marks in Mathematics be denoted by Y. X Y xy Y −Y = y y2 X −X =x x2 40 38 35 42 30 X = 185 3 1 -2 5 -7 x = 0 9 1 4 25 49 x 2 = 88 30 35 40 36 29 Y = 70 The regression equation of Y on X is Y − Y = r y xy = 22 = 0.25 = b1 = x x 2 88 Y − 34 = 0.25( X − 37) Y = 24.75 + 0.25 X y (X − X ) x -4 1 6 2 -5 y=0 16 1 36 4 25 y 2 = 82 -12 1 -12 10 35 xy = 22 r The regression equation of X on Y is X − X = r 185 Y = 170 = 34 = 37 Y = N 5 N 5 xy x = 22 = 0.268 r = b2 = y y 2 82 X = X x (Y − Y ) y = X − 37 = 0.268(Y − 34) X = 27.88 + 0.268Y The co-efficient of correlation is the geometric mean of the two regression co-efficients. Symbolically r = bxy byx = 0.268 0.25 = 0.259