Planilha Modelo Modelo

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 37

AUTOCORRELATION

To be used in conjunction with the book:


Assessment of treatment plant performance and water quality data. A guide for students, researchers and practitioners
Marcos von Sperling, Matt Verbyla and Silvia Oliveira
IWA Publishing (2019)
Note: this spreadsheet if for didactic purposes only. The authors and IWA Publishing have no responsability in case there are problems with it

Fill-in cells in yellow. The other cells are for calculations and results.

Pearson correlation
There should be no missing data in the original series
If you want more lags, copy the last column to the right, and insert the corresponding number of columns with calculations in tab Calc

LAG
Data sequence Original series 1 2 3 4 5 6 7
1 0
2 -0.4 0
3 -0.6 -0.4 0
4 -0.3 -0.6 -0.4 0
5 0.6 -0.3 -0.6 -0.4 0
6 0.3 0.6 -0.3 -0.6 -0.4 0
7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
8 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
9 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4
10 0.5 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6
11 -1 0.5 0.3 0.7 0.4 0.3 0.6 -0.3
12 0.1 -1 0.5 0.3 0.7 0.4 0.3 0.6
13 0 0.1 -1 0.5 0.3 0.7 0.4 0.3
14 0.1 0 0.1 -1 0.5 0.3 0.7 0.4
15 0.4 0.1 0 0.1 -1 0.5 0.3 0.7
16 0.4 0.4 0.1 0 0.1 -1 0.5 0.3
17 -1.1 0.4 0.4 0.1 0 0.1 -1 0.5
18 -0.2 -1.1 0.4 0.4 0.1 0 0.1 -1
19 -0.1 -0.2 -1.1 0.4 0.4 0.1 0 0.1
20 0.3 -0.1 -0.2 -1.1 0.4 0.4 0.1 0
21 -0.5 0.3 -0.1 -0.2 -1.1 0.4 0.4 0.1
22 -1 -0.5 0.3 -0.1 -0.2 -1.1 0.4 0.4
23 0.3 -1 -0.5 0.3 -0.1 -0.2 -1.1 0.4
24 -1 0.3 -1 -0.5 0.3 -0.1 -0.2 -1.1
25 -0.2 -1 0.3 -1 -0.5 0.3 -0.1 -0.2
26 -0.8 -0.2 -1 0.3 -1 -0.5 0.3 -0.1
27 -0.3 -0.8 -0.2 -1 0.3 -1 -0.5 0.3
28 0.3 -0.3 -0.8 -0.2 -1 0.3 -1 -0.5
29 0 0.3 -0.3 -0.8 -0.2 -1 0.3 -1
30 0.2 0 0.3 -0.3 -0.8 -0.2 -1 0.3
31 0.2 0.2 0 0.3 -0.3 -0.8 -0.2 -1
32 -0.5 0.2 0.2 0 0.3 -0.3 -0.8 -0.2
33 0.6 -0.5 0.2 0.2 0 0.3 -0.3 -0.8
34 0.1 0.6 -0.5 0.2 0.2 0 0.3 -0.3
35 -0.3 0.1 0.6 -0.5 0.2 0.2 0 0.3
36 1 -0.3 0.1 0.6 -0.5 0.2 0.2 0
1 -0.3 0.1 0.6 -0.5 0.2 0.2
1 -0.3 0.1 0.6 -0.5 0.2
1 -0.3 0.1 0.6 -0.5
1 -0.3 0.1 0.6
1 -0.3 0.1
1 -0.3
1
ctitioners

e there are problems with it, but would appreciate being communicated about them.

