You are on page 1of 54

Chapter 3.

1
Forecasting

FORECASTING

Definition

Forecasting is the process of estimating future demand in terms of the


quantity, timing, quality, and location for desired products and services.

Goals

The importance of forecasting as an activity.

The forecasting system within an organization.

The various forecasting methods for different applications.

Characteristics

Forecasting involves error - forecasts are usually wrong .

A good forecast is more than a single number

Aggregate forecasts are more accurate than item forecasts

The longer the forecast horizon, the less accurate the forecast will be

Forecasts should not be used to the exclusion of known information

IMPORTANCE OF FORECASTING

Several factors affect the future success of a firm. What are some of these
factors that require planning decisions?
Forecasting is responsible for the most valuable input to planning decisions.
Types of organization decisions may be affected by different forecasts
based on the planning period of interest.
Examples of Organization Decisions

Future Planning Period

Organization Decisions

Long-Term (months/years)

Types of products or services to offer.


Types and sizes of markets to serve.
Processes and technologies to employ.
Plant location and plant sizes.

Intermediate-term
(weeks/months)

Size of work force to employ.


Kinds and amount of inventories to maintain.
Amount of desired subcontracting when needed.
Amount of desired overtime.

Short Term (days/weeks)

Assignment of orders to specific facilities and personnel.


Dispatching to meet delivery times.

THE DEMAND FORECASTING SYSTEM


BASED ON
IDEF0 (ICOM) DEFINITION

THE DEMAND FORECASTING SYSTEM

As a system, demand forecasting consists of six components:


inputs, outputs, constraints, decisions, performance, criteria
and forecasting methods.
CONSTRAINTS

DECISIONS

1. Data

2. Time

3. Expertise

4. Funds

1.Internal

Subjective
Survey
2. Environmental Data
Economic
Social
Technological
1.
2.
3.
4.

Selection of data how far to go

2.

Selection of method

FORECATING METHODS

Historical

INPUTS

1.

Accuracy
Simplicity of computation
Flexibility to adjust the rate of response
objectivity

1.Subjective (Qualitative)
2.Objective (Quantitative)
a. Moving Averages
b. Exponential Smoothing
c. Causal Forecasting
d. Growth Analysis
- Holts Method
e. Seasonal Forecasting
- Winters Methods

FORECASTER
(Performance Criteria)

Expected Demand

OUTPUTS

Forecast error
CONSTRAINTS
The time available to prepare a forecast
The lack of relevant data from internal and external sources
The quality of available data
The expertise within the organization
The available computing facilities

Forecasting Process

FORECASTING METHODS
1.

Subjective (Qualitative) Forecasting

Involves techniques that rely on the experience and


opinions of people (experts) for such reasons as

Little time or no past relevant data.

Available data may not be enough to cover possible


developments in the more distant future.
Such methods include:

The Delphi Method

Nominal Group Technique (NGT)

Market Research (Consumer Survey)

Management Decision (Jury of Executive Opinion)

Sales Force Composites

Historical Analogies

Life Cycle Curves (S-Curves)

FORECASTING METHODS CONTD


2. Objective (Quantitative) Forecasting

Based on time series data

Time series data transfer refer to a set of values o some variables of


interest measured at equally spaced time intervals (e.g. hourly,
daily, weekly, monthly, yearly, etc.)
Techniques

Stationary Models
(A) Moving Averages
(1) Simple Moving Average
(2) Weighted Moving Average
(B) Simple Exponential Smoothing (One-step-ahead forecast)

Trend Models
(A) Regression-Based Forecasting

Trend refers to the long term growth or decline in the average level of demand.

Two typical cases are:


(1) Intrinsic models (growth analysis)

(2) Extrinsic models (causal forecasting)


(B) Double Exponential Smoothing (Multi-step-ahead forecast HOLTS Method)

Seasonal Models
(A) Stationary model
(B) Triple Exponential Smoothing (Multi-step-ahead forecast - WINTERS Method)

Common Time Series Patterns

MEASUREMENT & CONTROL OF FORECAST ERRORS


(FORECAST ERROR ANALYSIS)
1. Forecast error e(t)

(t )
e
(
t
)

Y
(
t
)

Y
Where
Y(t) = actual value
Y (t ) = forecast value
2. Running sum of the forecast errors (RSFE)

RSFE

[Y (t ) Y (t )]
t 1

A measure of bias or lack of bias

e(t ) 0

model)

