Copyright | (c) Matthew Donadio 2002 |
---|---|
License | GPL |
Maintainer | m.p.donadio@ieee.org |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Simple module for computing the various moments of a list
Reference: Ross, NRiC
Documentation
mean :: Fractional a => [a] -> a Source #
Compute the mean of a list
Mean(X) = 1/N sum(i=1..N) x_i
var :: Fractional a => [a] -> a Source #
Compute the variance of a list
Var(X) = sigma^2
= 1/N-1 sum(i=1..N) (x_i-mu)^2
stddev :: RealFloat a => [a] -> a Source #
Compute the standard deviation of a list
StdDev(X) = sigma = sqrt (Var(X))
avgdev :: RealFloat a => [a] -> a Source #
Compute the average deviation of a list
AvgDev(X) = 1/N sum(i=1..N) |x_i-mu|