DSP.Covariance

Description

This module contains routines to perform cross- and auto-covariance These formulas can be found in most DSP textbooks.

In the following routines, x and y are assumed to be of the same length.

Synopsis

# Documentation

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> Array a (Complex b) y -> a k -> Complex b C_xy[k]

raw cross-covariance

We define covariance in terms of correlation.

Cxy(X,Y) = E[(X - E[X])(Y - E[Y])] = E[XY] - E[X]E[Y] = Rxy(X,Y) - E[X]E[Y]

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> Array a (Complex b) y -> a k -> Complex b C_xy[k] / N

biased cross-covariance

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> Array a (Complex b) y -> a k -> Complex b C_xy[k] / (N-k)

unbiased cross-covariance

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> a k -> Complex b C_xx[k]

raw auto-covariance

Cxx(X,X) = E[(X - E[X])(X - E[X])] = E[XX] - E[X]E[X] = Rxy(X,X) - E[X]^2

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> a k -> Complex b C_xx[k] / N

biased auto-covariance

Arguments

 :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) x -> a k -> Complex b C_xx[k] / (N-k)

unbiased auto-covariance