implies lack of bias (an ideal forecasting

MEASUREMENT & CONTROL OF FORECAST ERRORS


(FORECAST ERROR ANALYSIS)
3. Commonly Used Measures of Accuracy:

(a) Mean Absolute Deviation (MAD)


N

Y (t ) Y (t )

t 1
(Sum
of absolute errors)/(Number
of periods)
MAD

When forecast errors are normally distributed, as is generally


assumed, an estimate of the standard deviation of the forecast
error, e , is given by 1.25*MAD
e = 1.25*MAD

Best suited for systems for which the cost of forecast


deviations depend on their cumulative effect.

MEASUREMENT & CONTROL OF FORECAST ERRORS


(FORECAST ERROR ANALYSIS)
(b) Mean Squared Error (MSE)

Y (t ) Y (t )
N

MSE

(Sum of squared errors)/Number of Periods)


t 1

Gives much greater weight to larger errors than to small ones.

Best suited for systems for which the cost of being in error (i.e.. The cost of
surplus or shortage of inventory or capacity) increase rapidly with the size of
the error.

(c) Mean Absolute Percent Error (MAPE)

100 N Y (t ) Y (t )
MAP
the
Evaluates
goodness of the forecast.
N t 1
Y (t )

MEASUREMENT & CONTROL OF FORECAST ERRORS


(FORECAST ERROR ANALYSIS)

(d) Tracking Signal :

RSFE N [Y (t ) Y (t )]
TS

MAD
Y (t ) Y (t )

An indicator of a forecasting methods bias.

MOVING AVERAGES
1. Simple n-moving average.

Generates next periods forecast by averaging the actual demand


values of the last n time periods.

Mathematically, we have

Xt

i 1

t i

Where
X t = forecasted demand for period t.
X t i = actual demand for ith period preceding t.
n = number of time period to include in the moving average
2. Weighted moving average

Same as in simple moving average

More weight is given to more recent data.

Xt

cX

i 1

t i

Where

c = n
i 1

SIMPLE EXPONENTIAL SMOOTHING


(Exponentially Weighted Moving Average)

(Exponential Smoothing One-Step-Ahead Forecast)

1.

Short term forecasting method that finds wide application in


inventory and production control.

2.

It overcomes the principal shortcomings of moving averages in


that

It takes all past data into account

It requires far less data storage and so is computationally


more efficient

Rate of response can be easily adjusted.

Assigns weights to the demand values of previous periods


in inverse proportion to their age

Formula: Next Forecast = (Previous forecast)


+ (Smoothing constant) x (Forecast

X ( X X )
X
t
t 1
t 1
t 1
error)

SIMPLE EXPONENTIAL SMOOTHING


(Exponentially Weighted Moving Average)

3. Implications of

It determines the extent to which past observations


influence the forecast.

Small

Large

Thus, its choice will determine the rate of response.

puts more weight on far distant previous data.


puts more weight on recent data.

Comparison of Exponential
Smoothing and Moving Average

SIMILARITIES

Both methods are derived with the assumption that the


underlying demand process is stationary

Both methods depend on the specification of a single


parameter

(that is, can be represented by a constant plus a random


fluctuation with zero mean)

For moving averages the parameter is N the number of periods


in the moving average
For exponential smoothing the parameter is the smoothing
constant.

Both methods will lag behind a trend if one exists


When = 2/(N+1), both methods have the same
distribution of forecast error.

Comparison of Exponential
Smoothing and Moving Average

DIFFERENCES

The exponential smoothing forecast is a weighted average


of all past data points (as long as the smoothing constant
is strictly less than 1).

The moving-average forecast is a weighted average of only the


last N periods of data.

In order to use moving averages, one must save all N past


data points.

In order to use exponential smoothing, one need only save the


last forecast. This is the most significant advantage of the
exponential smoothing method and one reason for its popularity
in practice.
For exponential smoothing the parameter is the smoothing
constant.

EQUIVALENT COMPARISON OF MOVING AVERAGE AND


EXPONENTIAL SMOOTHING TECHNIQUES DEPENDS ON THE
RELATIONSHIP OF N &

The average age of data in mA/Regression model as a function


of N is given by (N-1)/2.

Similarly, the average age of data in an exponentially


smoothed average as
a function of

Therefore, 1

=>

=>

N 1
2

2
N 1

2
1

is given by

Exponential Smoothing for


Different Values of Alpha

TIMES SERIES FORECASTING METHODS


(Regression-Based Methods)

