1 A Simple Moving Average Example Moving Average Forecast = demand in previous n periods n Where n is the number of periods in the moving average Example: The demand for Gingerbread Men is shown in the table. Forecast the demand for month 7. Month 1 2 3 4 Demand 1500 2200 2700 4200 5 7800 6 5400 Calculation Forecast 1500 2200 2700 2133 3 2133 7 Bakery Gingerbread Man Sales 9000 8000 7000 Sales 6000 5000 Demand 4000 Forecast 3000 2000 1000 0 1 2 3 4 Period 5 6 7 2 A Weighted Moving Average Example Weighted Moving Average Forecast = (weight for period n) (demand in period n) weights Example: The demand for Gingerbread Men is shown in the table. Forecast the demand for month 7, weighting the past three months as follows: last month 3, two months ago 2, three months ago 3 Period Last Month Two Months Ago Three Months Ago Sum of Weights Month 1 2 3 4 Demand 1500 2200 2700 4200 5 7800 6 5400 Weight 3 2 1 Calculation Forecast (1500 1) (2200 2) (2700 3) 2333 6 2333 7 Bakery Gingrbread Man Sales 9000 8000 7000 6000 Sales 5000 Series1 Series2 4000 3000 2000 1000 0 1 2 3 4 Period 5 6 7 3 An Exponential Smoothing Example Exponential Smoothing Forecast Ft = Ft-1 + (At-1 – Ft-1) Where Ft Ft-1 At-1 = New Forecast = Previous Forecast = Smoothing Constant: (0 1) = Previous Period’s Actual Demand Example: The demand for Gingerbread Men is shown in the table. Forecast the demand for month 7, using a smoothing constant of 0.4. The forecast for month 1 is 1500 units. Month 1 2 Demand 1500 2200 Calculation 1500 + 0.4(1500 – 1500) Forecast 1500 1500 3 2700 1500 + 0.4(2200 – 1500) 1780 4 4200 5 7800 6 5400 7 Bakery Gingerbread Man Sales 9000 8000 7000 Sales 6000 5000 Demand Forecast 4000 3000 2000 1000 0 1 2 3 4 Period 5 6 7 4 A Mean Absolute Deviation Example MAD = forecast errors n Example: Calculate the MAD for the value of used in the Exponential Smoothing Example. Month 1 2 3 Demand 1500 2200 2700 Forecast 1500 1500 1780 4 4200 2148 5 7800 2969 6 5400 4901 Error 1500 – 1500 = 0 2200 – 1500 = 700 | Error | 0 700 Total: MAD: A Mean Squared Error Example forecast errors 2 MSE = n Example: Calculate the MAD for the value of used in the Exponential Smoothing Example. Month 1 2 3 Demand 1500 2200 2700 Forecast 1500 1500 1780 4 4200 2148 5 7800 2969 6 5400 4901 Error2 0 490000 Error 1500 – 1500 = 0 2200 – 1500 = 700 Total: MSE: 5 An Exponential Smoothing With Trend Adjustment Example Forecast Including Trend Ft = (At-1) + (1 - )(Ft-1 + Tt-1) Trend Tt = (Ft – Ft-1) + (1 - )T t-1 Where Ft Tt At = Exponentially smoothed forecast for period t = Exponentially smoothed trend for period t = Actual demand for period t = Smoothing constant for the average (0 1) = Smoothing constant for the trend (0 1) Example: The demand for Gingerbread Men is shown in the table. Forecast the demand for month 7, using a smoothing constant for the average of 0.4, and a smoothing constant for the trend of 0.2. The forecast for month 1 is 1500 units and the trend for month 1 is 200 units. Month 1 2 3 Demand Forecast 1500 1500 2200 0.4(1500) + 0.6(1700) = 1620 2700 4 4200 5 7800 6 5400 Trend 200 0.2(1620 – 1500) + 0.8(200) = 184 7 Bakery Gingerbread Man Sales 9000 8000 7000 Sales 6000 Demand 5000 Forecast Trend 4000 FIT 3000 2000 1000 0 1 2 3 4 Period 5 6 7 FIT 1700 1804 6 Least Squares Trend Projection Example ŷ a bx Where = computed value of variable to be predicted (ie dependant variable) = y-axis intercept = slope of regression line = independent variable ŷ a b x We can determine a and b with the equations: b xy - nxy x nx 2 a y - bx 2 Example: The demand for Gingerbread Men is shown in the table. Forecast demand for period 7 by fitting a single line trend to the data. Month (x) 1 2 3 Demand (y) 1500 2200 2700 4 4200 5 7800 6 5400 x = y = x b x2 1 4 xy (1)(1500) = 1500 (2)(2200) = 4400 x2 = xy = x y n xy - nxy x nx 2 2 y n = a y - bx = Thus, our trend equation is: ŷ = + x To calculate the forecast for month x = 7, we have: ŷ = 7 Seasonal Forecast Example Average Monthly Demand = Seasonal Index = Average Annual Demand 12 months Average Annual Demand Average Monthly Demand Example: The demand for gingerbread men over the past three years is shown in the table. If we expect the total yearly demand in 2002 to be 45,000 units, what will be our forecasted monthly demands in 2002? Month 1999 1 1100 2 1800 2000 1300 2000 2001 1500 2200 3 2300 2500 2700 4 3800 4000 4200 5 4500 4700 4900 6 5000 5200 5400 7 5500 5700 5900 8 4800 5000 5200 9 3000 3200 3400 10 2200 2400 2600 11 1500 1700 1900 12 1200 1400 1600 Average Annual Demand (1100 + 1300 + 1500) / 3 = 1300 Average Monthly Demand = Seasonal Index for January = 1300 / Forecast for January 2002 = 45000 12 = = 8 Regression Analysis Example ŷ a bx b xy - nxy x nx 2 2 a y - bx Example: We think that there may be a relationship between park attendance and number of gingerbread men sold. Data for the first six months are shown in the table. Forecast the number of gingerbread men that will be sold in month 7 if monthly park attendance is forecast as 25000 people. Sales (y) x2 xy 1 2 Attendance (x) (,000) 8 12 1500 2200 64 (8)(1500) = 12000 3 14 2700 4 18 4200 5 19 7800 6 22 5400 x = y = x2 = xy = Month x b x y n xy - nxy x nx 2 2 y n = a y - bx = Thus, our regression equation is: ŷ = + To calculate the forecast for month 7, we have: ŷ = x 9 Standard Error of Estimate Example S y ,x y 2 a y - b xy n2 Example: Compute the Standard Error of the Estimate for our regression analysis example S y ,x y 2 a y - b xy n2 = Correlation Coefficient Example r n x n xy x y 2 x n y 2 y 2 2 Example: Compute the Correlation Coefficient of the data in our regression analysis example