Upcoming SlideShare
×
Like this document? Why not share!

Like this? Share it with your network

Share

# Lecture 06 forecasting weighted moving averages

• 13,251 views

• Comment goes here.
Are you sure you want to
Be the first to comment

Total Views
13,251
On Slideshare
13,251
From Embeds
0
Number of Embeds
0

Shares
241
0
Likes
1

No embeds

### Report content

No notes for slide

### Transcript

• 1. Unit 2 Management of Conversion System Chapter 3: Forecasting Lesson 6: Weighted Moving AveragesLearning ObjectivesAfter reading this lesson you will be able to understand significance of moving averages concept of Smoothing least square method of forecastingGood Morning students, today we are going to introduce the concept ofwhat is known as the Weighted Moving AveragesFriends, you would recall that in the last lecture we learnt about :The importance of forecasting,Different qualitative methods of forecasting andStarted with quantitative approach of forecasting.Hope you are enjoying it and excited to know more about it. Today we willstart with weighted moving average.What is Weighted Moving Averages?When there is a detectable trend or pattern, weights can be used to placemore emphasis on recent values. This makes the techniques more responsiveto changes since more recent periods may be more heavily weighted.Deciding which weights to use requires some experience and a bit of luck.
• 2. Choice of weights is somewhat arbitrary since there is not set formula todetermine them.Mathematically, Weighted Moving average = ∑ (weight for period n) x (Demand in periodn) / ∑weightsAn Example of assignment of weight is Time in the past Weightage 4 years ago 0.05 3 years ago 0.25 2 years ago 0.3 Last year 0.4Let us now again consider the example of Arvee Electronics to forecastwashing machine sales by weighting the past three months as follows: Weights applied Period 3 Last month 2 Two months ago 1 Three months ago 6 Sum of weights Month Actual Washing Three-month weighted moving
• 3. machine sales, average units January 10 February 12 March 13 April 16 (1 x 10 + 2 x 12 + 3 x 13) / 6 = May 19 12.16 June 23 (1 x 12 + 2 x 13 + 3 x 16) / 6 = July 26 14.33 August 30 (1 x 13 + 2 x 16 + 3 x 19) / 6 = 17 September 28 (1 x 16 + 2 x 19 + 3 x 23) / 6 = October 18 20.5 November 16 (1 x 19 + 2 x 23 + 3 x 26) / 6 = December 14 23.83 (1 x 23 + 2 x 26 + 3 x 30) / 6 = 27.5 (1 x 26 + 2 x 30 + 3 x 28) / 6 = 28.33 (1 x 30 + 2 x 28 + 3 x 18) / 6 = 23.33 (1 x 28 + 2 x 18 + 3 x 16) / 6 = 18.67In this particular forecasting situation, you can see that weighting the latestmonth more heavily provides a much more accurate projection.
• 4. Both simple and weighted moving averages are effective in smoothing outsudden fluctuations in the demand pattern in order to provide stableestimates. Moving averages do, however, have three problems. First, increasing the size of n (the number of periods averaged) does smooth out fluctuations better, but it makes the method less sensitive to real changes in the data. Second, moving averages cannot pick up trends very well. Since they are averages, they will always stay within past levels and will not predict a change to either a higher or lower level. Finally, moving averages require extensive records of past data.Now is the time to do some exercises.You crack these and provide me the answers.Sorry, no hints.Exercise 1.You are given the following information about demand of an item:Month: 1 2 3 4 5 6 7 8 9 10 11Demand: 220 228 217 219 258 241 239 244 256260 265Calculate forecasted values using (i) 3 –monthly moving averages, (ii) 5 –monthly moving averages.Exercise 2.For the following data, develop a three – month moving average forecast
• 5. Month: Jan Feb Mar Apr May Jun Jul Aug Sep OctNov DecAuto Battery 20 21 15 14 13 16 17 18 20 2021 23SalesDone! Very good.We shall now learn a forecasting method, which is easy to use andefficiently handled by computers. It is also a type of moving averagetechnique, but it involves very little record keeping of past data.Exponential SmoothingA new forecast is based on the forecast of the previous period. Thefollowing relationship exists between the two:New forecast = Last period’s forecast + α (Last period’s actual demand – last period’s forecast)Where, α denotes a weight, or smoothing constant. This can be writtenmathematically as Ft = Ft-1 + α (At-1 – Ft-1 ) 0≤α≤1where Ft = New forecast F t-1 = Previous forecast α = Smoothing constant (0 <= α <= 1) At-1 = Previous period’s actual demand
• 6. You can see, the concept is not complex. The latest estimate of demand isequal to our old estimate adjusted by a fraction of the difference between thelast period’s actual demand and the old estimate.The smoothing constant, α, is generally in the range from .05 to .50 forbusiness applications. It can be changed to give more weight to recent data(when C is high) or more weight to past data (when α is low). When αreaches the extreme of 1.0, then Ft = 1.0 At-1. All the older values drop out,and the forecast becomes identical to the naïve model mentioned. That is,the forecast for the next period is just the same as the period’s demand.Let me clarify the issue by taking up an example.As an illustration of the exponential smoothing model, let us consider the 12weeks data on number of gallons of gas sold by Indraprastha Gas Limited atNehru Place. With no forecast available for period 1 we begin ourcalculations by letting F1 equal the actual value of the time series in period 1.That is, with Y1 = 17, we will assume F1 = 17 simply to get the exponentialsmoothing computations started. The following table shows the detailedcalculations for α = .2 and α = .5:Week Sales Exponential smoothing Exponential smoothing t (1000’s forecast forecast of Ft using α = .2 Ft using α = .5 gallons)1 17 17 172 21 17 + .2(17 – 17) = 17 17 + .5(17 – 17) = 17
• 7. 3 19 17 + .2(21 – 17) = 17.8 17 + .5(21 – 17) = 194 23 17.8 + .2(19 – 17.8) = 19 + .5(19 – 19) = 195 18 18.04 19 + .5(23 – 19) = 216 16 18.04 + .2(23 – 18.04) = 21 + .5(18 – 21) = 19.57 20 19.03 19.5 + .5(16 – 19.5) = 17.758 18 19.03 + .2(18 – 19.03) = 17.75 + .5(20 – 17.75) =9 22 18.83 18.8810 20 18.83 + .2(16 – 18.83) = 18.88 + .5(18 – 18.88) =11 15 18.26 18.4412 22 18.26 + .2(20 – 18.26) = 18.44 + .5(22 – 18.44) = 18.61 20.22 18.61 + .2(18 – 18.61) = 20.22 + .5(20 – 20.22) = 18.49 20.11 18.49 + .2(22 – 18.49) = 20.11 + .5(22 – 20.11) = 19.19 21.06 19.19 + .2(20 – 19.19) = 19.35 19.35 + .2(22 – 19.35) = 18.48Selecting the smoothing constantThe exponential smoothing approach is easy to use, and has beensuccessfully applied in many organizations. Selection of a suitable constantα is the pre-requisite for the success of smoothing technique. The overallaccuracy of a forecasting model can be determined by comparing theforecasted values with the actual or observed values. The forecast error isdefined as:
• 8. Forecast error = Demand – ForecastAn important consideration in using any forecasting method is the accuracyof the forecast. Forecast errors and the squares of forecast errors can be usedto develop measures of accuracy. Now we will discuss different measures offorecast error.Measures of forecast errorTwo main methods are used in this regard are: 1. Mean absolute deviation (MAD) –(all of us are, in varying measures-don’t you agree-MAD i.e.-but let’s save Sigmund Freud for some other time-) This is computed by taking the sum of the absolute values of the individual forecast errors and dividing by the number of periods of data (n): MAD = ∑ |Forecast errors| / nTo evaluate the accuracy of each smoothing constant we can compute theabsolute deviation and MADs.Week Actual Rounded Absolute Rounded Absolute t Sales forecast deviation forecast deviation (1000’s of with α = .2 for α = .2 with α = .5 for α = .5 gallons)1 17 17 0 17 0
• 9. 2 21 17 4 17 43 19 18 1 19 04 23 18 5 19 45 18 19 1 21 36 16 19 3 20 47 20 18 2 18 28 18 19 1 19 19 22 18 4 18 410 20 19 1 20 011 15 19 4 20 512 22 18 4 21 1Sum of absolute deviations 30 28MAD = ∑|Deviations| / n = 2.5 2.33On the basis of this analysis, a smoothing constant of α = .5 is preferred to α= .2 because its MAD is smaller.2. Mean squared error (MSE) is another way of measuring overall forecasterror. MSE is the average of the squared differences between the forecastedand observed values. The formula is: MSE = ∑ (Forecast errors)2 / nWe will now discuss the last time series forecasting method, which isTrend Projections. This technique fits a trend line to a series of historicaldata points and then projects the line into the future for medium - to long –
• 10. range forecasts. Several mathematical trend equations can be developed (forexample, exponential and quadratic), but in this class we will discuss a linear(straight line) trends only.Linear trend line can be fitted by the method of least square method. Thisapproach results in a straight line that minimizes the sum of the squares ofthe vertical differences from the line to each of the actual observations. Thefigure 3.1 illustrates the least squares approach. Figure 3.1The least squares method for finding the best-fitting lineThe least square methodA least squares line is described in terms of its y – intercept (the height atwhich it intercepts the y – axis) and its slope (the angle of the line). If wecan compute y – intercept and slope, we can express the line as
• 11. ^ y = a + bx where^y = Computed value of the variable to be predicted (called the dependent variable) a = y – axis intercept b = slope of the regression line x = independent variable (which is time here)The slope b is found by − − − b = ( ∑ xy – n x y ) / (∑x2 – n x 2)We can compute the y – intercept a as follows: ^ − a= y-b xLet us take an example to make the things more clear.ExampleThe demand for electrical power at Delhi over the period 1990 – 1996 isshown below, in megawatts. Let us fit a straight – line trend to these dataand forecast 1997 demandYear 1990 1991 1992 1993 1994 1995 1996Electrical power 74 79 80 90 105 142 122demanded
• 12. Year Time period Electrical power x2 xy x demand y1990 1 74 1 741991 2 79 4 1581992 3 80 9 2401993 4 90 16 3601994 5 105 25 5251995 6 142 36 8521996 7 122 49 854 ∑x = 28 ∑y = 692 ∑x2 = ∑xy = 3063 140 − x= ∑ x = 28 = 4 , y = = 692/7 = 98.86 n 7 − b= ∑ xy − n xy = 295/ 28 = 10.54 − ∑x 2 − n x2 − − a = y - b x = 98.86 – 10.54(4) = 56.7Hence, the least squares trend equation is y ^ = 56.70 + 10.54x. To projectdemand in 1997, we first denote the year 1997 in our new coding system asx = 8. Then we estimate the demand in 1997 as 56.7 + 10.54(8) = 141.02, or141 megawatts.
• 13. Seasonal Variations in DataTime series forecasting involves looking at the trend of data over a series oftime observations. Sometimes, however, recurring variations at certainseasons of the year make a seasonal adjustment in the trend line forecastnecessary. Demand for coal and fuel oil, for example, usually peaks duringcold winter months. Analyzing data in monthly or quarterly terms usuallymakes it easy by several common methods. We will take the followingexample to compute seasonal factors from historical data.ExampleMonthly sales of IBM notebook computers at Bangalore are shown belowfor 1999-2000 Sales demand Average Average Average 1999 - 2000 monthly seasonalMonth 1999 2000 demand demand indexJan 80 100 90 94 0.957Feb 75 85 80 94 0.851Mar 80 90 85 94 0.904Apr 90 110 100 94 1.064May 115 131 123 94 1.309June 110 120 115 94 1.223July 100 110 105 94 1.117Aug 90 110 100 94 1.064Sept 85 95 90 94 0.957Oct 75 85 80 94 0.851
• 14. Nov 75 85 80 94 0.851Dec 80 80 80 94 0.851 Total average demand = 1128 Average monthly demand = 1128/ 12 = 94 Seasonal index = Average 1999 – 2000 demand / Average monthly demandUsing these seasonal indices, if we expected the 2001 annual demand forcomputers to be 1200 units, we would forecast the monthly demand asfollows: Month Demand Month Demand Jan (1200/12) x .957 = 96 Jul (1200/12) x 1.117 = 112 Feb (1200/12) x .851 = 85 Aug (1200/12) x 1.064 = 106 Mar (1200/12) x .904 = 90 Sep (1200/12) x .957 = 96 Apr (1200/12) x 1.064 = 106 Oct (1200/12) x .851 = 85 May (1200/12) x 1.309 = 131 Nov (1200/12) x .851 = 85 Jun (1200/12) x 1.223 = 122 Dec (1200/12) x .851 = 85Now we will consider another example to show how indices that havealready been prepared can be applied to adjust trend line forecasts.
• 15. ExampleThe president of Jack and Jill Chocolate Shop has used time seriesregression to forecast retail sales for the next four quarters. The salesestimates are Rs1,00,000, Rs1,20,000, Rs1,40,000, and Rs1,60,000 for therespective quarters. Seasonal indices for the four quarters have been found tobe 1.30, .90, .70, and 1.15, respectively. To compute a seasonalized oradjusted sales forecast, we just multiply each seasonal index by theappropriate trend forecast: Yseasonal = Index x Ytrends forecastThus for Quarter I: Y1 = (1.30)(Rs1,00,000) = Rs1,30,000 Quarter II: YII = (.90)(Rs1,20,000) = Rs1,08,000 Quarter III: YIII = (.70)(Rs1,40,000) = Rs98,000 Quarter IV: YIV = (1.15)(Rs1,60,000) = Rs1,84,000