# 自相关

**自相关**（Autocorrelation）是同一变量在不同时间点上与自身的相关性：即一个数据序列中同一变量的各次观测值之间随时间变化的相关程度。<sup>[1](https://www.nist.gov/glossary-term/44856)</sup> 它衡量的不是两个不同变量之间的关系，而是同一变量相隔固定时间步数的两个值之间的关系，这个时间步数称为滞后。<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> 若一个序列的观测值在统计上依赖于其先前值，则称该序列是自相关的，而这种序列依赖性正是时间序列数据的决定性特征。<sup>[3](https://arxiv.org/abs/2603.19899)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 同一变量在时刻 \( X_i \) 与 \( X_{i+k} \) 的两个值之间的相关，其中 k 为滞后<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> |
| 估计量 | \( r_k = \frac{\sum_{i=1}^{N-k}(Y_i - \bar{Y})(Y_{i+k} - \bar{Y})}{\sum_{i=1}^{N}(Y_i - \bar{Y})^2} \)，假定观测等间距<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> |
| 两大用途 | 检测数据中的非随机性；当数据非随机时，识别合适的时间序列模型<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> |
| 滞后 1 | 检验非随机性时，通常只关注第一个（滞后 1）自相关<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> |
| 图形检查 | 带 95% 与 99% 置信带的自相关图；带外的点在统计上显著，滞后 0 的值恒为 1<sup>[4](https://www.itl.nist.gov/div898/handbook/eda/section4/eda4283.htm)</sup> |
| 忽视的后果 | 对自相关数据，常用的统计检验失效，计算出的不确定度变得毫无意义<sup>[5](https://www.itl.nist.gov/div898/handbook/eda/section2/eda251.htm)</sup> |
| 与平稳性的联系 | 平稳过程的均值、方差和自相关结构不随时间变化<sup>[6](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm)</sup> |

## 定义与估计

给定在时刻 \( X_1, X_2, \ldots, X_N \) 取得的测量值 \( Y_1, Y_2, \ldots, Y_N \)，滞后 k 的自相关估计为<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup>

\[ r_k = \frac{\sum_{i=1}^{N-k}(Y_i - \bar{Y})(Y_{i+k} - \bar{Y})}{\sum_{i=1}^{N}(Y_i - \bar{Y})^{2}} \]

时间变量本身不出现在公式中；其假定是观测在时间上等间距。<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> 结果是一个普通的相关系数，因此介于 -1 与 1 之间，接近零的值表明相隔 k 步的观测之间几乎没有线性关系。

对于平稳过程，这一估计背后的理论量是自相关函数（ACF）。若时间序列 \( \{X_t\} \) 的均值为常数，且 \( X_t \) 与 \( X_{t+k} \) 之间的协方差仅依赖于滞后 k，则称该序列是弱平稳的；此时 \( X_t \) 与 \( X_{t+k} \) 之间的相关即为滞后 k 的自相关，记作 \( \rho(k) \)，而 k = 1, 2, ... 对应的 \( \rho(k) \) 的集合即为 ACF。<sup>[7](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50809)</sup> 用协方差平稳的记号表示，\( \rho(\tau) = \gamma(\tau)/\gamma(0) \)，其中 \( \gamma(\tau) \) 是滞后 \( \tau \) 处的自协方差。<sup>[8](https://ocw.mit.edu/courses/18-s096-topics-in-mathematics-with-applications-in-finance-fall-2013/1926c83ecd7ea700f7cb63914c6d7c0f_MIT18_S096F13_lecnote8.pdf)</sup>

## 检测与绘图

自相关函数经博克斯（Box）与詹金斯（Jenkins）于 1976 年系统化，有两个用途：检测数据中的非随机性；当数据非随机时，识别合适的时间序列模型。<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup> 用于随机性检验时，通常关注的是滞后 1 自相关；用于模型识别时，则对多个滞后绘制自相关。<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup>

自相关图以滞后为横轴展示估计的自相关，并附 95% 与 99% 水平的置信带；带外的点表示统计上显著的值，滞后 0 的值恒为 1。<sup>[4](https://www.itl.nist.gov/div898/handbook/eda/section4/eda4283.htm)</sup> 在 NIST 的一个实例中，某数据集的滞后 1 自相关为 0.281，这是非随机性的轻微迹象，结合游程检验，并不足以放弃简单的常数加误差模型。<sup>[4](https://www.itl.nist.gov/div898/handbook/eda/section4/eda4283.htm)</sup> 配套的图形检查还包括滞后图和游程序列图。<sup>[2](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup>

## 为何对推断至关重要

随机性是标准单变量统计程序背后的关键假设之一。若因自相关导致随机性假设不成立，则所有常用的统计检验都失效，常见统计量计算出的不确定度变得毫无意义，为预先指定容差计算出的最小样本量变得毫无意义，简单模型 \( y = \text{常数} + \text{误差} \) 也失效。<sup>[5](https://www.itl.nist.gov/div898/handbook/eda/section2/eda251.htm)</sup> 该处将自相关描述为一种依赖于时间的非随机性：在滞后 k 处，它衡量相隔 k 个时间周期的观测之间的相关，滞后 1 指相邻观测，且并不意味依赖关系很强。<sup>[5](https://www.itl.nist.gov/div898/handbook/eda/section2/eda251.htm)</sup><sup> • </sup><sup>[2](https://itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)</sup>

同样的问题也影响测量科学。当重复测量存在自相关时，传统的平均值不确定度处理方法——假定各次测量统计独立——并不适用；张（Zhang）提出了一种实用方法，用于计算数据来自平稳过程时均值的不确定度与置信区间，并以扫描电子显微镜线宽测量和重量测量为例作了说明。<sup>[9](https://www.nist.gov/publications/calculation-uncertainty-mean-autocorrelated-measurements?pub_id=151800)</sup>

自相关还会扭曲两个序列之间的比较。各自自相关的序列之间的互相关可能显示虚假关系，因此在知觉、绩效和神经科学领域的分析中，建议先确立平稳性、对序列预白化，并建立传递函数自回归模型，而不是依赖原始的互相关。<sup>[10](https://researchers.westernsydney.edu.au/en/publications/dangers-and-uses-of-cross-correlation-in-analyzing-time-series-in/)</sup>

## 与平稳性和建模的关系

平稳过程的均值、方差和自相关结构不随时间变化；实际而言，序列看起来是平坦的，没有趋势，方差恒定，自相关结构恒定，且没有周期性（季节性）波动。<sup>[6](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm)</sup> 平稳性与自相关是相容的：平稳序列可以是自相关的，因为平稳性只要求给定滞后处的自相关不随时间变化，而不要求它为零。<sup>[6](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm)</sup>

当序列不平稳时，往往可以对其进行变换：差分 \( Y_i = Z_i - Z_{i-1} \) 可消除趋势，通常一次差分即足够；拟合曲线可吸收长期趋势；对数或平方根可稳定非恒定方差。<sup>[6](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm)</sup> 样本 ACF 的形状可指导这一选择：若 ACF 缓慢衰减，序列很可能不平稳；若数值在许多滞后处都接近 1，则需要差分。<sup>[11](https://econ.pages.code.wm.edu/408/docs/stationarity.html)</sup><sup> • </sup><sup>[12](https://online.stat.psu.edu/stat510/Lesson03)</sup>

ACF 还能识别具体模型。对于一阶自回归 AR(1) 过程 \( X_t - \mu = \phi(X_{t-1} - \mu) + \eta_t \)，该过程为协方差平稳当且仅当 \( |\phi| < 1 \)，其自相关按等比规律衰减，\( \rho(j) = \phi^j \)。<sup>[8](https://ocw.mit.edu/courses/18-s096-topics-in-mathematics-with-applications-in-finance-fall-2013/1926c83ecd7ea700f7cb63914c6d7c0f_MIT18_S096F13_lecnote8.pdf)</sup> 最简单的平稳过程是白噪声，其在每个非零滞后处的自相关均为零。<sup>[7](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50809)</sup> 在按时间排序数据的回归中，误差的自相关可用从参数到非参数的各种工具来检查：德宾—沃森（Durbin-Watson）统计量、自相关函数，以及残差图和游程检验。<sup>[13](https://onlinelibrary.wiley.com/doi/10.1002/9781118532843.ch5)</sup>

## 历史

对时间上相继观测之间相关性的统计研究，在二十世纪初已是一个活跃问题。英国统计学家、皇家学会会员尤尔（G. Udny Yule）在 1921 年发表于《皇家统计学会杂志》的论文中讨论了“时间相关问题”，特别涉及变量差分相关方法，其基础是胡克（Hooker）、学生（Student）和皮尔逊（Pearson）早先关于消除因时间或空间位置所致的虚假相关的工作。<sup>[14](https://academic.oup.com/jrsssa/article/84/4/497/7014551)</sup>

## 时间序列之外的应用

只要将信号与其自身的平移副本相比较，同样的数学对象就会出现。在表面计量学中，表面轮廓 \( z(x) \) 的自相关函数

\[ C(\tau) = \frac{\int_0^L z(x)\, z(x+\tau)\, dx}{\int_0^L z(x)^2\, dx} \]

其中 \( \tau \) 为平移距离，L 为评定长度，通过函数在零平移附近的衰减揭示表面结构的横向范围。<sup>[15](https://physics.nist.gov/VSC/Help/Correlation/Auto_Correlation.jsp)</sup>

在荧光相关光谱（FCS）中，自相关衡量荧光信号的自相似性：涨落 \( \delta F(t) = F(t) - \langle F(t) \rangle \) 与自身在滞后 \( \tau \) 处相关，得到 \( G(\tau) = \langle \delta F(t)\,\delta F(t+\tau) \rangle / \langle F(t) \rangle^2 \)，由此可提取荧光分子的扩散系数、浓度和化学反应速率常数。<sup>[16](https://pmc.ncbi.nlm.nih.gov/articles/PMC3071976/)</sup><sup> • </sup><sup>[17](https://pmc.ncbi.nlm.nih.gov/articles/PMC3244056/)</sup>

在现代机器学习中，自相关建模已成为深度时间序列预测的组织原则：2026 年《IEEE 模式分析与机器智能汇刊》上的一篇综述围绕两大挑战来组织该领域，即设计对输入历史中的自相关进行建模的神经架构，以及设计对标签序列中的自相关进行建模的损失函数。<sup>[3](https://arxiv.org/abs/2603.19899)</sup>

## References

1. [Autocorrelation, OSAC Lexicon term, NIST](https://www.nist.gov/glossary-term/44856)
2. [1.3.5.12. Autocorrelation, NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/eda/section3/eda35c.htm)
3. [Hao Wang and colleagues (2026). Deep Time-Series Forecasting in 10 Years: A Survey. arXiv/IEEE TPAMI.](https://arxiv.org/abs/2603.19899)
4. [1.4.2.8.3. Quantitative Output and Interpretation, NIST/SEMATECH e-Handbook](https://www.itl.nist.gov/div898/handbook/eda/section4/eda4283.htm)
5. [1.2.5.1. Consequences of Non-Randomness, NIST/SEMATECH e-Handbook](https://www.itl.nist.gov/div898/handbook/eda/section2/eda251.htm)
6. [6.4.4.2. Stationarity, NIST/SEMATECH e-Handbook](https://www.itl.nist.gov/div898/handbook/pmc/section4/pmc442.htm)
7. [P. Winkel and N.-F. Zhang (2004). Scand J Clin Lab Invest 64:195-204.](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50809)
8. [MIT 18.S096 Time Series Analysis, lecture notes on stationarity and ARMA models](https://ocw.mit.edu/courses/18-s096-topics-in-mathematics-with-applications-in-finance-fall-2013/1926c83ecd7ea700f7cb63914c6d7c0f_MIT18_S096F13_lecnote8.pdf)
9. [N. Zhang (2006). Calculation of the uncertainty of the mean of autocorrelated measurements. Metrologia.](https://www.nist.gov/publications/calculation-uncertainty-mean-autocorrelated-measurements?pub_id=151800)
10. [R. T. Dean and W. T. M. Dunsmuir (2016). Dangers and uses of cross-correlation in analyzing time series. Behavior Research Methods 48(2):783-802.](https://researchers.westernsydney.edu.au/en/publications/dangers-and-uses-of-cross-correlation-in-analyzing-time-series-in/)
11. [Stationarity, Time Series Econometrics course notes, Williams College](https://econ.pages.code.wm.edu/408/docs/stationarity.html)
12. [STAT 510 Lesson 3: Identifying and Estimating ARIMA models, Penn State](https://online.stat.psu.edu/stat510/Lesson03)
13. [Time Series Data and Autocorrelation, Handbook of Regression Analysis, Wiley](https://onlinelibrary.wiley.com/doi/10.1002/9781118532843.ch5)
14. [G. Udny Yule (1921). On the Time-Correlation Problem. Journal of the Royal Statistical Society 84(4):497-526.](https://academic.oup.com/jrsssa/article/84/4/497/7014551)
15. [Auto Correlation, NIST Virtual Surface Metrology help; T. V. Vorburger and J. Raja, Surface Finish Metrology Tutorial, NISTIR 89-4088 (1990)](https://physics.nist.gov/VSC/Help/Correlation/Auto_Correlation.jsp)
16. [Y. Tian, M. M. Martinez, D. Pappas (2011). Fluorescence Correlation Spectroscopy: A Review of Biochemical and Microfluidic Applications. Appl Spectrosc 65(4):115-124.](https://pmc.ncbi.nlm.nih.gov/articles/PMC3071976/)
17. [E. L. Elson (2011). Fluorescence Correlation Spectroscopy: Past, Present, Future. Biophys J 101(12):2855-2870.](https://pmc.ncbi.nlm.nih.gov/articles/PMC3244056/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Probability theory › Random variables › Exchangeability, independence, and Gaussian structure › Uncorrelatedness and covariance structure

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/autocorrelation

English original: https://www.edgepedia.org/autocorrelation
