Professional Documents
Culture Documents
FORECASTING DEMAND
WEEK 2&3
Sources:
▪ It should be timely
▪ It should be as accurate as possible
▪ It should be reliable
▪ It should be in meaningful units
▪ It should be presented in writing
▪ The method should be easy to use and
understand in most cases.
▪ Ease of updating as new data becomes available.
Types of Forecasts by Time
Horizon
Quantitative
• Short-range forecast methods
• Long-range forecast
Design
• > 2 years of system
• New product planning
Qualitative
Methods
Distinguishing Differences
Time
Influence of Product Life Cycle
Trend Cyclical
Seasonal Random
Patterns (1 of 2)
• Trend - A long-term movement of the item being forecast.
• Random variations - movements that are not predictable and
follow no pattern.
• Cycle - A movement, up or down, that repeats itself over a
lengthy time span.
• Seasonal pattern - Oscillating movement in demand that
occurs periodically in the short run.
Components of Demand
Trend
component
Demand for product or service
Seasonal peaks
Actual demand
line
Average demand
over 4 years
Random variation
| | | |
1 2 3 4
Time (years)
Figure 4.1
Trend Component
► Persistent, overall upward or downward pattern
► Changes due to population, technology, age, culture, etc.
► Typically several years duration
Seasonal Component
► Regular pattern of up and down fluctuations
► Due to weather, customs, etc.
► Occurs within a single year
0 5 10 15 20
Random Component
M T W T
F
Time Series
▪ A time series is a stream of data (e.g., demand).
39
Time Series and Extrapolation continued
o random variations
o increasing or decreasing trend
o seasonal variations
40
Time Series (Random Variations)
41
Time Series (Random Variations and
Increasing Trend)
42
Time Series (Random Variations and
Decreasing Trend)
There is a constant rate of change (decreasing values) as time
goes by.
43
Time Series (Random Variations and
Seasonal Variations)
o Seasonal (cyclical) variations may also be present.
o Examples: demand for resort hotels & home heating oil.
44
Time Series (Random Variations, Seasonal Variations and
Increasing Trend)
All three components – random variations, an increasing (or
decreasing) trend, and seasonal variations (cycles) may be
present simultaneously in a time series.
45
Moving Average Method
Moving average =
å demand in previous n periods
n
Summary of Moving Averages
• Advantages of Moving Average Method
• Easily understood
• Easily computed
• Provides stable forecasts
n
Di
MAn = i =1
n
where:
n = number of periods in the moving average
D = data in period i
i
Moving Average (2 of 6)
Example: Instant Paper Clip Supply Company wants to forecast orders for the month
of November. Develop three-month and five-month moving averages using the data.
3
Di
MA3 = i =1 = 90 +110 +130 =110 orders
3 3
• Five-month moving average:
5
Di
MA5 = i =1 = 90 +110 +130 + 75 + 50 = 91 orders
5 5
Moving Average (4 of 6)
Table 15.2 Three- and five-month moving averages
Month Orders per Month 3-Month Moving Average 5-Month Moving Average
January 120 — —
February 90 — —
March 100 — —
April 75 103.3 —
May 110 88.3 —
June 50 95.0 99.0
July 75 78.3 85.0
August 130 78.3 82.0
September 110 85.0 88.0
October 90 105.0 95.0
November — 110.0 91.0
Moving Average (5 of 6)
Figure 15.2 Three- and five-month moving averages
Moving Average (6 of 6)
• Longer-period moving averages react more slowly to
changes in demand than do shorter-period moving averages.
• The appropriate number of periods to use often requires trial-
and-error experimentation.
• A moving average does not react well to changes (trends,
seasonal effects, etc.) but is easy to use and inexpensive.
• Good for short-term forecasting.
Weighted Moving Average
► Used when some trend might be present
► Older data usually less important
► Weights based on experience and intuition Simple moving
average models
weight all previous
periods equally
(( )( ))
Weighted å Weight for period n Demand in period n
moving =
average å Weights
Weighted Moving Average
• In a weighted moving average, weights are assigned to the most recent
data.
n
WMA = W D
n i =1 i i
where Wi = the weight for period i, between 0% and 100%
Wi = 1.00
Example: Paper clip company weight 50% for October, 33% for
September, 17% for August:
3
WMA = W D = (.50)(90) + (.33)(110) + (.17)(130) = 103.4 orders
3 i =1 i i
• Determining precise weights and the number of periods requires trial-
and-error experimentation.
Exponential Smoothing
► Form of weighted moving average
► Weights decline exponentially
► Most recent data weighted most
► Requires smoothing constant ( )
► Ranges from 0 to 1
► Subjectively chosen
► Involves little record keeping of past data
Ft = Ft – 1 + a(At – 1 - Ft – 1)
OR
Ft = a(At - 1) + (1 - a)(Ft – 1)
Ft +1 a = .30 Ft +1 a = .50
sub start expression t + 1 end sub start expression t + 1 end
expression alpha = 0.30. expression alpha = 0.50.
1 January 37 — —
2 February 40 37.00 37.00
3 March 41 37.90 38.50
4 April 37 38.83 39.75
5 May 45 38.28 38.37
6 June 50 40.29 41.68
7 July 43 43.20 45.84
Exponential Smoothing (6 of 14)
Ft +1 a = .30 Ft +1 a = .50
sub start expression t + 1 end sub start expression t + 1 end
expression alpha = 0.30. expression alpha = 0.50.
1 105.00 — — — — — —
2 150.00 — — — — — —
3 93.00 — — — — — —
4 121.00 116.00 5.00 — — 113.85 7.15
5 140.00 121.33 18.67 — — 116.69 23.31
6 170.00 118.00 52.00 121.80 48.20 125.74 44.26
7 105.00 143.67 −38.67 134.80 −29.80 151.77 −46.77
8 150.00 138.33 11.67 125.80 24.20 132.40 17.60
9 150.00 141.67 8.33 137.20 12.80 138.55 11.45
10 170.00 135.00 35.00 143.00 27.00 142.35 27.65
11 110.00 156.67 −46.67 149.00 −39.00 160.00 −50.00
12 130.00 143.33 −13.33 137.00 −7.00 136.69 −6.60
13 — 136.67 — 142.00 — 130.20 —
The data below consist of the closing price of the common stock of the American Telephone and
Telegraph Corporation on 10 recent trading days.
Time(t) Price Time(t) Price
1 $24.10 6 $22.73
2 23.80 7 22.60
3 23.39 8 21.76
4 22.90 9 22.14
5 22.10 10 21.69
a. Using a five-period moving average, forecast the price of the stock for period 10.
b. What is the error of the forecast in #1-a?
c. Using a five-period moving average, forecast the price of the stock for period 11.
A forecast for t = 10 will require the previous five prices.
MA5 = (22.10 + 22.73 + 22.60 + 21.76 + 22.14)/5 = $22.27
b. Error = Actual - Forecast = 21.69 – 22.27 = -$0.58
c. MA5 = (22.73 + 22.60 + 21.76 + 22.14 + 21.69)/5 = $22.18
Q2
1 350 350.00
2 510 350.00
3 750 430.00
4 420 590.00
5 370 505.00
6 480 437.50
7 860 458.75
8 500 659.37
9 450 579.69
10 550 514.84
11 820 532.42
12 570 676.21
13 — 623.105
Exponential Smoothing with Trend
Adjustment
Ft = a(At - 1) + (1 - a)(Ft - 1 + Tt - 1)
Tt = b(Ft - Ft - 1) + (1 - b)Tt - 1
where Ft = exponentially smoothed forecast average
Tt = exponentially smoothed trend
At = actual demand
a = smoothing constant for average (0 ≤ a ≤ 1)
b = smoothing constant for trend (0 ≤ b ≤ 1)
Exponential Smoothing with Trend
Adjustment
Step 1: Compute Ft
Step 2: Compute Tt
Step 3: Calculate the forecast FITt = Ft + Tt
Example Question
Trend adjusted exponential smoothing: a = 0.1, b = 0.2
Unadjusted Adjusted
Month Income Forecast Trend Forecast |Error| Error 2
February 70.0 65.0 0.0 65 5.0 25.0
March 68.5 65.5 0.1 65.6 2.9 8.4
April 64.8 65.9 0.16 66.05 1.2 1.6
May 71.7 65.92 0.13 66.06 5.6 31.9
June 71.3 66.62 0.25 66.87 4.4 19.7
July 72.8 67.31 0.33 67.64 5.2 26.6
August 68.16 68.60 24.3 113.2
MAD = 24.3/6 = 4.05, MSE = 113.2/6 = 18.87. Note that all numbers are rounded.
Seasonal Adjustments (1 of 5)
110 –
100 –
90 –
80 –
70 –
| | | | | | | | | | | |
J F M A M J J A S O N D
Time
Example (your turn)
Overview 3
• Time series techniques relate a single variable being forecast
to time.
• Regression is a forecasting technique that measures the
relationship of one variable to one or more other variables.
• For example, if we know that something has caused product demand to behave in a
certain way in the past, we might like to identify that relationship. If the same thing
happens again in the future, we can then predict what demand will be.
y^ = a + bx
^
where y = computed value of the variable to be predicted
(dependent variable)
a = y-axis intercept
b = slope of the regression line
x = the independent variable
Linear Trend Line (1 of 5)
b = xy − nxy
x2 − nx
a = y − bx
where:
n = number of periods
x = nx
y = ny
Least Squares Method
Equations to calculate the regression variables
Dependent variable ŷ = a+ bx
a = y - bx
X is the independent
Y-axis intercept
variable (years/months
etx)
ELECTRICAL ELECTRICAL
YEAR POWER DEMAND YEAR POWER DEMAND
1 74 5 105
2 79 6 142
3 80 7 122
4 90 8 ?
Least Squares Example
ELECTRICAL POWER
YEAR (x) DEMAND (y) x2 xy
1 74 1 74
2 79 4 158
3 80 9 240
4 90 16 360
5 105 25 525
6 142 36 852
7 122 49 854
Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063
x=
å x = 28 = 4 y=
å y = 692 = 98.86
n 7 n 7
Least Squares Example
å xy - nxy 3,063 - ( 7) ( 4) (98.86) 295
b= = POWER = = 10.54
DEMAND (y)140 - ( 7) ( 4 )
å x - nx
ELECTRICAL
2 2 2
YEAR (x) 2
x 28 xy
1 74 1 74
2
3
79
()
a = y - bx = 98.86 -10.54 4 = 56.70
80
4
9
158
240
4 90 16 360
5 105 ŷ = 56.70 +10.54x 25
Thus, 525
6 142 36 852
7 122 49 854
Σx = 28 Σy = 692 Σx2 = 140 Σxy = 3,063
x=
å x = in28year
Demand
=4
8
y=
å=y56.70
=
692+ 10.54(8)
= 98.86
n 7 n= 141.02,
7 or 141 megawatts
Least Squares Example
Trend line,
160 – y^ = 56.70 + 10.54x
150 –
Power demand (megawatts)
140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –
60 –
50 –
| | | | | | | | |
1 2 3 4 5 6 7 8 9
Year Figure 4.5
Least Squares Requirements
Formula:
r= n xy − x y
n x − ( x ) n y − ( y )
2 2 2 2
r= n xy − x y
n x − ( x ) n y − ( y )
2 2 2 2
The company now wants to know the strength of the association between area payroll (x) and sales (y).
Standard Error of the Estimate
• The forecast of $3,250,000 for Nodel’s sales in previous example is called a
point estimate of y. The point estimate is really the mean, or expected value,
of a distribution of possible values of sales. Figure illustrates this concept.
Standard Error of the Estimate
• To measure the accuracy of the regression estimates, we must
compute the standard error of the estimate, Sy, x.
• This computation is called the standard deviation of the regression:
• It measures the error from the dependent variable, y, to the regression
line, rather than to the mean
Adjusting Trend Data- Example
ŷseasonal = Index ´ ŷtrend forecast
Size of Cost of
Batch Batch
20 $1.4
30 3.4
40 4.1
50 3.8
70 6.7
80 6.6
100 7.8
120 10.4
150 11.7
•
7.0 •
•
•
3.5 • •
•
Size
25 50 75 100 125 150
Yes, this appears to be a reasonably linear fit.
c. x 2
y = 439.11 ; xy = 5,264
= 63,600 ; 2
e. It is estimated that each additional piece in a batch costs 0.0766 thousands of dollars, or
0.0766*1,000 = $76.60 each.
f. a = y − bx = 6.211−.0766( 73.333) = 0.5937.
g. Technically, producing a batch of zero pieces would cost 0.5937 thousands of dollars. In
reality, this is probably the cost of setting up to produce a batch, which would be estimated at
0.5937*1,000= $593.70.
y0 = a + bx = 593.70 + 76.60(125) = $10,168.70.
n ( xy ) − ( x y )
i. r=
n ( x 2 ) − ( x ) 2 • n ( y 2 ) − ( y ) 2
9(5264) − ( 660)(55.9)
= = 0.9854.
9 ( 63600) − ( 660) • 9( 439.11) − (55.9 )
2 2
This high value (close to the value 1.0) confirms the impression given by the scatterplot
and indicates a strong linear relationship.
Forecast Accuracy
• Forecasts will always deviate from actual values.
• Difference between forecasts and actual values are referred to
as forecast error.
• We would like forecast error to be as small as possible.
• If forecast error is large, either the technique being used is
the wrong one, or the parameters need adjusting.
MAD =
å Actual - Forecast
n
Mean Absolute Deviation 1 (1 of 8)
• MAD is the average absolute difference between the forecast and actual
demand.
• The most popular and simplest-to-use measures of forecast error.
• Formula:
Dt −Ft
MAD = n
Where
t = the period number
Dt = demand in period t
Ft = the forecast for period t
n = the total number of periods
Determining the MAD
ACTUAL
TONNAGE FORECAST WITH
QUARTER UNLOADED FORECAST WITH a = .10 a = .50
1 180 175 175
2 168 175.50 = 175.00 + .10(180 – 175) 177.50
3 159 174.75 = 175.50 + .10(168 – 175.50) 172.75
4 175 173.18 = 174.75 + .10(159 – 174.75) 165.88
5 190 173.36 = 173.18 + .10(175 – 173.18) 170.44
6 205 175.02 = 173.36 + .10(190 – 173.36) 180.22
7 180 178.02 = 175.02 + .10(205 – 175.02) 192.61
8 182 178.22 = 178.02 + .10(180 – 178.02) 186.30
9 ? 178.59 = 178.22 + .10(182 – 178.22) 184.15
Determining the MAD
ACTUAL FORECAST ABSOLUTE FORECAST ABSOLUTE
TONNAGE WITH DEVIATION WITH DEVIATION
QUARTER UNLOADED a = .10 FOR a = .10 a = .50 FOR a = .50
1 180 175 5.00 175 5.00
2 168 175.50 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
Sum of absolute deviations: 82.45 98.62
Σ|Deviations|
MAD = 10.31 12.33
n
Mean Absolute Deviation 1 (3 of 8)
Table 15.8 Computational values for MAD and error
Dt
t, comma, left parenthesis, alpha =
Ft , (α = .30)
0.30 right parenthesis.
sub t minus F sub t right parenthesis.
(Dt − Ft ) Dt − Ft
1 37 37.00 — —
2 40 37.00 3.00 3.00
3 41 37.90 3.10 3.10
4 37 38.83 −1.83 1.83
5 45 38.28 6.72 6.72
6 50 40.29 9.71 9.71
7 43 43.20 −0.20 0.20
Mean Absolute Deviation 1 (4 of 8)
vertical bar, D sub t minus F sub t,
Ft , (α = .30)
t, comma, left parenthesis, alpha =
(Dt − Ft )
sub t minus F sub t right parenthesis.
Dt − Ft
Dt 0.30 right parenthesis.
å( )
2
Forecast errors
MSE =
n
Determining the MSE
ACTUAL TONNAGE FORECAST FOR a =
QUARTER UNLOADED .10 (ERROR)2
1 180 175 52 = 25
2 168 175.50 (–7.5)2 = 56.25
å( )
2
Forecast errors
MSE = = 1,526.52 / 8 = 190.8
n
Common Measures of Error
Mean Absolute Percent Error (MAPE)
MAPE =
åabsolute percent error = 44.75% = 5.59%
n 8
Cumulative Error (1 of 2)
• Cumulative error is the sum of the forecast errors (E = et ).
• A relatively large positive value indicates the forecast is biased
low, a large negative value indicates the forecast is biased high.
• If the preponderance of errors are positive, the forecast is
consistently low; and vice versa.
• The cumulative error for a trend line is always almost zero, and is
therefore not a good measure for this method.
•
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
∑ |deviations|
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
MAD =
Tonnage with for with for
Quarter Unloaded
n
a = .10 a = .10 a = .50 a = .50
1 For a 180
= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 = 82.45/8
174.75 = 10.31
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For a 190
= .50 173.36 16.64 170.44 19.56
6 205 = 98.62/8
175.02 = 29.98
12.33 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error
∑ (forecast
Roundederrors) 2
Absolute Rounded Absolute
MSE =Tonnage
Actual Forecast Deviation Forecast Deviation
n
with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 For a 180
= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 =
159 1,526.54/8
174.75 = 190.82
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For a 190
= .50 173.36 16.64 170.44 19.56
6 205 175.02
= 1,561.91/8 = 29.98
195.24 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
Comparison of Forecast Error
n
∑100|deviation
Rounded i|/actualiRounded
Absolute Absolute
=Actual
MAPE Tonnage
i=1 Forecast
with
Deviation
for
Forecast
with
Deviation
for
Quarter Unloaded a = .10 n a = .10 a = .50 a = .50
1 For a
180= .10 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 = 44.75/8
174.75 = 5.59%
15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 For a
190= .50 173.36 16.64 170.44 19.56
6 205 175.02
= 54.05/8 =29.98
6.76% 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
Comparison of Forecast Error
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
1 180 175 5.00 175 5.00
2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
MAPE 5.59% 6.76%
Example