You are on page 1of 15

Unit 2

Management of Conversion System


Chapter 3: Forecasting
Lesson 6: Weighted Moving Averages

Learning Objectives

After reading this lesson you will be able to understand


significance of moving averages
concept of Smoothing
least square method of forecasting

Good Morning students, today we are going to introduce the concept of


what is known as the Weighted Moving Averages

Friends, you would recall that in the last lecture we learnt about :
The importance of forecasting,
Different qualitative methods of forecasting and
Started with quantitative approach of forecasting.
Hope you are enjoying it and excited to know more about it. Today we will
start with weighted moving average.

What is Weighted Moving Averages?


When there is a detectable trend or pattern, weights can be used to place
more emphasis on recent values. This makes the techniques more responsive
to changes since more recent periods may be more heavily weighted.
Deciding which weights to use requires some experience and a bit of luck.
Choice of weights is somewhat arbitrary since there is not set formula to
determine them.
Mathematically,

Weighted Moving average = ∑ (weight for period n) x (Demand in period


n) / ∑weights

An 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.4

Let us now again consider the example of Arvee Electronics to forecast


washing 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


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.67

In this particular forecasting situation, you can see that weighting the latest
month more heavily provides a much more accurate projection.
Both simple and weighted moving averages are effective in smoothing out
sudden fluctuations in the demand pattern in order to provide stable
estimates. 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 11
Demand: 220 228 217 219 258 241 239 244 256
260 265

Calculate 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
Month: Jan Feb Mar Apr May Jun Jul Aug Sep Oct
Nov Dec
Auto Battery 20 21 15 14 13 16 17 18 20 20
21 23
Sales

Done! Very good.


We shall now learn a forecasting method, which is easy to use and
efficiently handled by computers. It is also a type of moving average
technique, but it involves very little record keeping of past data.

Exponential Smoothing
A new forecast is based on the forecast of the previous period. The
following 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 written


mathematically as
Ft = Ft-1 + α (At-1 – Ft-1 ) 0≤α≤1
where
Ft = New forecast
F t-1 = Previous forecast
α = Smoothing constant (0 <= α <= 1)
At-1 = Previous period’s actual demand
You can see, the concept is not complex. The latest estimate of demand is
equal to our old estimate adjusted by a fraction of the difference between the
last period’s actual demand and the old estimate.

The smoothing constant, α, is generally in the range from .05 to .50 for
business 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 12
weeks data on number of gallons of gas sold by Indraprastha Gas Limited at
Nehru Place. With no forecast available for period 1 we begin our
calculations 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 exponential
smoothing computations started. The following table shows the detailed
calculations 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 17
2 21 17 + .2(17 – 17) = 17 17 + .5(17 – 17) = 17
3 19 17 + .2(21 – 17) = 17.8 17 + .5(21 – 17) = 19
4 23 17.8 + .2(19 – 17.8) = 19 + .5(19 – 19) = 19
5 18 18.04 19 + .5(23 – 19) = 21
6 16 18.04 + .2(23 – 18.04) = 21 + .5(18 – 21) = 19.5
7 20 19.03 19.5 + .5(16 – 19.5) = 17.75
8 18 19.03 + .2(18 – 19.03) = 17.75 + .5(20 – 17.75) =
9 22 18.83 18.88
10 20 18.83 + .2(16 – 18.83) = 18.88 + .5(18 – 18.88) =
11 15 18.26 18.44
12 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.48

Selecting the smoothing constant


The exponential smoothing approach is easy to use, and has been
successfully applied in many organizations. Selection of a suitable constant
α is the pre-requisite for the success of smoothing technique. The overall
accuracy of a forecasting model can be determined by comparing the
forecasted values with the actual or observed values. The forecast error is
defined as:
Forecast error = Demand – Forecast

An important consideration in using any forecasting method is the accuracy


of the forecast. Forecast errors and the squares of forecast errors can be used
to develop measures of accuracy. Now we will discuss different measures of
forecast error.

Measures of forecast error


Two 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| / n


