Exercises 4: Autocorrelated Processes ARIMA Models
Exercises 4: Autocorrelated Processes ARIMA Models
Autocorrelated processes
ARIMA models
Remind:
Independence → absence of autocorrelation
Absence of autocorrelation → independence ONLY IF data are normal
REMINDER (NON RANDOM PROCESSES)
Qualitative analysis of
process data
Is it random?
- Overall process level is
constant over time?
- Is there a systematic
pattern?
- The variation around the
process level is constant?
8.67 8.65 8.64 8.67 8.74 8.82 8.85 8.83 8.88 8.84 8.84 8.81 8.8 8.76 8.73 8.69
8.66 8.62 8.61 8.58 8.56 8.55 8.54 8.44 8.44 8.4 8.44 8.4 8.42 8.51 8.56 8.51
8.44 8.4 8.43 8.47 8.5 8.49 8.48 8.51 8.53 8.52 8.55 8.55 8.58 8.57 8.53 8.55
8,7
EXE1
8,6
8,5
8,4
1 5 10 15 20 25 30 35 40 45
Index
Exercise 1 (solution)
Partial Autocorrelation Function for EXE1
Autocorrelation Function for EXE1 (with 5% significance limits for the partial autocorrelations)
(with 5% significance limits for the autocorrelations)
1,0
1,0 0,8
0,6
0,8
Partial Autocorrelation
0,4
0,6 0,2
0,4 0,0
Autocorrelation
-0,2
0,2
-0,4
0,0 -0,6
-0,2 -0,8
-1,0
-0,4
1 2 3 4 5 6 7 8 9 10 11 12
-0,6 Lag
1 2 3 4 5 6 7 8 9 10 11 12
Lag
8,8
Quality Engineering 8
Starting time series xt Exercise 1 (solution)
SACF; d=0 The Box-Jenkins approach
(ARIMA models)
Stationary?
no
Exponential decay?
yes d:=d+1
Apply d
SACF-SPACF: choose
ARIMA model to test
Find a
model for
residuals* Coefficients estimation
and residuals computation
no yes
Residuals are IID (NID)? STOP
Exercise 1 (solution)
0,05
DIFF1
0,00
-0,05
-0,10
1 5 10 15 20 25 30 35 40 45
Index
Exercise 1 (solution)
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
1 2 3 4 5 6
Lag
7 8 9 10 11 12
P-value=0.046
𝑌𝑡 = 𝑌𝑡−1 + 𝜀𝑡
Exercise 1 (solution)
Uncheck this
box to remove
constant term
Exercise 1 (solution)
P-val: 0.048
Borderline condition
Reject at 95%, accept at 99%
Exercise 1 (solution)
REMIND:
Bartlett’s TEST at lag=1
Critical region:
• 𝛼 = 5%
𝑧𝛼/2 1.96
𝑟1 > = = 0.33
𝑛 47
𝑟1 = 0.288 > 0.286
• 𝛼 = 1%
𝑧𝛼/2 2.576
𝑟1 > = = 0.33
𝑛 47
𝑟1 = 0.288 < 0.376
Exercise 1 (solution)
0,05
0,00
notice that they range from -0.1 and 0.1, which
means that their variability is very small.
-0,05
This is why SSe is very close to 0.
-0,10
1 5 10 15 20 25 30 35 40 45
Index
Exercise 1 (solution)
If we do not accept the random walk model (95% confidence), one possibility is to add one
additional term; e.g., LAG2
Exercise 2
In a process for the production of metal laminates we collected 100 sequential
measurements of laminate width (time series ‘A’ “Statistical Control by
monitoring and feedback adjustment” Box Luceño – J. Wiley)
80 92 100 61 93 85 92 86 77 82 85 102 93 90 94
75 75 72 76 75 93 94 83 82 82 71 82 78 71 81
88 80 88 85 76 75 88 86 89 85 89 100 100 106 92
117 100 100 106 109 91 112 127 96 127 96 90 107 103 104
97 108 127 110 90 121 109 120 109 134 108 117 137 123 108
128 110 114 101 100 115 124 120 122 123 130 109 111 98 116
109 113 97 127 114 111 130 92 115 120
130
120
110
EXE2
100
90
80
Autocorrelation Function for EXE2
70 (with 5% significance limits for the autocorrelations)
60
1,0
1 10 20 30 40 50 60 70 80 90 100
Index 0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
2 4 6 8 10 12 14 16 18 20 22 24
non-stationary Lag
Exercise 2 (solution)
30
20
10
DIFF
0
-10
-20
-30
-40
1 10 20 30 40 50 60 70 80 90 100
Index
Exercise 2 (solution)
ACF and PACF of the differences series
Autocorrelation Function for DIFF
(with 5% significance limits for the autocorrelations)
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
2 4 6 8 10 12 14 16 18 20 22 24
1,0
Lag
0,8
0,6
Partial Autocorrelation
0,4
0,2
0,0
-0,2
After the differencing operation, -0,4
be: -0,8
-1,0
2 4 6 8 10 12 14 16 18 20 22 24
Command ARIMA:
Stat-> Time series
Exercise 2 (solution)
ARIMA Model: EXE2 𝑌𝑡 − 𝑌𝑡−1 = 𝛻𝑌𝑡 = 𝜇 − 𝜃1 𝜀𝑡−1 + 𝜀𝑡
DF:
For model with constant term: (n − d) − p − q − 1
For model without constant term: (n − d) − p − q
Exercise 2 (solution)
1,0
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
2 4 6 8 10 12 14 16 18 20 22 24
Lag
Exercise 2 (solution)
18,0
17,5
EXE3 17,0
16,5
16,0
1 20 40 60 80 100 120 140 160 180
Index
Exercise 3 (solution)
Autocorrelation Function for EXE3
(with 5% significance limits for the autocorrelations)
1,0
0,8
0,6
0,4
Autocorrelation
Partial Autocorrelation
-0,6
0,4
-0,8
0,2
-1,0
0,0
1 5 10 15 20 25 30 35 40 45
-0,2
Lag
-0,4
-0,6
-0,8
-1,0
1 5 10 15 20 25 30 35 40 45
Lag
1,0
0,5
DiffExe3
0,0
-0,5
-1,0
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
Partial Autocorrelation Function for DiffExe3
-0,6 (with 5% significance limits for the partial autocorrelations)
-0,8 1,0
-1,0 0,8
1 5 10 15 20 25 30 35 40 0,6 45
Partial Autocorrelation
Lag 0,4
0,2
0,0
MA(1) ?? -0,2
-0,4
-0,6
-0,8
Remind: parsimony! -1,0
1 5 10 15 20 25 30 35 40 45
Lag
Exercise 3 (solution)
Let’s try with a IMA(1,1) model: 𝑌𝑡 − 𝑌𝑡−1 = 𝛻𝑌𝑡 = 𝜇 − 𝜃1 𝜀𝑡−1 + 𝜀𝑡
1,0
0,8
0,6
P-value=0.319
0,4
Autocorrelation
0,2
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
1 5 10 15 20 25 30 35 40 45
Lag
1,0
0,5
RESI3
0,0
-1,0
80
70
1,0
0,8
0,6
0,4
Autocorrelation
0,2
0,0
-0,6 1,0
0,8
-0,8
0,6
-1,0
Partial Autocorrelation
0,4
2 4 6 8 10 12 14 16 18
0,2
Lag
0,0
-0,2
-0,4
-0,6
-0,8
-1,0
2 4 6 8 10 12 14 16 18
P-val: 0.160
Coefficients
Regression Equation
G.E.P. Box