BUILT-IN MATHEMATICA SYMBOL

# 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).
• 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
• CorrelationFunction[proc, h] is defined only if proc is a weakly stationary process and is equivalent to CorrelationFunction[proc, 0, h].
• The process proc can be any random process such as ARMAProcess or WienerProcess.
• 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.
• 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

## ExamplesExamplesopen allclose all

### Basic Examples (4)Basic Examples (4)

Estimate the correlation function at lag 2:

 Out[1]=

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

 Out[2]=

The correlation function for a discrete-time process:

 Out[1]=
 Out[2]=

The correlation function for a continuous-time process:

 Out[1]=
 Out[2]=