Statistics - Maple Programming Help

Home : Support : Online Help : Graphics : Statistics : Statistics/Correlogram

Statistics

 Correlogram
 create a column plot of the autocorrelations of data

 Calling Sequence Correlogram(X, options) AutoCorrelationPlot(X, options)

Parameters

 X - data set (1-dimensional), DataSeries options - (optional) equation(s) of the form option=value where option is one of lags or nocaption or any option recognized by Statistics[ColumnPlot].

Description

 • The Correlogram command computes autocorrelations of the data X and displays them as a column plot with dashed lines indicating the lower and upper 95% confidence bands for the normal distribution $N\left(0,\frac{1}{L}\right)$, where L is the size of the sample X, and a caption reporting how many of the displayed columns lie outside of the bands of plus or minus 2, 3, and 4 standard deviations respectively.
 • The AutoCorrelationPlot command is provided as an alias.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $L≔{\mathrm{LinearAlgebra}:-\mathrm{RandomVector}}_{\mathrm{row}}\left(10000,\mathrm{generator}=0..1\right)$
  (1)
 > $\mathrm{Correlogram}\left(L\right)$
 > $\mathrm{Correlogram}\left(L,\mathrm{lags}=100\right)$
 > $\mathrm{Correlogram}\left(L,\mathrm{nocaption}\right)$

Autocorrelation can be used to create correlograms which are useful for detecting periodicity in signals.

 > $R≔⟨\mathrm{seq}\left(\frac{1\left(\mathrm{evalf}\left(\mathrm{sin}\left(17.2i\right)\mathrm{cos}\left(13.8i\right)+1.17\right)+\frac{\mathrm{rand}\left(0..1\right)\left(\right)\cdot 2}{3}\right)}{3},i=1..500\right)⟩$
  (2)
 > $\mathrm{LineChart}\left(R,\mathrm{size}=\left[0.5,"golden"\right]\right)$
 > $\mathrm{Correlogram}\left(R,\mathrm{lags}=100\right)$

Periodicity in a time series can be observed with Autocorrelation.

 > $\mathrm{with}\left(\mathrm{TimeSeriesAnalysis}\right):$
 > $\mathrm{Data}≔\mathrm{Import}\left("datasets/sunspots.csv",\mathrm{base}=\mathrm{datadir},\mathrm{output}=\mathrm{Matrix}\right)$
  (3)
 > $\mathrm{tsData}≔\mathrm{TimeSeries}\left({\mathrm{Data}}_{265..310,2}\right)$
 ${\mathrm{tsData}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{data set}}\\ {\mathrm{46 rows of data:}}\\ {\mathrm{1973 - 2018}}\end{array}\right]$ (4)
 > $\mathrm{Correlogram}\left(\mathrm{GetData}\left(\mathrm{tsData}\right)\right)$

Compatibility

 • The Statistics[Correlogram] command was introduced in Maple 2019.