Number of lags to be used in the cross-correlogram: 24 (maximum = 24, unless you modify the spreadsheet by inserting new co
24 (number of lags to be used; if n is small, allows a maximum of n-6 lags
lculations in tab Calc

8 9 10 11 12 13 14 15 16 17 18

0
-0.4 0
-0.6 -0.4 0
-0.3 -0.6 -0.4 0
0.6 -0.3 -0.6 -0.4 0
0.3 0.6 -0.3 -0.6 -0.4 0
0.4 0.3 0.6 -0.3 -0.6 -0.4 0
0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
0.3 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
0.5 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
-1 0.5 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4 0
0.1 -1 0.5 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6 -0.4
0 0.1 -1 0.5 0.3 0.7 0.4 0.3 0.6 -0.3 -0.6
0.1 0 0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0.2 0.2
1 -0.3 0.1 0.6 -0.5 0.2
1 -0.3 0.1 0.6 -0.5
1 -0.3 0.1 0.6
1 -0.3 0.1
1 -0.3
1
Significance level (alpha): 0.05
Total number of data: 36 𝑟 𝑈𝐶𝐿 = mean + 𝑡_𝑐𝑟𝑖𝑡×𝑠𝑡𝑎𝑛
𝑡𝑐𝑎𝑙𝑐 =
2
ට1 − 𝑟 𝐿𝐶𝐿 = mean - 𝑡_𝑐𝑟𝑖𝑡×𝑠𝑡𝑎𝑛𝑑
Correlation using CORREL function - PEARSON 𝑛 − 2

LAG
1 2 3
Correlation coefficient 0.00801375061313587 0.106522754114865 0.0821379192859084
Number of data 35 34 33
t calc (absolute value) 0.0460369707063332 0.606031855008523 0.458875131666826
t crit 2.03451529744934 2.0369333434601 2.03951344639641
Upper C.L. 0.343895851989913 0.349331186433007 0.355033720038814
Lower C.L. -0.343895851989913 -0.349331186433007 -0.355033720038814
p-value 0.963558255123692 0.548768693155823 0.649525114456672

Original series
1.5

0.5
Original series

0
0 5 10 15 20 25 30 35 40

-0.5

-1

-1.5
Data sequence
Distribution of rho=0:

Mean = 0; standard deviation =1

𝑈𝐶𝐿 = mean + 𝑡_𝑐𝑟𝑖𝑡×𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑒𝑟𝑟𝑜𝑟=0+𝑡_𝑐𝑟𝑖𝑡×1/√𝑛

𝐿𝐶𝐿 = mean - 𝑡_𝑐𝑟𝑖𝑡×𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑒𝑟𝑟𝑜𝑟=0−𝑡_𝑐𝑟𝑖𝑡×1/√𝑛

4 5 6 7
-0.0957440975818086 0.130289049791766 -0.0813318600370918 -0.0142784926186427
32 31 30 29
0.526832297315856 0.707660062621408 0.431798265251625 0.074200788254411
2.04227245630124 2.0452296421327 2.04840714179525 2.05183051648029
0.361026175720278 0.367334087589357 0.37398626617198 0.381015361639802
-0.361026175720278 -0.367334087589357 -0.37398626617198 -0.381015361639802
0.60218422500166 0.484805239458356 0.669194944996516 0.94139763330856

Autocorrelogram
0.80

0.60
Correlation coefficient

0.40

0.20

0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-0.20

-0.40

-0.60

-0.80
Lag
Correlation coefficient Upper C.L.
Lower C.L.
8 9 10 11
0.127692394295013 -0.198408994206773 -0.0707253386269989 -0.100943996507262
28 27 26 25
0.656480074670618 1.01216755569507 0.347351811794519 0.486595879000568
2.05552943864287 2.0595385527533 2.06389856162803 2.06865761041905
0.388458550515803 0.39635837927951 0.404763809223746 0.41373152208381
-0.388458550515803 -0.39635837927951 -0.404763809223746 -0.41373152208381
0.517283935645606 0.321154463167106 0.73135469459247 0.631149394519188
12 13 14 15
-0.586661515648435 0.146441385079694 -0.258801439323355 0.140058683842006
24 23 22 21
3.3978474351182 0.678392241900055 1.19821785293618 0.616579143666254
2.07387306790403 2.07961384472768 2.08596344726586 2.09302405440831
0.423327567305433 0.433629462298373 0.444728901248701 0.456735293366164
-0.423327567305433 -0.433629462298373 -0.444728901248701 -0.456735293366164
0.00258455484637322 0.50493063062973 0.244839041183421 0.544830119410021
16 17 18 19
-0.312538791728838 -0.377670621914501 0.0374135924172326 -0.347353036316999
20 19 18 17
1.39591832660156 1.68172435550223 0.149759221122903 1.43461994841224
2.10092204024104 2.10981557783332 2.11990529922125 2.13144954555977
0.469780449740651 0.484024889120174 0.499666470850882 0.516952447765748
-0.469780449740651 -0.484024889120174 -0.499666470850882 -0.516952447765748
0.179720010704034 0.110899202215306 0.882826123345963 0.171915681888193
20 21 22 23
0.144391296049084 0.336655284206619 0.0445903291005841 0.333061041903198
16 15 14 13
0.545984309960524 1.28907375078392 0.154619222042851 1.17152650117007
2.1447866879178 2.16036865646279 2.17881282966723 2.20098516009164
0.536196671979451 0.557804788543259 0.582312222751587 0.610443450095825
-0.536196671979451 -0.557804788543259 -0.582312222751587 -0.610443450095825
0.593670908212497 0.219838499686315 0.879691636379643 0.266137999955544
24
0.288024078947921
12
0.951117456060813
2.22813885198628
0.64320828299307
-0.64320828299307
0.363966358033263

You might also like