Forecasting forecast,
especially in
regards to the
future.
MGS3100
Julie Liggett De Jong
1
Insurance companies’ investment Service industries’ forecasts of
decisions in mortgages and bonds demand as input for revenue
management
FEATURES
• Regression
• Solver
• Sorting
FUNCTIONS
• SUMPRODUCT( )
• SUMXMY2( )
• YEAR( ) Quantitative vs Qualitative
• MONTH( )
• RIGHT( )
Forecasting Models
2
Quantitative Forecasting Models
3. Exponential Smoothing
a. Basic model
b. Holt’s Model (exponential smoothing with trend)
Based on an amazing quantity of data
4. Seasonality
Important Variables
X Independent variable(s)
3
Independent and dependent We must know the values of the
variables must share a relationship independent variables when we
make the forecast
Curve Fitting
Self Service Gas Stations
Oil company wants to expand its We’ll use historical data for five
network of self-service gas stations stations to calculate average traffic
flow and sales
4
Sales & Traffic Data
300 300
250 250
200 200
y = a + bx
S ales /hour ($)
150 150
100 100
50 50
- -
0 50 100 150 200 250 0 50 100 150 200 250
Cars/hour Cars/hour
Figure 2, p274 Figure 3, p275
Use Regression to fit a Linear Function Regression computes three types of errors
n
^ –
RSS = Σ
i=1
(Yi – Y )2 Regression
n
^
ESS = Σ
i=1
(Yi – Yi )2 Residual
n
TSS = Σ
i=1
–
(Yi – Y )2 Total
RSS
R2 =
Figure 5, p277 TSS
5
Should we build a gas station at ^
y = a + b * x
Buffalo Grove where traffic is 183 Sales/hour = 57.104 + 0.92997 * 183 cars/hr
cars/hour? = $227.29
How confident are we in this Confidence intervals use the following statistics:
forecast? 1.00 =68% 1.96 = 95.0% 3.00 = 99.7%
n
^
Σ
Yˆ
+ (Yi – Yi )2 ESS
- 2 * Standard Error (Se) Se = i=1 =
n – k -1 n – k -1
6
Excel calculates the Standard Error The 95% confidence interval is:
for us. [227.29 – 2(44.18); 227.29 + 2(44.18)]
[$138.93; $315.65]
Fitting a Quadratic
Function
300
250
200
Sales/hour ($)
y = a0 + a1x + a2x2
150
100
50
-
0 50 100 150 200 250
Cars/hour
Figure 10, p283 y = a0 + a1x + a2x2 Figure 7, p281
7
We could create a formula that exactly But, why wouldn’t we want to do that?
passes through every data point…..
8
Sum of Squared Errors Regression: SSE = 5854
MSE = Quadratic: SSE = 4954
(# of points – # of parameters)
140 140
120 120
y = 5x + 5 y = -5x + 135
100 100
Customers
80 80
Profit
40
60
40
0
20
11
13
15
17
19
21
23
25
1
9
11
13
15
17
19
21
23
25
1
Time Time
9
2. Moving Averages (Naive) 3. Exponential Smoothing
a) Simple n-Period Moving Avg a) Basic model
b) Weighted n-Period Moving Avg b) Holt’s Model (trend)
Curve Fitting
Seasonality
Plot historical values as function of
time and draw a linear “trend line”.
Use trend line to predict future
value.
10
Moving Averages: Simple n-Period Moving Averages:
y + y + y + y
yˆ = 15 14 13 12
16 4 Table 1, p290
THREE-MONTH FOUR-MONTH
ACTUAL SIMPLE MOVING SIMPLE MOVING
∑
SALES AVERAGE ABSOLUTE AVERAGE ABSOLUTE
actual sales − forecast sales MONTH ($000s) FORECAST ERROR FORECAST ERROR
MAD =
all forecasts Jan. 20
Feb. 24
number of forecasts
Mar. 27
Apr. 31 $ 23.67 7.33
May 37 $ 27.33 9.67 $ 25.50 11.50
June 47 $ 31.67 15.33 $ 29.75 17.25
July 53 $ 38.33 14.67 $ 35.50 17.50
actual sales − forecast sales
∑
all forecasts
actual sales
∗ 100 % Aug.
Sep.
62
54
$
$
45.67
54.00
16.33
0.00
$
$
42.00
49.75
20.00
4.25
MAPE = Oct. 36 $ 56.33 20.33 $ 54.00 18.00
number of forecasts Nov. 32 $ 50.67 18.67 $ 51.25 19.25
Dec. 29 $ 40.67 11.67 $ 46.00 17.00
11
Simple n-Period Moving Average Philosophical Shortcoming
forecasting models have two Most recent observations receive no
shortcomings more weight or importance than
older observations.
12
Constraints: Constraints:
alpha2 = 0.167 Month Actual Sales (000) 3month WMA Fcst Absolute Error
alpha1 = 0.333 January 20
alpha0 = 0.500 February 24
SUM OF WTS= 1.00 March 27
April 31 24.83 6.17
May 37 28.50 8.50
June 47 33.33 13.67
July 53 41.00 12.00
August 62 48.33 13.67
September 54 56.50 2.50
October 36 56.50 20.50
Constraints: November
December
32
29
46.34
37.01
14.34
8.01
Sum = 99.35
MAD = 11.04
13
Exponential Smoothing Exponential Smoothing
Forecast for t + 1 Observed in t Forecast for t
ŷ t +1 = αy t + (1 − α )ŷ t
alpha = 0.500 Month Actual Sales (000) Fcst Sales Absolute Error
Resolves operational shortcoming of the January 20 20.00
February 24 20.00 4.00
Moving Averages Model: March 27 22.00 5.00
April 31 24.50 6.50
May 37 27.75 9.25
June 47 32.38 14.63
Number of 8-period Moving Exponential July 53 39.69 13.31
Inventory Items Average Model Smoothing August 62 46.34 15.66
September 54 54.17 0.17
to Forecast Model
October 36 54.09 18.09
5,000 40,000: 10,001: November 32 45.04 13.04
December 29 38.52 9.52
5,000 * 8
5,000 ŷ t Sum = 109.17
5,000 y t MAD = 9.92
1α
Saving alpha and the last forecasts stores all the previous forecasts.
Does exponential smoothing
When t = 1, the expression becomes:
produce a better forecast?
ŷ t +1 = αy t + (1 − α )ŷ t ŷ 2 = αy t + (1 − α )ŷ t
2
y t-2 α(1-α) 0.081 0.147 0.125 2
3
y t-3 α(1-α) 0.07290 0.10290 0.06250 1 Response to a Unit Change in y t
yt 1
4
y t-4 α(1-α) 0.06561 0.07203 0.03125 1.2
1.1
0
5 1
y t-5 α(1-α) 0.05905 0.05042 0.01563 -1
0.9
0.8
6 94 95 96 97 98 99 100 101 102 103
α(1-α)
0.7
y t-6 0.05314 0.03529 0.00781 0.6
0.5
t
7
α(1-α)
0.4
y t-7 0.04783 0.02471 0.00391 0.3
0.2
8
α(1-α)
0.1
y t-8 0.04305 0.01729 0.00195 0
100 105 110 115 120 125
9
y t-9 α(1-α) 0.03874 0.01211 0.00098 t
10
y t-10 α(1-α) 0.03487 0.00847 0.00049
Sum of the Weights 0.68619 0.98023 0.99951
14
Case 2: Response to Steady Change Case 2: Response to Steady Change
yt 6 yt 6
5 5
4 4
3 3
2 2
1 1
0 0
0 2 4 6 8 10 0 2 4 6 8 10
t t
Exponential smoothing is not a good But the model can be adjusted (Holt’s
forecasting tool in a rapidly growing or a model / exponential smoothing w/trend)
declining market.
Seasonal Pattern in y t
1.5
1.3
1.1
0.9
0.7
yt
0.5
0.3
0.1
-0.1
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Seasonality
Exponential smoothing is not a good
model to use here because it ignores the
seasonal pattern.
Takes into consideration and adjusts 1. Look at original data to see seasonal
for the seasonal patterns in data pattern. Examine the data &
hypothesize an m-period seasonal
pattern.
15
2. Deseasonalize the Data 3. Forecast using deseasonalized data
2,000 2,000.0
Coal (000 Tons)
1,500.0
1,500
1,000.0
1,000
500.0
500 -
1- 1- 1- 1- 2- 2- 2- 2- 3- 3- 3- 3- 4- 4- 4- 4- 5- 5- 5- 5- 6- 6- 6- 6- 7- 7- 7- 7- 8- 8- 8- 8- 9- 9- 9- 9-
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
0
Tim e (Year & Qtr)
1-1
1-3
2-1
2-3
3-1
3-3
4-1
4-3
5-1
5-3
6-1
6-3
7-1
7-3
8-1
8-3
9-1
9-3
16
2.Deseasonalize the Data Time Coal 4 Period
Year-Qtr Receipts Moving Average
1-1 2,159 -----
1-2 1,203 -----
a) Calculate a series of m-period moving 1-3 1,094 1,613
1-4 1,996 1,594
averages, where m is the length of the 2-1 2,081 1,626
2-2 1,332 1,721
seasonal pattern. 2-3 1,476 1,856
2-4 (2,159+1,203+1,094+1,996)/4
2,533 1,898 = 1,613
b) Center the moving average in the middle of 3-1 2,249 1,948
the data from which it was calculated. 3-2
3-3
1,533
1,935
2,063
2,060
c) Divide the actual data at a given point in the 3-4
4-1
2,523
2,208
2,050
2,066
series by the centered moving average
corresponding to the same point. a) Calculate a series of m-period moving
d) Develop seasonal index averages, where m is the length of the
e) Divide actual data by the seasonal index
seasonal pattern.
Figure 28, p304
1,000
3-2 1,533 2,063 2,061
3-3 1,935 2,060 2,055
3-4 2,523 2,050 2,058 500
4-1 2,208 2,066 2,064
4-2 1,597 2,061 2,087 0
4-3 1,917 2,112 2,163 1- 1- 1- 1- 2- 2- 2- 2- 3- 3- 3- 3- 4- 4- 4- 4- 5- 5- 5- 5- 6- 6- 6- 6- 7- 7- 7- 7- 8- 8- 8- 8- 9- 9- 9- 9-
4-4 2,726 2,213 2,255 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
b) Center the moving average in the b) Center the moving average in the
middle of the data from which it was middle of the data from which it was
calculated. calculated.
Figure 28, p304 Figure 29, p305
Ti m e C o al 4 P e ri o d C e n te r ed Ra t i o o f C o al R ec e ip t s t o S e as o n al
Y e ar - Q tr R ec e i pt s Mo v i ng A ve r a ge M o vi n g A v er a g e C e n te r ed M ov i n g A v er a ge I n di c e s
Time Coal 4 Period Centered Ratio of Coal Receipts to
1-1 2,159 1.112
Year-Qtr Receipts Moving Average Moving Average Centered Moving Average 1-2 1,203 0.786
1-1 2,159 1-3 1,094 1,613 1,603 0.682 0.863
1-2 1,203 1-4 1,996 1,594 1,610 1.240 1.238
1-3 1,094 1,613 1,603 0.682 2-1 2,081 1,626 1,674 1.244 1.112
1-4 1,996 1,594 1,610 1.240 2-2 1,332 1,721 1,788 0.745 0.786
2-1 2,081 1,626 1,674 1.244 2-3 1,476 1,856 1,877 0.787 0.863
2-2 1,332 1,721 1,788 0.745 2-4 2,533 1,898 1,923 1.317 1.238
2-3 1,476 1,856 1,877 1,094 / 1,603 = 0.682
0.787 3-1 2,249 1,948 2,005 1.122 1.112
3-2 1,533 2,063 2,061 0.744 0.786
2-4 2,533 1,898 1,923 1.317
3-3 1,935 2,060 2,055 0.942 0.863
3-1 2,249 1,948 2,005 1.122 3-4 2,523 2,050 2,058 1.226 1.238
3-2 1,533 2,063 2,061 0.744
3-3 1,935 2,060 2,055 0.942
3-4 2,523 2,050 2,058 1.226
d) Develop seasonal index for each
quarter
• Group ratios by quarter
c) Divide the actual data at a given point • Average all of the ratios to moving
in the series by the centered moving averages quarter by quarter
average corresponding to the same • Add Seasonal Indices data to table
point. Figure 28, p304 • Normalize the seasonal index
17
Deseasonalized Data
3,000.0
2,500.0
1
3
1
3
1
3
1
3
1
3
1
3
1
3
1
3
1
3
1-
1-
2-
2-
3-
3-
4-
4-
5-
5-
6-
6-
7-
7-
8-
8-
9-
9-
3-4 2,523 2,050 2,058 1.226 1.238 2,037.5
Tim e (Ye ar & Qtr)
e) Divide actual data by the seasonal e) Divide actual data by the seasonal
index index
Time Coal 4 Period Centered Ratio of Coal Receipts to Seasonal Deseasonalized Seasonalize
Time Coal 4 Period Centered Ratio of Coal Receipts to Seasonal Deseasonalized Year-Qtr Receipts Moving Average Moving Average Centered Moving Average Indices Data Forecast Forecast
Year-Qtr Receipts Moving Average Moving Average Centered Moving Average Indices Data Forecast 1-1 2,159 ----- ----- ----- 1.108 1,948.1 1,948.1 2,159.000
1-1 2,159 1.108 1,948.1 1,948.1 1-2 1,203 ----- ----- ----- 0.784 1,535.4 1,948.1 1,526.409
1-2 1,203 0.784 1,535.4 1,948.1 1-3 1,094 1,613 1,603 0.682 0.860 1,272.3 1,678.5 1,443.212
1-4 1,996 1,594 1,610 1.240 1.234 1,617.8 1,413.1 1,743.439
1-3 1,094 1,613 1,603 0.682 0.860 1,272.3 1,678.5
2-1 2,081 1,626 1,674 1.244 1.108 1,877.8 1,546.8 1,714.276
1-4 1,996 1,594 1,610 1.240 1.234 1,617.8 1,413.1
2-2 1,332 1,721 1,788 0.745 0.784 1,700.0 1,763.0 1,381.390
2-1 2,081 1,626 1,674 1.244 1.108 1,877.8 1,546.8 2-3 1,476 1,856 1,877 0.787 0.860 1,716.6 1,721.9 1,480.540
2-2 1,332 1,721 1,788 0.745 0.784 1,700.0 1,763.0 2-4 2,533 1,898 1,923 1.317 1.234 2,053.1 1,718.4 2,120.128
2-3 1,476 1,856 1,877 0.787 0.860 1,716.6 1,721.9 3-1 2,249 1,948 2,005 1.122 1.108 2,029.3 1,937.1 2,146.723
2-4 2,533 1,898 1,923 1.317 1.234 2,053.1 1,718.4 3-2 1,533 2,063 2,061 0.744 0.784 1,956.5 1,997.4 1,564.974
3-1 2,249 1,948 2,005 1.122 1.108 2,029.3 1,937.1 3-3 1,935 2,060 2,055 0.942 0.860 2,250.4 1,970.7 1,694.495
3-2 1,533 2,063 2,061 0.744 0.784 1,956.5 1,997.4 3-4 2,523 2,050 2,058 1.226 1.234 2,045.0 2,153.4 2,656.854
3-3 1,935 2,060 2,055 0.942 0.860 2,250.4 1,970.7
3-4 2,523 2,050 2,058 1.226 1.234 2,045.0 2,153.4
Actual & Forecast 1. Look at original data to see seasonal pattern. Examine the
data & hypothesize an m-period seasonal pattern.
3,500
3,000
2. Deseasonalize the data.
Coal (000 Tons)
2,500
2,000
a) Calculate a series of m-period moving averages, where m
1,500
is the length of the seasonal pattern.
1,000
b) Center the moving average in the middle of the data from
500
0
Coal Receipts which it was calculated.
Seasonalized Forecast
1- 1- 1- 1- 2- 2- 2- 2- 3- 3- 3- 3- 4- 4- 4- 4- 5- 5- 5- 5- 6- 6- 6- 6- 7- 7- 7- 7- 8- 8- 8- 8- 9- 9- 9- 9- 1 1
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 0- 0-
c) Divide the actual data at a given point in the series by the
1 2
centered moving average corresponding to the same point.
Year-Quarter
d) Develop seasonal index
e) Divide actual data by the seasonal index
4. Reseasonalize the forecast to account for
3. Forecast method in deseasonalized terms.
the seasonal pattern
4. Reseasonalize the forecast to account for the seasonal
pattern.
18
SUMXMY2( ) Measures of Comparison
∑ actual sales − forecast sales
Returns the sum of squares of differences of
MAD =
all forecasts
corresponding values in two arrays. number of forecasts
Syntax: SUMXMY2(array_x,array_y), where
Array_x is the first array or range of values.
actual sales − forecast sales
Array_y is the second array or range of values.
∑ actual sales
∗ 100 %
MAPE =
all forecasts
The equation for the sum of squared differences is: number of forecasts
∑ (x − y )2
n
Create the model with a portion of the Use remaining data to see how well
historical data. the model would have performed.
19
Qualitative Expert
Forecasting Judgment
Models
Consensus Delphi
Panel Method
Coordinator receives
Individual forecasts
Delphi
Method
Coordinator determines
(a) Median response
(b) Range of middle
50% of answers
20
Market Research
21