difficulty 3/5
Autocorrelation
The correlation of a series with a shifted copy of itself. It is how you find a cycle you were not told about, and how you discover that your sample size is smaller than you thought.
Intuition
If today's value was high, is tomorrow's likely to be high too? That is a correlation question, and the only unusual thing about it is that both variables come from the same series — one shifted against the other.
Think Stats calls the lag-1 case serial correlation, "because each value is correlated with the next one in the series" [1, §12.6], and notes that "'autocorrelation' is another name for serial correlation, used more often when the lag is not 1" [1, §12.7].
Computing it at every lag at once turns a vague question into a picture: "if you think a series might have some serial correlation, but you don't know which lags to test, you can test them all! The autocorrelation function is a function that maps from lag to the serial correlation with the given lag" [1, §12.7].
Two very different things come out of that picture. One is cycles — a weekly pattern nobody documented. The other is a warning: if your observations are correlated, you have fewer of them than you counted, and every interval and p-value computed from them is too narrow.
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
Sources
- Think Stats, 2nd ed.book · retrieved 2026-09-13https://greenteapress.com/thinkstats2/html/index.html
- NIST/SEMATECH e-Handbook of Statistical Methodsstandard · retrieved 2026-09-13https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc443.htm
- e-Handbook of Statistical Methods — 6.4.4.6 Box-Jenkins Model Identificationstandard · retrieved 2026-10-04https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc446.htm
- scikit-learn User Guide — Cross-validationdocs · retrieved 2026-10-04https://scikit-learn.org/stable/modules/cross_validation.html
- e-Handbook of Statistical Methods — 1.3.3.1 Autocorrelation Plotstandard · retrieved 2026-10-04https://www.itl.nist.gov/div898/handbook/eda/section3/autocopl.htm