mathematics//statistics//autocorrelation

The **autocorrelation** of a signal is its correlation with itself shifted in time,


The autocorrelation of a signal is its correlation with itself shifted in time,

r(ℓ)=corr⁡(et, et+ℓ),r(\ell)=\operatorname{corr}(e_t,\,e_{t+\ell}),r(ℓ)=corr(et​,et+ℓ​),

read at every lag ℓ\ellℓ. If r(1)=0.95r(1)=0.95r(1)=0.95, knowing the error now tells almost everything about the error at the next instant: the error has memory. A sequence with r(ℓ)=0r(\ell)=0r(ℓ)=0 for every ℓ≠0\ell\neq0ℓ=0 has none, and is called white.

The standard model of an error with memory is the first-order autoregression, or first-order Gauss–Markov process,

bk=ϕ bk−1+ηk,ϕ=e−Δt/τ,r(ℓ)=ϕℓ.b_k=\phi\,b_{k-1}+\eta_k,\qquad \phi=e^{-\Delta t/\tau},\qquad r(\ell)=\phi^{\ell}.bk​=ϕbk−1​+ηk​,ϕ=e−Δt/τ,r(ℓ)=ϕℓ.

τ\tauτ is the correlation time, how long the error takes to forget itself: after one τ\tauτ the correlation has fallen to about 0.37, after three to about 0.05.

Memory shrinks a sample. With autocorrelation, nnn samples are worth as much as neffn_{\text{eff}}neff​ independent ones, neff≈n/(1+2∑ℓ≥1r(ℓ))n_{\text{eff}}\approx n/(1+2\sum_{\ell\ge1}r(\ell))neff​≈n/(1+2∑ℓ≥1​r(ℓ)), which for the model above is n(1−ϕ)/(1+ϕ)n(1-\phi)/(1+\phi)n(1−ϕ)/(1+ϕ). With τ=30\tau=30τ=30 s sampled at 10 Hz, 10,000 samples are worth about 17. The sample variance still comes out right; what breaks is every calculation that assumed independent draws, from a confidence interval to a normality test to a filter counting its evidence.

Autocorrelation is correlation between two copies of one series, so everything said of covariance applies: zero autocorrelation rules out linear memory, not every dependence.

For inertial sensors the practical tool is the Allan variance, which averages the signal over growing windows and reads, in how the averages vary, which kind of memory dominates at each timescale.

In estimation the consequence has its own name, colored noise; in time series, a model's residuals should show no autocorrelation, checked with a Ljung–Box test (time series).