CorrelationFunction

CorrelationFunction[data,hspec]
estimates the correlation function at lags hspec from data.

CorrelationFunction[proc,hspec]
represents the correlation function at lags hspec for the random process proc.

CorrelationFunction[proc,s,t]
represents the correlation function at times s and t for the random process proc.

DetailsDetails

  • CorrelationFunction is also known as autocorrelation or cross-correlation function (ACF or CCF).
  • The following specifications can be given for hspec:
  • τat time or lag τ
    {τmax}unit spaced from 0 to
    {τmin,τmax}unit spaced from to
    {τmin,τmax,dτ}from to in steps of dτ
    {{τ1,τ2,}}use explicit
  • CorrelationFunction[{x1,,xn},h] is equivalent to with =Mean[{x1,,xn}].
  • When data is TemporalData containing an ensemble of paths, the output represents the average across all paths.
  • CorrelationFunction of the process proc is the CovarianceFunction c normalized by the outer product of the standard deviation function σ at times s and t:
  • c[s,t]/(σ[s]σ[t])for scalar-valued data or processes
    c[s,t]/(σ[s] σ[t])for vector-valued data or processes
  • The symbol represents KroneckerProduct.
  • CorrelationFunction[proc,h] is defined only if proc is a weakly stationary process and is equivalent to CorrelationFunction[proc,h,0].
  • The process proc can be any random process, such as ARMAProcess and WienerProcess.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Estimate the correlation function at lag 2:

In[1]:=
Click for copyable input
Out[1]=

The sample correlation function for a random sample from an autoregressive time series:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

The correlation function for a discrete-time process:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

The correlation function for a continuous-time process:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2012
(9.0)