hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when...
Transcript of hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when...
![Page 1: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/1.jpg)
27.03.2014
1
QMT 3001 BUSINESS FORECASTING
1
Exploring Data Patterns&
A I d i F i T h iAn Introduction to Forecasting Techniques
Aysun KAPUCUGİL-İKİZ, PhD.
Forecasting 2
![Page 2: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/2.jpg)
27.03.2014
2
3
4
![Page 3: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/3.jpg)
27.03.2014
3
5
6
![Page 4: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/4.jpg)
27.03.2014
4
Time Series Data Patterns
7
The two steps in analyzing time series data are:(a) Graph the time series data
Horizontal (stationary) / Trend / Cyclical / Seasonal
(a) Graph the time series data The data should be graphed to visually see the type of pattern: is
the series progressively increasingor is it decreasing through time?
There are various graphing techniques available including scatter diagrams, line graphs, or bar graphs. You can choose the visual approach that is optimal for your data.
(b) Generate an autocorrelation function(b) Generate an autocorrelation function The pattern of the autocorrelations will usually help explain the
pattern of the data. The autocorrelation output will also provide you with statistical tests to determine if the autocorrelation is important(i.e., "significant" in statistical terms).
8
A stationary data series does not increaseor decrease overtime.
![Page 5: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/5.jpg)
27.03.2014
5
9
10
![Page 6: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/6.jpg)
27.03.2014
6
11
12
= observation in time period t
= observation at time period t-k
tY
ktY
![Page 7: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/7.jpg)
27.03.2014
7
13
14
![Page 8: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/8.jpg)
27.03.2014
8
15
16
![Page 9: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/9.jpg)
27.03.2014
9
17
Stat > Time Series > Autocorrelation
18
![Page 10: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/10.jpg)
27.03.2014
10
19
randomness
trend
20
seasonality
Is AC significant?
![Page 11: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/11.jpg)
27.03.2014
11
21
22
The standard error is the The standard error is the difference between a predicted value and the actual value for avariable. If the autocorrelation coefficient isdivided by the standard error, the outcome should be >2 for a significant outcome.
![Page 12: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/12.jpg)
27.03.2014
12
23
"Box-Ljung Statistic" (BLS) or modified Box-Pierce Q Statistic:o ju g S a s c ( S) o od ed o e ce Q S a s c:.05 or less of level of significance value of Box-Ljung, is desirable -this means the forecaster has a less than a 5% chance of being wrong in stating autocorrelation exists between two variables.
24
![Page 13: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/13.jpg)
27.03.2014
13
25
26
![Page 14: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/14.jpg)
27.03.2014
14
27
28
r1= 0.572
r2= 0.463
![Page 15: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/15.jpg)
27.03.2014
15
29
Differencing data is needed when forecasting two data patterns:1. Data with a trend.2. Data with a strong autocorrelation component at lag 1 (above 0.90), where the autocorrelation at subsequent lags diminishes slowly.
30
Differencing simply generates a new time series by subtracting the current value from the previous value for the entire original series.value from the previous value for the entire original series.
![Page 16: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/16.jpg)
27.03.2014
16
31
32
![Page 17: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/17.jpg)
27.03.2014
17
33
34
![Page 18: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/18.jpg)
27.03.2014
18
35
36
![Page 19: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/19.jpg)
27.03.2014
19
Examples37 Examples
Example:"Anna-Marie's Pools and Spas" is a chain of stores in Manitoba selling pools and pool supplies.
Anna-Marie is considering opening a new store in Saxon, Manitoba and has
38
approached you as an advisor.
She has a number of markets she is considering for her new store and wants to carefully examine each of these markets before making her selection.
She wants to know if this is a good year to open a new store in Saxon, or if she would be better advised to wait a few years.
She has asked you to examine the pattern of pool sales in Saxon in past years, using data on pool permits as a proxy for sales. Table shows this data for the last 15 years.
![Page 20: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/20.jpg)
27.03.2014
20
The first step is to graph this data over time.
39
The next step in the analysis is to generate the autocorrelation function, to see if the data is indeed random.
40
![Page 21: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/21.jpg)
27.03.2014
21
Correlogram41
Example:Table shows the number of houses under construction (housing starts) in July in Toronto for the period 1994 to 2004.
42
![Page 22: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/22.jpg)
27.03.2014
22
Scatter graph43
44
![Page 23: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/23.jpg)
27.03.2014
23
Housing under Construction in Toronto, Monthly, from January 1972 to May 2005(extended the housing data series back to 1972 and include all months, rather than just July.)
45
To illustrateTo illustrate a cyclical pattern
46
For forecasting purposes this indicates that the future values will dependon the last available level.However, using this approach to forecast cyclical time-series is problematic
When time series data changes by smallmargins from period to period, the bestapproach is to
problematic
ppexplore how the datamoves (e.g., the rate of change).
"differencing".
![Page 24: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/24.jpg)
27.03.2014
24
An example of differenced data for the firstfive rows of the Housing Under Construction database.
47
= 39455 - 41744
Differenced Data48
![Page 25: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/25.jpg)
27.03.2014
25
49
When is the best
50
Example:
time for the new home builder to hold open houses in order to time these with the
ddi k ?wedding market?
Table shows the number of marriages recorded in Canada from 1995 to 2004, on a quarterly basis (3 month intervals).
![Page 26: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/26.jpg)
27.03.2014
26
Side-by-side Bar Chart51
52
![Page 27: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/27.jpg)
27.03.2014
27
53
The optimal forecasting technique for anygiven situation depends on the nature ofavailable data and the decision to be madeor problem to be solved.
54
![Page 28: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/28.jpg)
27.03.2014
28
55
56
![Page 29: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/29.jpg)
27.03.2014
29
57
58
![Page 30: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/30.jpg)
27.03.2014
30
59
60
Other Factors for Choosing a Forecasting Technique: Level of Details.
Time horizon.
Based on judgment or data manipulation.
Management acceptance.
Cost.
![Page 31: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/31.jpg)
27.03.2014
31
Types of Forecasts
Forecasting Techniques
No single method is superior
MovingAverage
Exponential Smoothing
Time-Series Methods: include historical data over a time interval
DelphiMethods
Jury of ExecutiveOpinion
Qualitative Models: attempt to include subjective factors
Causal Methods: include a
variety of factors
Regression Analysis
Multiple Regression
Trend ProjectionsSales ForceComposite
ConsumerMarket Survey
Decomposition
General considerations for choosing the appropriate method
62
Method Uses ConsiderationsJ d C b d i h b f S bj i i bj hJudgment Can be used in the absence of
historical data (e.g. new product).Most helpful in medium- and long-term forecasts
Subjective estimates are subject to the biases and motives of estimators.
Causal Sophisticated methodVery good for medium- and long-term forecasts
Must have historical data.Relationships can be difficult to specifylong term forecasts specify
Time series Easy to implement Work well when the series is relatively stable
Rely exclusively on past data. Most useful for short-term estimates.
![Page 32: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/32.jpg)
27.03.2014
32
63
65
![Page 33: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/33.jpg)
27.03.2014
33
66
67
![Page 34: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/34.jpg)
27.03.2014
34
68
69
![Page 35: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/35.jpg)
27.03.2014
35
70
71
![Page 36: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/36.jpg)
27.03.2014
36
Example:Check the quality of forecast of the data on July Housing Under Construction
Compare two forecasts using:
d f h h l d
72
1. the second naïve forecast (which includes a difference term)
2. moving average method
The in-sample period will be 1994 to 2002, p p ,
the out-of-sample check will use the years 2003 and2004.
First step: Check the errors of the forecast for autocorrelation.
73
![Page 37: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/37.jpg)
27.03.2014
37
Results for the naïve forecast74
Results for the moving average forecast75
![Page 38: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/38.jpg)
27.03.2014
38
Results for the moving average forecast76
Second step: Check the errors for 2003 and 2004 and test which forecast produces a more accurate result.
77
![Page 39: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/39.jpg)
27.03.2014
39
the "in-sample" test78
the "out-of-sample" test79
![Page 40: hanke chp 3 - WordPress.com · Exploring Data Patterns & ... Differencing data is needed when forecasting two data patterns: 1. Data with a trend. 2. Data with a strong autocorrelation](https://reader035.fdocuments.us/reader035/viewer/2022081516/5fd71dee49fd5565400ed18e/html5/thumbnails/40.jpg)
27.03.2014
40
80
The out-of-sample test confirms the results of the in-sample test.
The error measures are all much larger for the moving average forecast
than they are for the naïve forecast.
This confirms that the naïve forecast is superior for short-term forecasts
for this data.
REFERENCES
Business Forecasting. John E. Hanke and Dean W. Wichern 9th Edition Pearson Ed cation 2009
82
Wichern, 9th Edition, Pearson Education, 2009.