TimeSeriesAutocovariance Method (Int32) |
Namespace: Meta.Numerics.Statistics
In a length-N time series, there are N-k lag-k observations. Nonetheless, the definition of the lag-k autocovariance requires division by N, not N-k. This counterintuitive convention insures that the autocovariance has desirable positive definiteness properties and agrees with the computation via FFT.
The computation of an autocovariance via this method is O(N). If you need to compute more than a handfull of autocovariances, it is more efficient to call the Autocovariance, which computes all of them in O(N log N).
While the sample autocovariance does converge to the population autocovariance in the large-N limit, this convergence is very slow. If you want the value of the population covariance, use PopulationStatistics to obtain a much better estimate.