2. Time-Series Forecasting
Decomposition of a Time Series
Naive Approach
Moving Averages
Exponential Smoothing
Exponential Smoothing with Trend
Adjustment
Trend Projections
Seasonal Variations in Data
Cyclical Variations in Data
3. Types of Forecasts
• Economic forecasts
– Address business cycle – inflation rate,
money supply, housing starts, etc.
• Technological forecasts
– Predict rate of technological progress
– Impacts development of new products
• Demand forecasts
– Predict sales of existing products and
services
4. Seven Steps in Forecasting
• Determine the use of the forecast
• Select the items to be forecasted
• Determine the time horizon of the
forecast
• Select the forecasting model(s)
• Gather the data
• Make the forecast
• Validate and implement results
5. Overview of Quantitative
Approaches
• Naive approach
• Moving averages
• Exponential smoothing
• Trend projection
• Linear regression
Time-Series
Models
Associative
Model
6. Time Series Forecasting
• Set of evenly spaced numerical
data
– Obtained by observing response
variable at regular time periods
• Forecast based only on past values,
no other variables important
– Assumes that factors influencing past
and present will continue influence in
future
9. Trend Component
• Persistent, overall upward or
downward pattern
• Changes due to population,
technology, age, culture, etc.
• Typically several years duration
10. Seasonal Component
• Regular pattern of up and down
fluctuations
• Due to weather, customs, etc.
• Occurs within a single year
Number of
Period Length Seasons
Week Day 7
Month Week 4-4.5
Month Day 28-31
Year Quarter 4
Year Month 12
Year Week 52
11. Cyclical Component
• Repeating up and down movements
• Affected by business cycle, political,
and economic factors
• Multiple years duration
• Often causal or
associative
relationships
0 5 10 15 20
12. Random Component
• Erratic, unsystematic, ‘residual’
fluctuations
• Due to random variation or
unforeseen events
• Short duration and
nonrepeating
M T W T F
13. Naive Approach
Assumes demand in next
period is the same as
demand in most recent period
e.g., If January sales were 68, then
February sales will be 68
Sometimes cost effective and
efficient
Can be good starting point
14. Moving Average Method
• MA is a series of arithmetic means
• Used if little or no trend
• Used often for smoothing
– Provides overall impression of data
over time
Moving average =
∑ demand in previous n periods
n
15. January 10
February 12
March 13
April 16
May 19
June 23
July 26
Actual 3-Month
Month Shed Sales Moving Average
(12 + 13 + 16)/3 = 13 2/3
(13 + 16 + 19)/3 = 16
(16 + 19 + 23)/3 = 19 1/3
Moving Average Example
10
12
13
(10 + 12 + 13)/3 = 11 2/3
16. Graph of Moving Average
| | | | | | | | | | | |
J F M A M J J A S O N D
Shed
Sales
30 –
28 –
26 –
24 –
22 –
20 –
18 –
16 –
14 –
12 –
10 –
Actual
Sales
Moving
Average
Forecast
17. Weighted Moving Average
• Used when trend is present
– Older data usually less important
• Weights based on experience and
intuition
Weighted
moving average =
∑ (weight for period n)
x (demand in period n)
∑ weights
18. January 10
February 12
March 13
April 16
May 19
June 23
July 26
Actual 3-Month Weighted
Month Shed Sales Moving Average
[(3 x 16) + (2 x 13) + (12)]/6 = 141/3
[(3 x 19) + (2 x 16) + (13)]/6 = 17
[(3 x 23) + (2 x 19) + (16)]/6 = 201/2
Weighted Moving Average
10
12
13
[(3 x 13) + (2 x 12) + (10)]/6 = 121/6
Weights Applied Period
3 Last month
2 Two months ago
1 Three months ago
6 Sum of weights
19. Potential Problems With
Moving Average
• Increasing n smooths the forecast
but makes it less sensitive to
changes
• Do not forecast trends well
• Require extensive historical data
20. Moving Average And
Weighted Moving Average
30 –
25 –
20 –
15 –
10 –
5 –
Sales
demand
| | | | | | | | | | | |
J F M A M J J A S O N D
Actual
sales
Moving
average
Weighted
moving
average
Figure 4.2
21. 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
22. Exponential Smoothing
New forecast = Last period’s forecast
+ a (Last period’s actual demand
– Last period’s forecast)
Ft = Ft – 1 + a(At – 1 - Ft – 1)
where Ft = new forecast
Ft – 1 = previous forecast
a = smoothing (or weighting)
constant (0 ≤ a ≤ 1)
26. Effect of
Smoothing Constants
Weight Assigned to
Most 2nd Most 3rd Most 4th Most 5th Most
Recent Recent Recent Recent Recent
Smoothing Period Period Period Period Period
Constant (a) a(1 - a) a(1 - a)2 a(1 - a)3 a(1 - a)4
a = .1 .1 .09 .081 .073 .066
a = .5 .5 .25 .125 .063 .031
27. Impact of Different a
225 –
200 –
175 –
150 – | | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Demand
a = .1
Actual
demand
a = .5
28. Impact of Different a
225 –
200 –
175 –
150 – | | | | | | | | |
1 2 3 4 5 6 7 8 9
Quarter
Demand
a = .1
Actual
demand
a = .5
Chose high values of a
when underlying average
is likely to change
Choose low values of a
when underlying average
is stable
29. Choosing a
The objective is to obtain the most
accurate forecast no matter the
technique
We generally do this by selecting the
model that gives us the lowest forecast
error
Forecast error = Actual demand - Forecast value
= At - Ft
30. Common Measures of Error
Mean Absolute Deviation (MAD)
MAD =
∑ |Actual - Forecast|
n
Mean Squared Error (MSE)
MSE =
∑ (Forecast Errors)2
n
31. Common Measures of Error
Mean Absolute Percent Error (MAPE)
MAPE =
∑100|Actuali - Forecasti|/Actuali
n
n
i = 1
32. 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
33. 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 =
∑ |deviations|
n
= 82.45/8 = 10.31
For a = .10
= 98.62/8 = 12.33
For a = .50
34. 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
= 1,526.54/8 = 190.82
For a = .10
= 1,561.91/8 = 195.24
For a = .50
MSE =
∑ (forecast errors)2
n
35. 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
= 44.75/8 = 5.59%
For a = .10
= 54.05/8 = 6.76%
For a = .50
MAPE =
∑100|deviationi|/actuali
n
n
i = 1
36. 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%
37. Least Squares Method
Time period
Values
of
Dependent
Variable
Deviation1
(error)
Deviation5
Deviation7
Deviation2
Deviation6
Deviation4
Deviation3
Actual observation
(y value)
Trend line, y = a + bx
^
38. Least Squares Method
Time period
Values
of
Dependent
Variable
Deviation1
Deviation5
Deviation7
Deviation2
Deviation6
Deviation4
Deviation3
Actual observation
(y value)
Trend line, y = a + bx
^
Least squares method
minimizes the sum of the
squared errors (deviations)
43. Seasonal Variations In Data
The multiplicative
seasonal model
can adjust trend
data for seasonal
variations in
demand
44. Seasonal Variations In Data
1. Find average historical demand for each
season
2. Compute the average demand over all
seasons
3. Compute a seasonal index for each season
4. Estimate next year’s total demand
5. Divide this estimate of total demand by the
number of seasons, then multiply it by the
seasonal index for that season
Steps in the process:
45. Seasonal Index Example
Jan 80 85 105 90 94
Feb 70 85 85 80 94
Mar 80 93 82 85 94
Apr 90 95 115 100 94
May 113 125 131 123 94
Jun 110 115 120 115 94
Jul 100 102 113 105 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 72 83 80 94
Dec 82 78 80 80 94
Demand Average Average Seasonal
Month 2005 2006 2007 2005-2007 Monthly Index
46. Seasonal Index Example
Jan 80 85 105 90 94
Feb 70 85 85 80 94
Mar 80 93 82 85 94
Apr 90 95 115 100 94
May 113 125 131 123 94
Jun 110 115 120 115 94
Jul 100 102 113 105 94
Aug 88 102 110 100 94
Sept 85 90 95 90 94
Oct 77 78 85 80 94
Nov 75 72 83 80 94
Dec 82 78 80 80 94
Demand Average Average Seasonal
Month 2005 2006 2007 2005-2007 Monthly Index
0.957
Seasonal index =
average 2005-2007 monthly demand
average monthly demand
= 90/94 = .957
47. Seasonal Index Example
Jan 80 85 105 90 94 0.957
Feb 70 85 85 80 94 0.851
Mar 80 93 82 85 94 0.904
Apr 90 95 115 100 94 1.064
May 113 125 131 123 94 1.309
Jun 110 115 120 115 94 1.223
Jul 100 102 113 105 94 1.117
Aug 88 102 110 100 94 1.064
Sept 85 90 95 90 94 0.957
Oct 77 78 85 80 94 0.851
Nov 75 72 83 80 94 0.851
Dec 82 78 80 80 94 0.851
Demand Average Average Seasonal
Month 2005 2006 2007 2005-2007 Monthly Index
48. Seasonal Index Example
Jan 80 85 105 90 94 0.957
Feb 70 85 85 80 94 0.851
Mar 80 93 82 85 94 0.904
Apr 90 95 115 100 94 1.064
May 113 125 131 123 94 1.309
Jun 110 115 120 115 94 1.223
Jul 100 102 113 105 94 1.117
Aug 88 102 110 100 94 1.064
Sept 85 90 95 90 94 0.957
Oct 77 78 85 80 94 0.851
Nov 75 72 83 80 94 0.851
Dec 82 78 80 80 94 0.851
Demand Average Average Seasonal
Month 2005 2006 2007 2005-2007 Monthly Index
Expected annual demand = 1,200
Jan x .957 = 96
1,200
12
Feb x .851 = 85
1,200
12
Forecast for 2008
49. Seasonal Index Example
140 –
130 –
120 –
110 –
100 –
90 –
80 –
70 –
| | | | | | | | | | | |
J F M A M J J A S O N D
Time
Demand
2008 Forecast
2007 Demand
2006 Demand
2005 Demand