(1) Intrinsic Models (Growth Analysis)

A time series analysis that defines how a certain production


indicator varies only with time.

General growth expression include


Constant

Y (t ) a

Linear

Y (t ) a bt

Quadratic

Y (t ) a bt ct 2

Exponential
Y (t ) aebt
Polynomial
Y (t ) a bt ct 2 .......... w t n1 zt n

TIMES SERIES FORECASTING METHODS


(Regression-Based Methods)

1.

(2) Extrinsic Models (Casual Forecasting)

Times-series models based on the existence of a cause-and-effect


relationship between independent predictor variable(s) and the
dependent forecast variable.

General expressions for one predictor variable include


Constant:

Y (t ) a

Linear:

Y (t ) a bX (t )

Quadratic:

Y (t ) a bX (t ) cX 2 (t )

Exponential

Y (t ) ae bX (t )

A general for more than one predictor variable

Y (t ) a bX 1 (t ) cX 2 (t ) ..........zX n (t )

TIMES SERIES FORECASTING METHODS


(Regression-Based Methods)

Examples of some products and their relevant economic


indicators
Product

Economic indicators useful in forecasting

Childrens Clothing

Number of birth certificates issued in past several years.


Consumer purchasing power.
Primary school enrollments.

Home Appliances

Personal income in excess of basic expenditures.


Number of new homes sold.
Interest rate on credit sales.
Price index of home furnishings
Maximum credit available to individuals.

Construction materials

Construction contracts awarded


Planned highway construction
Number of construction permits issued

Machine tools

Federal Reserve Index of Industrial Production.


Existing and planned productive capacity of metal fabricating
industries.
Prices of metal products.
Average labor cost.

TIMES SERIES FORECASTING METHODS


(Regression-Based Methods)

(3) Determination of the Regression Prediction Equation

Regression equation is determined by the method of least squares


which aims at fitting a line to a set of n points in such a way that
the parameters or coefficients minimize the sum of the squared
error deviations
n

( [Y (t ) Y (t )] 2 )
t 1

The methodology is applicable to both (1) intrinsic models and (2)


extrinsic models.

An Example of a Regression
Line

REGRESSION-BASED METHOD
(By Differential Calculus)
Constant Model:

(i)

d [ e 2 (t )
t 1

da

2 [Y (t ) a ] 0
t 1

Y (t )


a
(ii)

t 1

Linear Model:
N

(t )

t 1

[Y (t ) a bt ]

t 1

d [ e 2 (t )
t 1

da

2 [Y (t ) a bt ] 0
t 1

REGRESSION-BASED METHOD
(By Differential Calculus)
N

t 1

t 1

Y (t ) Na b t

(1)

d [ e 2 (t )
t 1

db

From (1)

2 [Y (t ) a bt ] 0
t 1

t 1

t 1

tY (t ) a t b t

.(2)

Y (t ) b t

a
N

INTERCEPT

Y (t ) b t
Substituting a in (2), we have
2
t b t
tY (t )
N

N tY (t ) Y (t ) b( t ) 2 bN t 2

REGRESSION-BASED METHOD
(By Differential Calculus)

b[ N t 2 ( t ) 2 ] N tY (t ) Y (t ) t
N tY (t ) Y (t ) t

SLOPE

N t 2 ( t ) 2

Equations (1) and (2) are called NORMAL EQUATIONS a set of simultaneous
linear equations. Alternatively,

Sxy
b
Sxx
Sxy

i Di
i 1
2

S xx

__

n ( n 1)

( n 1)( 2 n 1)
6
b ( n 1)
2

Di
i 1

n ( n 1)

REGRESSION-BASED METHOD
(Accuracy of Regression Line)

Indicates a relatively strong or weak relation between two


variables x and y.

Given that the prediction of y depends on one independent


variable (x), the correlation coefficient (r yx) is calculated as
follows:

ryx

n xy x y

[n X 2 ( X ) 2 ][ Y 2 ( Y ) 2 ]

Given that the prediction depends on two independent


variables (x and z), 2the coefficient
of multiple correlation (R yxz)
2

r r 2r yx ryz rzx

yx
yz
is calculated
R yxzas follows:

1 rxz2

CLASS EXAMPLE 2.1 PROBLEM


Demand during the first 10 months of the year was as follows:
Month (t)
Demand -Y(t)

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

19

18

15

31

22

27

39

38

44

30

CLASS EXAMPLE 2.1 PROBLEM


Demand during the first 10 months of the year was as follows:
Month (t)
Demand -Y(t)

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

19

18

15

31

22

27

39

38

44

Make forecasts of demand for November and December using the


following techniques:
a) A four-month moving average
b) Simple exponential smoothing with alpha value of 0.4
c)
A linear regression method
d) How would you explain the quality of the estimate in part (c)?

