Download CHAPTER 15: TIME SERIES FORECASTING

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Regression analysis wikipedia , lookup

Linear regression wikipedia , lookup

Least squares wikipedia , lookup

Choice modelling wikipedia , lookup

Coefficient of determination wikipedia , lookup

Data assimilation wikipedia , lookup

Transcript
CHAPTER 15: TIME SERIES FORECASTING
“640K ought to be enough for anybody.”
- Bill Gates, 1981
Forecasting: The process of predicting what the future will be like.
Quantitative forecasting:
1) Historical data relating to the data to be forecast exist
2) The historical data can be quantified
3) One can assume that the historical pattern will continue into the future
Forecasting Techniques:
1) Qualitative Models, e.g. Delphi method, and consumer market survey
2) Time Series Method, e.g. moving average, and exponential smoothing
3) Causal Modeling, e.g. regression analysis.
Time series is a set of observations measured over successive periods in time.
Components of a time series:
 Trend: Long term general direction of a time series
 Cyclical: Recurring movements around trend levels, regularly leading to a peak, followed by
recession, succeeded by trough and ending with a recovery.
E.g. business cycles (contractions and expansions) are fluctuations in economic activity that are
not of fixed duration.
 Seasonal: Periodic patterns or short term fluctuations, e.g. daily traffic volume
 Irregular: Random disturbances or erratic movements in the time series.
Additive Model: y = Tr + Cl + Sn + Ir when deviations of the seasonal component from the
trend are not proportional to the magnitude of the data values.
Multiplicative model: y = Tr*Cl*Sn*Ir
when seasonal deviations from the trend
increase as data values increase in magnitude.
A stable time series has no trend, cyclical or seasonal component (changes slowly over time).
To forecast such a time series use a data-smoothing technique such as:
 Moving average:
Averages previous n observations, where n is the length of the cycle. (n < 7)
Centered moving average: Averages n (odd) observations centered at year of interest.
The prediction is based only on the last n observations.
Example 1: Quarterly gasoline sales (in thousands of gallons) for the last 3 years are:
Time 1
2
3
4
5
6
7
8
9
10
11
12
Sales 18
56
82
27
41
69
49
66
54
42
90
66
Calculate the three quarter moving average and graph them along with the actual sales. Predict
sales for the 13th time period.
 Exponential smoothing:
Weights recent data most heavily (weights for successively older data declines exponentially).
St = wYt + (1-w)St-1
S0= Y1 or the average of the initial (6) values in the time series can be used.
St is the forecast for any future value of the time series.
If the time series has substantial random variability, pick a small value for the smoothing
constant w, to avoid over -reaction. e.g. if w = 0.01, equal weight is given to the most recent
observation and to values observed ten periods earlier. If the series has little random variability,
pick a large value of w to allow quick adjustments in the forecast. e.g. if w = 0.75, values
collected more than six periods earlier have no weight. If w close to 1 gives the best results, trend
or seasonality may be present.
In general choose close to 0 for smoothing and close to 1 for forecasting.Note: Damping
factor in Excel is the complement of the smoothing factor w.
Example 2: Apply exponential smoothing to the gasoline sales data with w = 0.2 and w = 0.7.
Plot the three series and predict sales for the 13th time period.
Trend: For long term planning and decision making:
Simple linear regression: Y = b0 + b1 t
Curvilinear or polynomial: Y = b0 + b1t + b2 t2
Exponential trend: Y = b0b1t where log(b1) is the growth rate.
Example 3: The safety manager wants to identify the long-term trend of accidents. She also
seeks to forecast the level of accidents that would occur in future years if the historical pattern
continues. She has data for the past ten years of operation.
Year
1
2
3
4
5
6
7
8
9
10
Accidents 370
330
280
350
300
170
180
150
200
50
Example 4: Annual trend line for civilian employment (in millions) with the base year of 1978 is:
Y = 95.35 + 1.68 X
To get quarterly trend values, new slope is 1.68 / 4 = 0.42 and new intercept is 95.35 - 1.5 (0.42)
To get monthly trend values, new slope is 1.68 / 12 = 0.14 and new intercept is 95.35 - 5.5 (0.14)
Example 5: Data on annual sales (in millions) for Ford Motor Company for 1982 to 1990 are
given below:
Year 1982
1983
1984
1985
1986
1987
1988
1989
1990
Sales 37067.2 44454.6 52366.4 52774.4 62868.3 72797.2 82193 82879.4 81844
Calculate the annual growth rate of Ford’s sales.
Seasonal Component:
Use dummy variables to incorporate constant seasonal effects along with the trend line.
Example 6: Data on hotel occupancy rates by quarter gave rise to the following regression
equation:
Rate = 0.555 + 0.00504t + 0.0035Q1 + 0.139Q2 + 0.205Q3
(3.35)
(0.14)
(5.74)
(8.51)
The numbers in parentheses below the coefficients are their t-values.
R2 = 88.9% and F = 30.12
Use the model to forecast the occupancy rate in the 21st time period if it is the first quarter.
Auto-regressive models: (if autocorrelation exists)
Order 1: Yi = b0 + b1 Yi-1
Example 7: Data on income (in thousands) on a certain property is given below. Build an autoregressive model of order 1. Compare it to an autoregressive model of order 2.
Time
1
2
3
4
5
6
7
8
9
10
Income 13
8
15
4
4
12
11
7
14
12
Evaluating forecasts:
 R2: Use parsimony principle
 Mean Squared Errors (MSE): penalizes large residuals
E.g.: If predicting the inventory level of an expensive product, large error is disastrous.
 Mean absolute deviation (MAD): overlooks isolated severe misses, as long as general
tracking is close.
 Mean absolute relative predictive error: |e| / y
Overview of forecasting approaches:
Methodology
Organization
Exponential smoothing
Low level management
Trend analysis
Middle management
Delphi
Upper management
Time frame
Short range estimate
Medium range estimate
Long range estimate
Steps in quantitative forecasting:
1. Model specification (Selecting a forecasting technique)
2. Model fitting (adequate fit to past data)
3. Model diagnosis (analyzing the quality of data)
Homework: # 13.3, 13.8, 13.10, 13.19 and 13.24