序列相关性分析——自相关函数

文章来自微信公众号“科文路”,欢迎关注、互动。转发须注明出处。

该文章属于“时间序列分析”系列文章,是之前在校阶段的学习总结。为避免翻译歧义,采用英文写作。当前主题分为三个部分,自协方差、自相关函数、偏自相关函数。

上篇文章说了自协方差,本文接着说自相关函数(ACF)

In time series analysis, we should always focus on the correlation itself. Because there exists no other series to compare, we define autocovariance, autocorrelation function and partial autocorrelation function based on the characteristics of the time series.

Word auto means we do the analysis on itself.

2 Autocorrelation Function (ACF)

wiki/Autocorrelation

2.1 Introduction

Autocorrelation, also known as serial correlation, is the correlation of a signal with a delayed copy of itself as a function of delay. Informally, it is the similarity between observations as a function of the time lag between them.

The analysis of autocorrelation is a mathematical tool for finding repeating patterns, such as the presence of a periodic signal obscured by noise, or identifying the missing fundamental frequency in a signal implied by its harmonic frequencies.

It is often used in signal processing for analyzing functions or series of values, such as time domain signals.

2.2 Definition

see 1.3. Autocorrealtion function is defined by the normalization of the autovariance,
$$
\rho(k)=\frac{\gamma(k)}{\gamma(0)}
$$

2.3 Calculation

$$
\begin{aligned}\rho(k)&=\frac{\gamma(k)}{\gamma(0)}\&=\sum_{t=k+1}^{n} \frac{\left(X_{t}-\overline{X}\right)\left(X_{t-k}-\overline{X}\right)}{\sum_{t=1}^{n}\left(X_{t}-\overline{X}\right)^{2}}\end{aligned}
$$

2.4 White noise

The ACF of white noise is Dirac’s function,
$$
\rho_{k}=\delta(k)
$$

2.5 MATLAB code

As a extension based on the autocovariance (see 序列相关性分析——自协方差),

1
acf = autocov_m(p)/var(p);

or use autocorr()

[acf,lags,bounds] = autocorr(___) additionally returns the lag numbers that MATLAB® uses to compute the ACF, and also returns the approximate upper and lower confidence bounds.

都看到这儿了,不如关注每日推送的“科文路”、互动起来~

序列相关性分析——自相关函数

https://xlindo.com/kewenlu2022/posts/e084a4d4/

Author

xlindo

Posted on

2022-02-09

Updated on

2023-05-10

Licensed under

Comments