31

SOLUTION TO EXAMPLE
2.1
Month

Y(t)

t2

tY(t)

JAN

FEB

19

38

MAR

18

54

APR

15

16

60

MAY

31

25

155

JUN

22

36

132

JUL

27

49

189

AUG

39

64

312

SEP

38

81

342

OCT

44

10

100

440

SUM =>

258

55

385

1727

32

REGRESSION-BASED METHOD
(By Matrix Approach)

Alternatively, using the matrix approach when the prediction


of y depends on two or more variables, the coefficient of
determination is calculated as follows:
R2

SSR
SSE
1
SSTO
SSTO

Where the coefficient of correlation is simply the square


root of the coefficient of determination, and

1
Y 11 Y
n
SSE Y Y b X Y
SSR b X Y

1
Y 11Y
n

SSTO Y Y

b = (XX)-1(XY)

REGRESSION-BASED METHOD
(By Matrix Approach)

The relationship between y and a set of independent variables


x1, x2, x3, ..etc. is expressed through the following matrix
relationships:
Y = Xb and b = (XX)-1(XY)
where

y1
y
2

y n

1 x12
1 x
22
X

1 xn2

x1m
x 2 m

x nm

b0
b
1
b

bm

REGRESSION-BASED MODEL
(Class Example 2.2 Problem Causal Forecasting)
Problem Statement:
The demand for new furniture is suspected to have a relationship
with either or both of two factors, the number of marriage
licenses issued in the previous year and the number of building
permits issued for houses in the previous year. The data for these
factors are given in the following table :
Year

Demand of new furniture


(millions of dollars)

Millions of marriage
licenses in previous
year

Building permits issued in


previous year (x 100, 000
units)

112

2.5

9.0

145

3.5

12.0

105

3.5

10.0

180

5.0

13.0

95

4.0

5.0

80

3.0

6.0

200

4.0

15.0

210

5.0

14.0

150

2.0

13.0

10

160

3.0

12.0

REGRESSION-BASED MODEL
(Class Example Problem Causal Forecasting)
Using spreadsheet (Excel), answer the following questions:
Questions :
(a)

there are three alternatives for forecasting, using the number of


marriage licenses, the number of building permits or both.

(b)

Based on your result in (a), forecast the demand for year 11 if it is


known that the number of marriage licenses issued was 4.0 million
and building permits were issued for 1,000,000 housing units in year
10.

(c)

Assuming that the two economic indicators (number of marriage


licenses and building permits) together have strong correlation with
the demand of new furniture, derive the necessary normal equations
for the prediction parameters (either by intuitive approach or the
differential calculus approach) and solve the simultaneous linear
equation by the row reduction technique to obtain the prediction
parameters.

(d)

Repeat (c) using purely the matrix approach from scratch (with builtin regression tools in Excel)

REGRESSION-BASED MODEL
Class Example Problem
(Determining the Needed Correlation Coefficients)

REGRESSION-BASED MODEL
Class Example Problem
(Row Reduction Matrix Solution for Simultaneous
Equations)
b)

EQUATIONS

y(x1,x2) = a + bx1 + cx2

SUM(y) = na + bSUM(x1) + cSUM(x2)


SUM(x1y) = aSUM(x1) + bSUM(x1^2) + cSUM(x1x2)
SUM(x2y) = aSUM(x2) + bSUM(x1x2) + cSUM(x2^2)

MATRIX SOLUTION FOR SIMULTANEOUS EQUATIONS


a
10
35.5
109

b
35.5
134.75
394.5

c
109
394.5
1289

Rt
1437
5305
16903

1
35.5
109

3.55
134.75
394.5

10.9
394.5
1289

143.7
5305
16903

1
0
0

3.55
8.725
7.55

10.9
7.55
100.9

143.7
203.65
1239.7

1
0
0

3.55
1
7.55

10.9
0.86533
100.9

143.7
23.340974
1239.7

BASIC

a
1
0
0

b
0
1
0

c
7.82808
0.86533
94.3668

Rt
60.84
23.34
1063

1
0
0

0
1
0

7.82808
0.86533
1

60.84
23.34
11.27

1
0
0

