Beruflich Dokumente
Kultur Dokumente
Truck Forecasting with Time Series Analysis: A Case Study of the Blue Water
Bridge
INTRODUCTION
This document contains images of all slides in a course module about the use of time
series techniques for truck forecasting. The techniques are illustrated with data from the Blue
Water Bridge between Michigan and Ontario. This presentation is available upon request to
Alan Horowitz, horowitz@uwm.edu.
12/22/2011
Outline
Introduction
Data Collection
Methodology
Conclusion
12/22/2011
12/22/2011
Data Source
Dependent variables
Blue water bridge eastbound/ westbound truck volume
Independent variables
o
o
o
o
12/22/2011
Eastbound
30000
30000
25000
25000
20000
20000
15000
15000
10000
Westbound
5000
Eastbound
10000
5000
Oct-87
May-87
Jul-86
Dec-86
Apr-85
Feb-86
Sep-85
Nov-84
Jan-84
Jun-84
Oct-87
May-87
Jul-86
Dec-86
Feb-86
Apr-85
Sep-85
Nov-84
Jan-84
Jun-84
Ontario Population(million)
16.0000
14.0000
12.0000
10.0000
Ontario
Populati
on(mil
8.0000
Michigan
6.0000
4.0000
Jan-10
Jan-08
Jan-06
Jan-04
Jan-02
Jan-00
Jan-98
Jan-96
Jan-94
Jan-92
Jan-90
Jan-88
Jan-86
0.0000
Jan-84
Jan-09
Jul-06
Jan-04
Jul-01
Jan-99
Jul-96
Jul-91
Jan-94
Jul-86
Jan-89
Jan-84
2.0000
12/22/2011
6000.000
350
300
4000.000
250
200
2010
2008
2006
2004
2002
2000
1998
1996
1994
1992
1990
0
1988
Sep-08
Jul-02
Aug-05
Jun-99
Apr-93
50
May-96
100
0.000
Mar-90
1000.000
Jan-84
Population
150
1986
US GDP(billion)
2000.000
1984
3000.000
Feb-87
US GDP
5000.000
12/22/2011
Michigan GDP(billion)
180
4.500
140
4.000
120
3.500
100
3.000
80
Michigan
GDP(billion)
60
40
Fuel price
160
2.500
2.000
1.500
1.000
20
Sep
Mar
Nov
Jan-
Jul-
May
Sep
Nov
Jan-
Jul-
Mar
May
Sep
Nov
Jul-06
Jan-09
Jul-01
Jan-04
Jul-96
Jan-99
Jul-91
Jan-94
Jul-86
Jan-89
Jan-84
0.000
Jan-
0.500
Other Data
NAFTA
o The North American Free Trade Agreement or NAFTA is
an agreement signed by the governments
of Canada, Mexico, and the United States, creating a
trilateral trade bloc in North America. The agreement
came into force on January 1, 1994. It superseded
the Canada United States Free Trade
Agreement between the U.S. and Canada.
September 11
o The September 11 attacks could also be a factor to
influence the truck volume within that month.
12/22/2011
Central Moving
Average
Growth Factor
Exponential
Smoothing
Linear Regression
ARIMA
12/22/2011
100000
90000
80000
70000
60000
50000
40000
30000
20000
10000
0
Series1
Series2
Truck Volume
70000
60000
50000
40000
Series1
30000
Series2
20000
Apr-06
R square 0.971
Sep-08
Nov-03
Jan-99
Jun-01
Aug-96
Oct-91
Mar-94
Jul-84
May-89
R square 0.956
0
Dec-86
Nov-07
Jan-02
Dec-04
Feb-99
Apr-93
Mar-96
May-90
Jul-84
10000
Jun-87
Truck Volume
Westbound Moving
Average
12/22/2011
Growth Factor
Linear growth:
F(n) = Constant + AGF * (n)
F(n): forecast volume
AGF: average growth factor
n: the number of months from the first
observation
Growth Factor
Determination of constant and AGF from the linear
regression
o
o
o
o
Constant:13767
AGF: 119
12/22/2011
100000
80000
60000
40000
Actual data
20000
Forecasted data
R Square 0.915
Jun-10
Dec-06
Sep-08
Jun-03
Mar-05
Dec-99
Sep-01
Jun-96
Mar-98
Sep-94
Jun-89
Mar-91
Dec-92
Sep-87
Mar-84
Dec-85
R Square 0.919
Actual data
Forecasted data
Mar-84
Dec-85
Sep-87
Jun-89
Mar-91
Dec-92
Sep-94
Jun-96
Mar-98
Dec-99
Sep-01
Jun-03
Mar-05
Dec-06
Sep-08
Jun-10
Truck Volume
Eastbound Forecasting
90000
80000
70000
60000
50000
40000
30000
20000
10000
0
10
12/22/2011
100000
80000
R Square 0.935
60000
40000
Moving Average
20000
Forecasting
Aug-11
Oct-08
Mar-10
May-07
Jul-04
Dec-05
Feb-03
Apr-00
Sep-01
Jan-96
Jun-97
Nov-98
Aug-94
Oct-91
Mar-93
May-90
Jul-87
Dec-88
Feb-86
Sep-84
R Square 0.940
Moving Average
Jan-10
May-11
Sep-08
May-07
Jan-06
Sep-04
May-03
Jan-02
Sep-00
May-99
Jan-98
Sep-96
May-95
Jan-94
Sep-92
May-91
Jan-90
Sep-88
Jan-86
May-87
Forecasting
Sep-84
Truck Volume
Eastbound Forecasting
80000
70000
60000
50000
40000
30000
20000
10000
0
11
12/22/2011
Comparison
Comparing R Square of Growth factor with initial
data and moving average(smoothed) data
R Square
Initial data
Moving average
data
Westbound
0.915
0.935
Eastbound
0.919
0.940
Growth Factor
Compound growth
F(n)=Constant*AGF(n)
o
AGF = F2
F1
1
Y2 Y1
12
12/22/2011
Growth Factor
Determination of constant and AGF
from the linear regression
Constant:13745
AGF: 1.008
13
12/22/2011
Exponential Smoothing
Model formulation:
where
St: exponentially smoothed value for time period t
St-1: exponentially smoothed value for time period t-1
xt-1 : actual time series value for time period t
: the smoothing factor, and 0 < < 1
Example
= 0.7
St = 0.7xt-1 + (1-0.7)St-1
0.7*12878+0.3*13253
14
12/22/2011
Exponential Smoothing
Smoothing factor
o The larger is, the closer the smoothed value will
track the original data value. The smaller is, the
more fluctuation is smoothed out.
100000
80000
Alpha=0.3
60000
Initial data
40000
20000
Exponential
smoothing(alpha=0.3)
Feb-09
May-10
Aug-06
Nov-07
Feb-04
May-05
Nov-02
Feb-99
Aug-01
May-00
Aug-96
Nov-97
Feb-94
May-95
Aug-91
Nov-92
Feb-89
May-90
Aug-86
Nov-87
Feb-84
May-85
MSE=27875534
100000
Alpha=0.5
80000
60000
40000
Initial data
20000
Oct-10
Jun-09
Oct-06
Feb-08
Jun-05
Oct-02
Feb-04
Jun-01
Oct-98
Feb-00
Jun-97
Feb-96
Oct-94
Jun-93
Oct-90
Feb-92
Jun-89
Oct-86
Feb-88
Jun-85
Feb-84
MSE=25483163
100000
80000
60000
Initial data
40000
20000
Feb-09
Nov-07
May-10
Aug-06
May-05
Feb-04
Aug-01
Nov-02
Feb-99
May-00
Aug-96
Nov-97
Feb-94
Nov-92
May-95
Aug-91
May-90
Feb-89
Aug-86
Nov-87
Feb-84
0
May-85
Alpha=0.7
Exponential
smoothing(alpha=0.7)
MSE=24306420
15
12/22/2011
0.3
0.5
0.7
MSE
27875534
25483163
24306420
Initial data
40000
Forecasting
30000
20000
10000
Oct-09
Dec-10
Jun-07
Apr-06
Aug-08
Feb-05
Oct-02
Dec-03
Jun-00
Aug-01
Apr-99
Feb-98
Oct-95
Dec-96
Jun-93
Aug-94
Apr-92
Feb-91
Oct-88
Dec-89
Jun-86
Aug-87
Apr-85
Feb-84
Linear Regression
Model
Y = f(x1,x2,,xn) = b0 + b1x1 + b2x2 + + bnxn
Dataset with initial truck volume(partial):
16
12/22/2011
Initial Analysis
17
12/22/2011
Click OK
18
12/22/2011
Results Analysis
US GDP NAFTA,
Sep.11
The order of
regression equation
The name of entered variables
The name of removed variables
The basis of entering and
removing variables
Common Statistic
19
12/22/2011
Analysis of Coefficients
Regression equation:
Y=652201.511+83171.959x110177.394x2+4889.856x3
x1: Michigan population(million)
x2: Ontario population(million)
x3: Fuel price(current dollar)
Ontario population
forecasting(million)
6000
5000
4000
3000
2000
1000
0
Jul-04
Dec-07
Feb-01
Apr-94
Sep-97
Nov-90
Jan-84
Forecasting
3
2
1
Forecasting
Sep-09
Jan-06
Nov-07
Mar-04
Jul-00
May-02
Sep-98
Jan-95
Nov-96
Mar-93
Jul-89
Sep-87
May-91
Jan-84
0
Nov-85
Jan-06
Oct-08
Jul-00
Apr-03
Oct-97
Jul-89
Jan-95
Apr-92
Jan-84
Oct-86
Forecasting
Jun-87
14
12
10
8
6
4
2
0
20
12/22/2011
=9.88*0.94
Michigan GDP =
21
12/22/2011
Regression Forecasting
Westbound truck forecasting results from Feb
2011 to Dec 2013 with the multilinear regression
model
22
12/22/2011
Forecasting Results
Plot of initial value and forecasting value
100000
90000
80000
70000
60000
50000
Initial data
40000
Forecasting
30000
20000
10000
Jan-84
Feb-85
Mar-86
Apr-87
May-88
Jun-89
Jul-90
Aug-91
Sep-92
Oct-93
Nov-94
Dec-95
Jan-97
Feb-98
Mar-99
Apr-00
May-01
Jun-02
Jul-03
Aug-04
Sep-05
Oct-06
Nov-07
Dec-08
Jan-10
Feb-11
23
12/22/2011
24
12/22/2011
Westbound
30000
Forecasting
20000
10000
May-11
Jan-09
Mar-10
Nov-07
Jul-05
Sep-06
May-04
Jan-02
Mar-03
Jul-98
Sep-99
Nov-00
May-97
Jan-95
Mar-96
Nov-93
Jul-91
Sep-92
May-90
Jan-88
Mar-89
Nov-86
Jul-84
Sep-85
Seasonal adjustment
factor data is derived
from central moving
average series
25
12/22/2011
Comparison
Comparing R Square of linear regression with
smoothed data and unsmoothed data
R Square
Regression with
unsmoothed data
0.942
Linear Regression
Michigan GDP as one of the independent
variables instead of Michigan population and
U.S. GDP
26
12/22/2011
Forecasting
Y=155753-20609*Ontario population(million) -13133*Fuel
price+13033*NAFTA+1294*Michigan GDP(billion)
R Square: 0.989
Comparison
Comparing R Square of linear regression with
the independent variable of Michigan GDP and
the independent variables without Michigan GDP
R Square
Regression with Michigan
GDP
0.984
Regression without
Michigan GDP
0.989
27
12/22/2011
ARIMA
ARIMA(p,d,q)
o Auto-regressive model
p is the number of autoregressive terms
o Integrated model
d is the number of nonseasonal differences
Auto-Regressive Model
The definition of autoregressive(AR) model
o Takes advantage of autocorrelation
28
12/22/2011
Excel Output
Coefficients
Intercept
13273
X Variable 1
-0.25
X Variable 2
0.128
covariance at lag k
k = k =
variance
0
=
(Y Y )(Y Y )
(Y Y )
t +k
PACF
o The Partial Autocorrelation Function (PACF) is similar to the
ACF, however it measures correlation between observations
that are k time periods apart, after controlling for correlations
at intermediate lags.
29
12/22/2011
Autocorrelation
30
12/22/2011
Nonstationary
The variability is changing
Oct-07
Dec-10
Mar-06
May-09
Jan-03
Aug-04
Jun-01
Apr-98
Nov-99
Sep-96
Jul-93
Feb-95
Dec-91
Oct-88
May-90
Mar-87
Jan-84
Series1
Aug-85
Truck Volume
10000
5000
Series1
Feb-09
May-10
Nov-07
Aug-06
Feb-04
May-05
Nov-02
Aug-01
Feb-99
Nov-97
May-00
Aug-96
Feb-94
May-95
Nov-92
Aug-91
May-90
Feb-89
Nov-87
Aug-86
5000
10000
May-85
0
Feb-84
Truck Volume
15000
15000
20000
31
12/22/2011
Box-Cox Transformation
Transformation formulation
32
12/22/2011
Time interval
Jan 84-Apr 93
May 93-Aug 02
Sep 02-Jan 11
Identifying Lambda
0
1
0.001
0
1
Series1
1
0.5
0
1
Stand Deviation
Stand Deviation
2
1.5
0.006
0.1
Lambda=0.5
Lambda=0.3
2.5
Series1
0.0005
Stand Deviation
Series1
0.0001
0.0015
Stand Deviation
0.0002
Lambda=-0.3
Lambda=-0.5
Stand Deviation
Stand Deviation
Lambda=-0.7
0.0003
26
25
24
23
22
21
20
Series1
0.004
Series1
0.002
0
1
Lambda=0.1
0.08
0.06
Series1
0.04
0.02
0
1
33
-0.5
-1
Oct-09
Sep-10
Jan-84
Sep-10
May-09
Jan-08
Sep-06
May-05
Jan-04
Sep-02
May-01
Jan-00
Sep-98
May-97
Jan-96
Sep-94
May-93
Jan-92
Sep-90
May-89
Jan-88
Sep-86
May-85
Truck Volume
15
Nov-08
Dec-07
Jan-07
Feb-06
Mar-05
Apr-04
May-03
Jun-02
Jul-01
Aug-00
Sep-99
Oct-98
Nov-97
Dec-96
Jan-96
Feb-95
Mar-94
Apr-93
May-92
Jun-91
Jul-90
Aug-89
Sep-88
Oct-87
Nov-86
Dec-85
Jan-85
Feb-84
12/22/2011
35
Transformed data
30
25
20
10
Series1
2.5
1.5
2
0.5
1
Series1
-1.5
-2.5
-2
-3
Stationary
Seasonal
34
12/22/2011
Identifying AR(p)
Identify the numbers of AR by looking at the
autocorrelation function (ACF) and partial
autocorrelation (PACF) plots of differenced series
AR(p)
ACF
Tails off
PACF
Cuts after p
35
12/22/2011
MA(q)
ACF
Cuts after q
PACF
Tails off
Differencing=0
ACF falls to zero very slowly
indicates that non-seasonal
differencing is required
36
12/22/2011
Differencing=1
ACF cuts off to zero at
lag 2 sharply, no nonseasonal differencing is
needed
Identification of ARIMA(p,d,q)
P=0, d=1,q=1
The potential model is ARIMA(0,1,1)
(1B)Yt=(11B)at
t: indexes time
B: the backshift operator, BYt= BYt-1
1: the nonseasonal moving average coefficient
at: the random error
37
12/22/2011
Identification of P,D,Q
Differencing: 0
38
12/22/2011
39
12/22/2011
R square : 0.971
Residual Graph
40
12/22/2011
Forecasting
41
12/22/2011
Conclusions
Growth factor
Exponential smoothing
Linear regression
ARIMA
Conclusions (contd)
Growth factor
o Advantages
Simple and easy to understand
Considering the linear and nonlinear trend of the
historical data
o Disadvantages
Neglecting the effects of cyclical or seasonal
components
Increasing the time
42
12/22/2011
Conclusions (contd)
Exponential smoothing
o Advantages
Including both linear and nonlinear
Structural view of the data that include level, trend,
seasonality, and events
o Disadvantage
Conclusions (contd)
Linear regression
o Advantage
Considering the characteristic of independent
variables and the relationship between independent
variables(economical and political factors) and
dependent variables
o Disadvantage
Difficult to determine the trends of every
independent variable
43
12/22/2011
Conclusions (contd)
ARIMA
o Advantage
The comprehensiveness of the family of models
o Disadvantages
ARIMA identification is difficult and time consuming
ARIMA may be difficult to explain to others
Models that perform similarly on the historical data
may yield quite different forecasts
Empirical
Reference
1. Daniel Beagan, Michael Fischer, Arun Kuppam.
Quick Response Freight Manual II (2007).
2. Alan Pankratz. Forecasting With Univariate
Box-Jenkins Models (1983).
3. R.M.SAKIA. The Box-Cox transformation
technique: a review (1992).
44