dsp-0.2.5: Haskell Digital Signal Processing

Copyright(c) Matthew Donadio 2003
LicenseGPL
Maintainerm.p.donadio@ieee.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell98

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

cxy Source #

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]

cxy_b Source #

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

cxy_u Source #

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

cxx Source #

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

cxx_b Source #

Arguments

:: (Ix a, Integral a, RealFloat b) 
=> Array a (Complex b)

x

-> a

k

-> Complex b

C_xx[k] / N

biased auto-covariance

cxx_u Source #

Arguments

:: (Ix a, Integral a, RealFloat b) 
=> Array a (Complex b)

x

-> a

k

-> Complex b

C_xx[k] / (N-k)

unbiased auto-covariance