Chapter 2 Describing Data: Graphs and Tables

Download Report

Transcript Chapter 2 Describing Data: Graphs and Tables

Time Series Analysis
Introduction
Averaging
Trend
Seasonality
Lecture Objectives
You should be able to :
1. Discuss the advantages and limitations of time
series forecasting.
2. Use averaging, trend, and seasonality models
appropriately.
3. Interpret the Bias, MAD, MAPE and Standard
Error to evaluate a forecast.
Basic Forecasting Process



Look at the data (Graph)
Forecast (choose one or more methods)
Evaluate (examine errors)
Time Series Sales Data
Consider the following sales data for 10 time periods (quarters)
Sales
1
60
2
67
3
50
4
58
5
62
6
60
XYZ Corp. Sales
80
$ Thousand
Period
60
40
20
0
0
2
4
6
8
10
Quarter
7
55
8
62
9
71
10
65
What is a good forecast for Sales for
the next period?
12
Naive Forecast
Naive
Sales
Forecast
1
60
N/A
2
67
60
3
50
67
4
58
50
5
62
58
6
60
62
7
55
60
8
62
55
9
71
62
10
65
71
11
65
80
70
$ Thousand
Period
Actual Sales and Forecast
60
50
40
30
Sales
Forecast
20
10
0
1
2
3
4
5
6
7
8
Time Period
yˆt  yt 1
How good is this forecast?
9
10
Evaluating the Forecast
X
Period
Y
Naive
Sales
Forecast
Abs
Error
Error
Percent
Squared
Error
Error
y  yˆ
Bias = Avg (Errors)
1
60
2
67
60
7
7
10.45%
49.0
3
50
67
-17
17
34.00%
289.0
4
58
50
8
8
13.79%
64.0
5
62
58
4
4
6.45%
16.0
6
60
62
-2
2
3.33%
4.0
7
55
60
-5
5
9.09%
25.0
8
62
55
7
7
11.29%
49.0
9
71
62
9
9
12.68%
81.0
10
65
71
-6
6
9.23%
36.0
65
0.56
7.22
12.26%
68.1
BIAS
MAD
MAPE
MSE
Standard Error (Square Root of MSE) =
8.3
11
Error =
MAD = Avg (Abs
Errors)
MAPE = Avg (Percent
Errors)
MSE = Avg (Squared
Errors)
Moving Averages
Moving
Avg.
Period
Abs.
Error
Squared
Error
Error
Sales
Forecast
1
60
N/A
2
67
N/A
3
50
N/A
4
58
59.0
-1.0
1.0
1.72%
1.0
5
62
58.3
3.7
3.7
5.91%
13.4
6
60
56.7
3.3
3.3
5.56%
11.1
7
55
60.0
-5.0
5.0
9.09%
25.0
8
62
59.0
3.0
3.0
4.84%
9.0
9
71
59.0
12.0
12.0
16.90%
144.0
10
65
62.7
2.3
2.3
3.59%
5.4
66.0
2.62
4.33
6.80%
29.86
BIAS
MAD
MAPE
MSE
Standard Error (Square Root of MSE) =
5.5
11
Error
Percent
How does this
3-period
moving
average
forecast
compare to
the Naive
forecast?
Simple Exponential Smoothing
alpha=
0.3
Exponential
Period
Sales
Smoothing
1
60
N/A
2
67
3
Percent
Squared
Error
Abs. Error
Error
Error
60.0
7.0
7.0
10.45%
49.0
50
62.1
-12.1
12.1
24.20%
146.4
4
58
58.5
-0.5
0.5
0.81%
0.2
5
62
58.3
3.7
3.7
5.92%
13.5
6
60
59.4
0.6
0.6
0.95%
0.3
7
55
59.6
-4.6
4.6
8.37%
21.2
8
62
58.2
3.8
3.8
6.10%
14.3
9
71
59.4
11.6
11.6
16.40%
135.6
10
65
62.8
2.2
2.2
3.31%
4.6
63.5
1.29
5.11
8.50%
42.79
BIAS
MAD
MAPE
MSE
Standard Error (Square Root of MSE) =
6.5
Interpretation
Bias – indicates the direction of the errors. On average, is
the forecasting technique underestimating or
overestimating? Bias can be corrected.
MAD – The average magnitude of error.
MAPE – The average percent error. Error as a percent of
the actual values of y.
MSE – Mean Squared Error.
SE – Square root of MSE. This is the standard deviation of
the error terms. Useful for constructing confidence
intervals.
Questions
Can Bias be greater than MAD?
2. If we know the Bias, can we figure out the
MAD value?
3. Will Bias is lower for one technique than
another, will MAD also be lower?
1.
4.
Answer the above questions for MSE and
MAD instead of Bias and MAD.
Data with a Trend
Sales
1
60
2
88
3
50
4
111
5
135
6
90
7
150
8
149
9
200
10
190
XYZ Corp. Sales
Dollars 1000s
Period
300
200
100
0
0
1
2
3
4
5
6
7
8
Time period (Months)
9 10 11
Fitting a Trendline
y = 15.279x + 38.267
Dollars 1000s
XYZ Corp. Sales
2
R = 0.812
250
200
150
100
50
0
0
1
2
3
4
5
6
7
8
Time period (Months)
9
10 11
Regression Output
SUMMARY OUTPUT
Regression Statistics
Multiple R
0.901106096
R Square
0.811992197
Adjusted R Square
0.788491221
Standard Error
23.60928811
Observations
10
ANOVA
df
SS
MS
Regression
1
19258.9121
19258.9121
Residual
8
4459.1879
557.3985
Total
9
23718.1
Coefficients
Standard Error
t Stat
F
34.5514
P-value
Significance F
0.0004
Lower 95%
Intercept
38.2667
16.1282
2.3727
0.0451
1.0749
Period
15.2788
2.5993
5.8780
0.0004
9.2848
Seasonality
Sales (Y)
1
25
2
28
3
35
4
50
5
39
6
44
7
55
8
70
9
52
10
60
11
77
12
100
13
85
14
100
15
111
16
140
XYZ Inc. Sales
150
$ Million
Quarter
100
50
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16
Quarter
Is there a trend? Is there seasonality?
Deseasonalizing
Component Analysis for Sales (Y)
Multiplicative Model
Original Data
Detrended Data
150
Detr. Data
Data
1.2
100
50
1.0
0.8
6
9
Index
12
15
Seasonally Adjusted Data
Seas. A dj. Data
150
100
50
3
6
9
Index
12
15
3
Seas. A dj. and Detr. Data
3
6
9
Index
12
15
Seasonally Adj. and Detrended Data
10
0
-10
3
6
9
Index
12
15
Trend and Seasonally Adjusted
Forecasts
Time Series Decomposition Plot for Sales (Y)
Multiplicative Model
Variable
A ctual
Fits
Trend
140
120
Accuracy Measures
MA PE
8.3653
MA D
4.8125
MSD
31.6074
Sales (Y)
100
80
60
40
20
2
4
6
8
10
Index
12
14
16
Questions



How many seasons can there be in data?
How many seasonal cycles are needed to
determine if seasonality exists?
What does a seasonal index of 1.2 mean?