To evaluate the accuracy of each smoothing constant we can compute the
absolute 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
2 21 17 4 17 4
3 19 18 1 19 0
4 23 18 5 19 4
5 18 19 1 21 3
6 16 19 3 20 4
7 20 18 2 18 2
8 18 19 1 19 1
9 22 18 4 18 4
10 20 19 1 20 0
11 15 19 4 20 5
12 22 18 4 21 1
Sum of absolute deviations 30 28

MAD = ∑|Deviations| / n = 2.5 2.33


On 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 forecast


error. MSE is the average of the squared differences between the forecasted
and observed values. The formula is:
MSE = ∑ (Forecast errors)2 / n

We will now discuss the last time series forecasting method, which is
Trend Projections. This technique fits a trend line to a series of historical
data points and then projects the line into the future for medium - to long –
range forecasts. Several mathematical trend equations can be developed (for
example, 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. This
approach results in a straight line that minimizes the sum of the squares of
the vertical differences from the line to each of the actual observations. The
figure 3.1 illustrates the least squares approach.

Figure 3.1The least squares method for finding the best-fitting line

The least square method


A least squares line is described in terms of its y – intercept (the height at
which it intercepts the y – axis) and its slope (the angle of the line). If we
can compute y – intercept and slope, we can express the line as
^
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 x
Let us take an example to make the things more clear.

Example
The demand for electrical power at Delhi over the period 1990 – 1996 is
shown below, in megawatts. Let us fit a straight – line trend to these data
and forecast 1997 demand

Year 1990 1991 1992 1993 1994 1995 1996


Electrical power 74 79 80 90 105 142 122
demanded
Year Time period Electrical power x2 xy
x demand y
1990 1 74 1 74
1991 2 79 4 158
1992 3 80 9 240
1993 4 90 16 360
1994 5 105 25 525
1995 6 142 36 852
1996 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.7

Hence, the least squares trend equation is y ^ = 56.70 + 10.54x. To project


demand in 1997, we first denote the year 1997 in our new coding system as
x = 8. Then we estimate the demand in 1997 as 56.7 + 10.54(8) = 141.02, or
141 megawatts.
Seasonal Variations in Data
Time series forecasting involves looking at the trend of data over a series of
time observations. Sometimes, however, recurring variations at certain
seasons of the year make a seasonal adjustment in the trend line forecast
necessary. Demand for coal and fuel oil, for example, usually peaks during
cold winter months. Analyzing data in monthly or quarterly terms usually
makes it easy by several common methods. We will take the following
example to compute seasonal factors from historical data.

Example
Monthly sales of IBM notebook computers at Bangalore are shown below
for 1999-2000

Sales demand Average Average Average


1999 - 2000 monthly seasonal
Month 1999 2000 demand demand index
Jan 80 100 90 94 0.957
Feb 75 85 80 94 0.851
Mar 80 90 85 94 0.904
Apr 90 110 100 94 1.064
May 115 131 123 94 1.309
June 110 120 115 94 1.223
July 100 110 105 94 1.117
Aug 90 110 100 94 1.064
Sept 85 95 90 94 0.957
Oct 75 85 80 94 0.851
Nov 75 85 80 94 0.851
Dec 80 80 80 94 0.851

Total average demand = 1128

Average monthly demand = 1128/ 12 = 94

Seasonal index = Average 1999 – 2000 demand / Average monthly demand

Using these seasonal indices, if we expected the 2001 annual demand for
computers to be 1200 units, we would forecast the monthly demand as
follows:

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 = 85

Now we will consider another example to show how indices that have
already been prepared can be applied to adjust trend line forecasts.
Example
The president of Jack and Jill Chocolate Shop has used time series
regression to forecast retail sales for the next four quarters. The sales
estimates are Rs1,00,000, Rs1,20,000, Rs1,40,000, and Rs1,60,000 for the
respective quarters. Seasonal indices for the four quarters have been found to
be 1.30, .90, .70, and 1.15, respectively. To compute a seasonalized or
adjusted sales forecast, we just multiply each seasonal index by the
appropriate trend forecast:
Yseasonal = Index x Ytrends forecast
Thus 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

You might also like