autocorrelation correlations between samples within a single time series
TRANSCRIPT
![Page 1: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/1.jpg)
autocorrelation
correlations between samples within a single time series
![Page 2: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/2.jpg)
0 500 1000 1500 2000 2500 3000 3500 40000
1
2
x 104
time, days
disc
harg
e, c
fs
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.050
2
4
6
8
x 109
frequency, cycles per dayPS
D,
(cfs
)2 per
cyc
le/d
ay
A) time series, d(t)
time t, days
d(t)
, cfs
Neuse River Hydrograph
![Page 3: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/3.jpg)
high degree of short-term correlation
whatever the river was doing yesterday, its probably doing today, too
because water takes time to drain away
![Page 4: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/4.jpg)
0 500 1000 1500 2000 2500 3000 3500 40000
1
2
x 104
time, days
disc
harg
e, c
fs
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.050
2
4
6
8
x 109
frequency, cycles per dayPS
D,
(cfs
)2 per
cyc
le/d
ay
A) time series, d(t)
time t, days
d(t)
, cfs
Neuse River Hydrograph
![Page 5: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/5.jpg)
low degree of intermediate-term correlation
whatever the river was doing last month, today it could be doing something completely different
because storms are so unpredictable
![Page 6: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/6.jpg)
0 500 1000 1500 2000 2500 3000 3500 40000
1
2
x 104
time, days
disc
harg
e, c
fs
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.050
2
4
6
8
x 109
frequency, cycles per dayPS
D,
(cfs
)2 per
cyc
le/d
ay
A) time series, d(t)
time t, days
d(t)
, cfs
Neuse River Hydrograph
![Page 7: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/7.jpg)
moderate degree of year-lagged correlation
what ever the river was doing this time last year, its probably doing today, too
because seasons repeat
![Page 8: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/8.jpg)
0 500 1000 1500 2000 2500 3000 3500 40000
1
2
x 104
time, days
disc
harg
e, c
fs
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.050
2
4
6
8
x 109
frequency, cycles per dayPS
D,
(cfs
)2 per
cyc
le/d
ay
A) time series, d(t)
time t, days
d(t)
, cfs
Neuse River Hydrograph
![Page 9: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/9.jpg)
0 0.5 1 1.5 2 2.5
x 104
0
0.5
1
1.5
2
2.5x 10
4
discharge
disc
harg
e la
gged
by
1 da
ys
0 0.5 1 1.5 2 2.5
x 104
0
0.5
1
1.5
2
2.5x 10
4
discharge
disc
harg
e la
gged
by
3 da
ys
0 0.5 1 1.5 2 2.5
x 104
0
0.5
1
1.5
2
2.5x 10
4
discharge
disc
harg
e la
gged
by
30 d
ays
1 day 3 days 30 days
![Page 10: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/10.jpg)
autocorrelation in MatLab
![Page 11: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/11.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
Autocovariance = Autocorrelation x sdev^2
31 30
CFS2
![Page 12: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/12.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
Autocovariance of Neuse River Hydrograph
The decay around 0 lag is like a composite or typical feature of the time series (a blend of the positive and negative excursions).
Periodicities show up as repeating long-range autocorrelations.
![Page 13: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/13.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
symmetric about zero
corr(x,y) = corr(y,x)
Autocovariance of Neuse River Hydrograph
![Page 14: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/14.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
peak at zero lag
a point in time series is perfectly correlated with itself
Autocovariance of Neuse River Hydrograph
![Page 15: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/15.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
falls off rapidly in the first few days
lags of a few days are highly correlated because the river drains the land over the course of a few days
Autocovariance of Neuse River Hydrograph
![Page 16: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/16.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
negative correlation at lag of 182 days
points separated by a half year are negatively correlated
Autocovariance of Neuse River Hydrograph
![Page 17: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/17.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
positive correlation at lag of 360 days
points separated by a year are positively correlated
Autocovariance of Neuse River Hydrograph
![Page 18: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/18.jpg)
-30 -20 -10 0 10 20 300
5
x 106
lag, days
auto
corr
elat
ion
-3000 -2000 -1000 0 1000 2000 3000
-505
x 106
lag, days
auto
corr
elat
ion
A)
B)
repeating pattern
the pattern of rainfall approximately repeats annually
Autocovariance of Neuse River Hydrograph
![Page 19: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/19.jpg)
autocorrelation in MatLab
![Page 20: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/20.jpg)
autocovariance related to convolution
![Page 21: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/21.jpg)
Important Relation #1autocorrelation is the convolution of a time series with its time-reversed self.
This is symmetric of course.
![Page 22: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/22.jpg)
Important Relation #2Fourier Transform of an autocorrelation
is proportional to thePower Spectral Density of time series
Recall FT(a*b) = FT(a) x FT(b)
![Page 23: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/23.jpg)
Summary
time
lag
0
frequency0
rapidly fluctuating time series
narrow autocorrelation
function
wide spectrum
![Page 24: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/24.jpg)
Summary
time
lag
0
frequency0
slowly fluctuating time series
wide autocorrelation function
narrow spectrum
![Page 25: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/25.jpg)
End of Review
![Page 26: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/26.jpg)
Part 1
correlations between time-series
![Page 27: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/27.jpg)
scenario
discharge correlated with rain
but discharge is delayed behind rain
because rain takes time to drain from the land
![Page 28: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/28.jpg)
time, days
time, days
rain
, mm
/day
disc
hagr
e, m
3 /s
![Page 29: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/29.jpg)
time, days
time, days
rain
, mm
/day
disc
hagr
e, m
3 /s
rain ahead ofdischarge
![Page 30: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/30.jpg)
time, days
time, days
rain
, mm
/day
disc
hagr
e, m
3 /s
shape not exactly the same, either
![Page 31: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/31.jpg)
treat two time series u and v probabilistically
p.d.f. p(ui, vi+k-1)with elements lagged by time(k-1)Δtand compute its covariance
![Page 32: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/32.jpg)
this defines the cross-covariance
![Page 33: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/33.jpg)
cross-correlation in MatLab
![Page 34: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/34.jpg)
just a generalization of the auto-covariance
different times in the same time series
different times in different time series
![Page 35: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/35.jpg)
like autocorrelation, it is similar to a convolution
![Page 36: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/36.jpg)
As with auto-correlation,two important properties
#1: relationship to convolution
#2: relationship to Fourier Transform
![Page 37: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/37.jpg)
As with auto-correlationtwo important properties
#1: relationship to convolution
#2: relationship to Fourier Transform
cross-spectral density
![Page 38: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/38.jpg)
Example
aligning time-seriesa simple application of cross-correlation
![Page 39: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/39.jpg)
central idea
two time series are best alignedat the lag at which they are most correlated,
which is
the lag at which their cross-correlation is maximum
![Page 40: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/40.jpg)
10 20 30 40 50 60 70 80 90 100-1
0
1
10 20 30 40 50 60 70 80 90 100-1
0
1
u(t)
v(t)
two similar time-series, with a time shift
(this is simple “test” or “synthetic” dataset)
![Page 41: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/41.jpg)
-20 -10 0 10 20
-5
0
5
time
cros
s-co
rrel
atio
n
cross-correlation
![Page 42: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/42.jpg)
-20 -10 0 10 20
-5
0
5
time
cros
s-co
rrel
atio
n
maximum
time lag
find maximum
![Page 43: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/43.jpg)
In MatLab
![Page 44: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/44.jpg)
In MatLab
compute cross-correlation
![Page 45: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/45.jpg)
In MatLab
compute cross-correlation
find maximum
![Page 46: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/46.jpg)
In MatLab
compute cross-correlation
find maximum
compute time lag
![Page 47: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/47.jpg)
10 20 30 40 50 60 70 80 90 100-1
0
1
10 20 30 40 50 60 70 80 90 100-1
0
1
u(t)
v(t+tlag)
align time series with measured lag
![Page 48: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/48.jpg)
A)
B)
2 4 6 8 10 12 140
500
time, days
solar
, W/m
2
2 4 6 8 10 12 140
50
100
time, days
ozon
e, p
pb
2 4 6 8 10 12 140
500
time, days
solar
, W/m
2
2 4 6 8 10 12 140
50
100
time, days
ozon
e, p
pbsolar insolation and ground level ozone(this is a real dataset from West Point NY)
![Page 49: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/49.jpg)
B)
2 4 6 8 10 12 140
500
time, days
solar
, W/m
2
2 4 6 8 10 12 140
50
100
time, days
ozon
e, p
pb
2 4 6 8 10 12 140
500
time, days
solar
, W/m
2
2 4 6 8 10 12 140
50
100
time, days
ozon
e, p
pbsolar insolation and ground level ozone
note time lag
![Page 50: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/50.jpg)
-10 -5 0 5 100
1
2
3
4x 10
6
time, hours
cros
s-co
rrel
atio
n
C)maximum
time lag3 hours
![Page 51: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/51.jpg)
Coherence
a way to quantifyfrequency-dependent correlation
![Page 52: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/52.jpg)
Scenario A
in a hypothetical region
windiness and temperature correlate at periods of a year, because of large scale climate patterns
but they do not correlate at periods of a few days
![Page 53: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/53.jpg)
time, years
time, years
1 2 3
1 2 3
win
d sp
eed
tem
pera
ture
![Page 54: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/54.jpg)
time, years
time, years
1 2 3
1 2 3
win
d sp
eed
tem
pera
ture
summer hot and windy
winters cool and calm
![Page 55: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/55.jpg)
time, years
time, years
1 2 3
1 2 3
win
d sp
eed
tem
pera
ture
heat wave not especially
windy cold snap not especially calm
![Page 56: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/56.jpg)
in this casetimes series correlated at long periods
but not at short periods
![Page 57: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/57.jpg)
Scenario B
in a hypothetical region
plankton growth rate and precipitation correlate at periods of a few weeks
but they do not correlate seasonally
![Page 58: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/58.jpg)
time, years
time, years
1 2 3
1 2 3
grow
th r
ate
prec
ipit
atio
n
![Page 59: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/59.jpg)
time, years
time, years
1 2 3
1 2 3
plan
t gro
wth
rat
epr
ecip
itat
ion
summer drier than winter
growth rate has no seasonal signal
![Page 60: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/60.jpg)
time, years
time, years
1 2 3
1 2 3
plan
t gro
wth
rat
epr
ecip
itat
ion
growth rate high at times of peak precipitation
![Page 61: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/61.jpg)
in this casetimes series correlated at short periods
but not at long periods
![Page 62: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/62.jpg)
Brute force way to get the in-phase part of coherence
band pass filter the two time series, u(t) and v(t)around frequency, ω0
compute their cross correlation(large when the time series are similar in shape)
repeat for many ω0’s to create a function c(ω0)
![Page 63: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/63.jpg)
Fourier transform route toCoherence
![Page 64: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/64.jpg)
The "cross-spectrum"
has 2 parts
“Squared Coherence”
frequency-dependent power (squared covariance)
between two time series
(possibly in a lagged sense)
"Phase difference"
frequency-dependent lag between time series
![Page 65: Autocorrelation correlations between samples within a single time series](https://reader038.vdocuments.us/reader038/viewer/2022103100/56649eba5503460f94bc2449/html5/thumbnails/65.jpg)
A subtle point• A single pure sinusoid, a single Fourier component of u(t), is
by definition perfectly correlated (at some lag) with the same-period Fourier component of v(t). Monochromatic cross-spectral coherence is always 1!
• But if u and v are meaningfully, physically connected (with some lag) on some time scale, all the Fourier components with periods near that time scale will exhibit a similar lag.
• Alternately, if there is such a physical relationship, a single given Fourier component (frequency) will exhibit a similar lag between u and v in many realizations (such as segments of a long time series).
• You need to combine several degrees of freedom (Fourier components or realizations) to get meaningful cross-spectral coherence tests for a relationship.