# Autocorrelation and Spectral properties

## Basics

The rate of return to equilibrium following a (small) perturbation slows down as systems approach critical transitions. This slow return rate has been termed “critical slowing down” and can be detected by changes in the correlation structure of a time series. In particular, critical slowing down causes an increase in the ‘short-term memory’ (=correlation at low lags) of a system prior to a transition.

Autocorrelation is the simplest way to measure slowing down: an increase in autocorrelation at-lag-1 indicates that the state of the system has become increasingly similar between consecutive observations. There are at least three alternative ways to measure autocorrelation at-lag-1. The most straightforward is to estimate the first value of the autocorrelation function, ρ=E[z(t-μ))(z(t+1)-μ)]/σ(z)^2, where μ is the mean and σ the variance of variable z(t). Alternatively one can use a conditional least-squares method to fit an autoregressive model of order 1 (linear AR(1)-process) of the form; z(t+1) = α1z(t) + ε(t), , where εt is a Gaussian white noise process, and α1 is the autoregressive coefficient. ρ1 and α1 are mathematically equivalent. Slowing down can also be expressed as return rate: the inverse of the first-order term of a fitted autoregressive AR(1) model [1/α1]. The return rate has also been expressed as [1-α1], which reflects the proportion of the distance from equilibrium that decays away at each time step.

Whereas autocorrelation at-lag-1 ignores changes in correlation structure at higher lags, power spectrum analysis can reveal changes in the complete spectral properties of a time series prior to a transition. Power spectrum analysis partitions the amount of variation in a time series into different frequencies. A system close to a transition tends to show spectral reddening: higher variation at low frequencies. Changes in the power spectra of a time series also can be expressed in different ways: by estimating the entire power spectrum and observing a shift in the power of spectral densities to lower frequencies; by estimating the spectral exponent of the spectral density based on the slope of a linear fitted model on a double-log scale of spectral density versus frequency; or by estimating the spectral ratio of the spectral density at low frequency (e.g. 0.05) to the spectral density at high frequency (e.g. 0.5).

## Ensemble example for rolling window metrics