compute sample autocorrelations of a real Vector
discrete univariate real time series given as a Vector, list, DataSeries object, Matrix with one column, DataFrame with one column, or TimeSeries object with one dataset.
(optional) maximal lag to return, or a range of lags to return. By default all possible lags are returned.
One of biased, unbiased, or none. Default is none. scaling=biased computes Rk=Ckn. scaling=unbiased scales each Ck by 1n−k.
If this option is given, the output is not normalized so that the first entry is 1 when scaling=unbiased or scaling=none.
For a discrete time series X, the AutoCorrelation command computes the autocorrelations Rk=CkC0 where Ck=∑t=1n−k⁡Xt−μ⁢Xt+k−μ for k=0..n−1 and μ is the mean of X.
For efficiency, all of the lags are computed at once using a numerical discrete Fourier transform. Therefore all data provided must have type realcons and all returned solutions are floating-point, even if the problem is specified with exact values.
Note: AutoCorrelation makes use of DiscreteTransforms[FourierTransform] and thus will work strictly in hardware precision, that is, its accuracy is independent of the setting of Digits.
For more time series related commands, see the TimeSeriesAnalysis package.
t ≔ TimeSeriesAnalysis:-TimeSeries⁡1,2,1,2,1,2,1,2,8,7,6,5,4,3,2,1,header=Sales,Profits,enddate=2012-01-01,frequency=monthly
t≔Time seriesSales, Profits8 rows of data:2011-06-01 - 2012-01-01
Autocorrelation can be used to create correlograms which are useful for detecting periodicity in signals.
R ≔ seq⁡1⁢evalf⁡sin⁡17.2⁢i⁢cos⁡13.8⁢i+1.17+rand⁡0..1⁡⋅233,i=1..500:
Periodicity in a time series can be observed with Autocorrelation.
Data ≔ Import⁡datasets/sunspots.csv,base=datadir,output=Matrix
tsData ≔ TimeSeries⁡Data265..310,2
tsData≔Time seriesdata set46 rows of data:1973 - 2018
S ≔ AutoCorrelation⁡tsData
The Statistics[AutoCorrelation] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
The Statistics[AutoCorrelation] command was updated in Maple 2015.
The X parameter was updated in Maple 2015.
Download Help Document
What kind of issue would you like to report? (Optional)