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.

DetailsDetails

  • CovarianceFunction is also known as autocovariance function.
  • CovarianceFunction for a process proc with mean function and value 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
  • CovarianceFunction[proc, h] is defined only if proc is a weakly stationary process and is equivalent to CovarianceFunction[proc, 0, h].
  • The process proc can be any random process such as ARMAProcess and WienerProcess.
  • CovarianceFunction[{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 covariance function at lag 2:

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

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

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

Calculate the covariance function for a discrete-time process:

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

Calculate the covariance function for a continuous-time process:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »