SeriesAutocovariance(IReadOnlyListDouble) Method

Computes the auto-covariance for all lags.

Definition

Namespace: Meta.Numerics.Statistics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static double[] Autocovariance(
	this IReadOnlyList<double> series
)

Parameters

series  IReadOnlyListDouble
The data series.

Return Value

Double
An array of auto-covariance values, with the array index equal to the lag index.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyListDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The computation of the auto-covariance for a given lag is an O(N) operation. Naively, the computation of the auto-covariance for all N possible lags is therefore an O(N^2) operation; this is in fact the cost of N invocations of Autocovariance(IReadOnlyListDouble, Int32). However, using Fourier techniques, it is possible to simultaneously compute the auto-covariance for all possible lags in O(N log N) operations. This method uses the Fourier technique and should be called if you require the auto-covariance for more than a handful of lag values.

See Also