0
1
0

0
0
1

-27.38
13.59
11.27

FORECAST
PERIOD
11
MARRIAGE LICENCES
4
PERMITS
10
FORECAST
$ 139.67 million

REGRESSION-BASED MODEL
Class Example Problem
(Using Matrix Solution Approach from Scratch)

c)

EQUATIONS
b =(x'x)^-1 (x'y)
x

x'

y'
1'

R =SSR / SSTO

1
1
1
1
1
1
1
1
1
1

2.50
3.50
3.50
5.00
4.00
3.00
4.00
5.00
2.00
3.00

9
12
10
13
5
6
15
14
13
12

112
145
105
180
95
80
200
210
150
160

1
1
2.5
9

2
1
3.5
12

3
1
3.5
10

112

145

1
1
1
1
1
1
1
1
1
1

4
1
5
13

5
1
4
5

6
1
3
6

7
1
4
15

8
1
5
14

9
1
2
13

10
1
3
12

105

180

95

80

200

210

150

160

REGRESSION-BASED MODEL
Class Example Problem
(Using Matrix Solution Approach from Scratch)

1 x'x
2
3
1
2
3

10.00
35.50
35.50 134.75
109.00 394.50
x'y

1 b
2
3

109.00
394.50
1289.00

compared to

SSR =b'x'y-(1/n)y'*1*1' y
R = SSR/SSTO

b'x'y
SSR=
R=

inv

2.19 -0.34
-0.34 0.12
-0.08 -0.01

-0.08
-0.01
0.01

1437
5305
16903
-27.38
13.59
11.27

b'

1
2
3

13.59

11.27

223235

y'1

1437

0.9236

-27.38 from matrix method


13.59 of solving normal equations
11.27

SSTO = y'y - (1/n)y'*1*1'*y

-27.38

16738

a =
b =
c=

1'y
SSTO =

18122

1437

y'y 224619

DOUBLE EXPONENTIAL SMOOTHING


(Holts Method)
Holts method is a type of double exponential

1.

smoothing designed to track time series with linear


trend.
The method requires the specification of two

2.

smoothing constants, and and uses two


smoothing equations

St Dt (1 )( St 1 Gt 1 )

One for the value of the series the intercept


Gt ( S t St 1 ) (1 )Gt 1

3.

One for the trend the slope

Ft ,t St Gt

The -step-ahead forecast made in period t, is given


by the following:

CLASS EXAMPLE 2.1 PROBLEM


CONTD
Demand during the first 10 months of the year was as follows:
Month (t)
Demand -Y(t)

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

19

18

15

31

22

27

39

38

44

42

A Seasonal Demand Series

SEASONAL FORECASTING

What to do when seasonality and no trend :


1.

Compute the sample mean of all the data

2.

Divide each observation by the sample


mean. This gives seasonal factors for each
period of observed data

3.

Average the factors for like periods within


each season. They will always add to exactly
N.

Class Example 2.3 Problem


Stationary Seasonal Data
The quarterly sales of tires during the last 6 years are given
below:
Year
Winter
Spring
Summe Fall
r
1

180,000

150,000

130,000

169,000

183,000

155,000

128,000

170,000

190,000

160,000

140,000

165,000

191,000

162,000

135,000

160,000

195,000

155,000

143,000

168,000

200,000
189,833

170,000
158,667

150,000
137,667

165,000
166,167

7
Use the simple moving-average to determine the forecast for
each quarter of next year (i.e. year 7).
45

Seasonal Series with


Increasing Trend

TRIPLE EXPONENTIAL SMOOTHING


[Winters Method]

Winters method is a type of triple exponential


smoothing.
It has the important advantage of being easy
to update as new data becomes available.
The method assumes the following model:
Yt ( Gt )ct t

Assumptions:
The length of the season is exactly N
periods
The seasonal factors (indices) are the same
each season and the property
47

TRIPLE EXPONENTIAL SMOOTHING


[Winters Method Contd]

Yt
(1 )(St 1 Gt 1 )
St
ct N

Gt [ St St 1 ] (1 )Gt 1

Y
ct t (1 )ct N
St

Ft ,t x ( St xGt )ct x N
48

Initialization
for Winterss Method

Initialization
for Winterss Method
Contd

Initialization
for Winterss Method
Contd

Initialization
for Winterss Method
Contd

52

INITIALIZATION OF THE
WINTERS METHOD

53

Alternative Initialization
Procedure for Winters Method

54

You might also like