Copyright | (c) Matthew Donadio 2003 |
---|---|
License | GPL |
Maintainer | m.p.donadio@ieee.org |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
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.
- cxy :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> Array a (Complex b) -> a -> Complex b
- cxy_b :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> Array a (Complex b) -> a -> Complex b
- cxy_u :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> Array a (Complex b) -> a -> Complex b
- cxx :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> a -> Complex b
- cxx_b :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> a -> Complex b
- cxx_u :: (Ix a, Integral a, RealFloat b) => Array a (Complex b) -> a -> Complex b
Documentation
:: (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]
:: (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
:: (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
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
biased auto-covariance