# CovarianceFunction

CovarianceFunction[data,hspec]

estimates the covariance function at lags hspec from data.

CovarianceFunction[proc,hspec]

represents the covariance function at lags hspec for the random process proc.

CovarianceFunction[proc,s,t]

represents the covariance function at times s and t for the random process proc.

# Details

• CovarianceFunction is also known as autocovariance function.
• The following specifications can be given for hspec:
•  τ at time or lag τ {τmax} unit spaced from 0 to τmax {τmin,τmax} unit spaced from τmin to τmax {τmin,τmax,d τ} from τmin to τmax in steps of d τ {{τ1,τ2,…}} use explicit {τ1,τ2,…}
• CovarianceFunction at lag h for data with mean and data values xi is given by:
•  (xi+h- )(xi-) for scalar-valued data for vector-valued data
• When data is TemporalData containing an ensemble of paths, the output represents the average across all paths.
• CovarianceFunction for a process proc with mean function μ[t] and value x[t] at time t is given by:
•  Expectation[(x[s]-μ[s])(x[t]-μ[t])] for a scalar-valued process Expectation[(x[s]-μ[s])⊗(x[t]-μ[t])] for a vector-valued process
• The symbol represents KroneckerProduct.
• CovarianceFunction[proc,h] is defined only if proc is a weakly stationary process and is equivalent to CovarianceFunction[proc,h,0].
• The process proc can be any random process, such as ARMAProcess and WienerProcess.

# Examples

open allclose all

## Basic Examples(4)

Estimate the covariance function at lag 2:

 In[1]:=
 Out[1]=

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

 In[1]:=
 In[2]:=
 Out[2]=

Calculate the covariance function for a discrete-time process:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=

Calculate the covariance function for a continuous-time process:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=