hstats-0.3: Statistical Computing in Haskell

Math.Statistics

Synopsis

Documentation

mean :: Floating a => [a] -> aSource

Numerically stable mean

average :: Floating a => [a] -> aSource

Same as mean

harmean :: Floating a => [a] -> aSource

Harmonic mean

geomean :: Floating a => [a] -> aSource

Geometric mean

median :: (Floating a, Ord a) => [a] -> aSource

Median

modes :: Ord a => [a] -> [(Int, a)]Source

Modes returns a sorted list of modes in descending order

mode :: Ord a => [a] -> Maybe aSource

Mode returns the mode of the list, otherwise Nothing

centralMoment :: (Floating b, Integral t) => [b] -> t -> bSource

Central moments

range :: (Num a, Ord a) => [a] -> aSource

Range

avgdev :: Floating a => [a] -> aSource

Average deviation

stddev :: Floating a => [a] -> aSource

Standard deviation of sample

stddevp :: Floating a => [a] -> aSource

Standard deviation of population

pvar :: Floating a => [a] -> aSource

Population variance

quantile :: (Fractional b, Ord b) => Double -> [b] -> bSource

Sample variance

Interquartile range

Arbitrary quantile q of an unsorted list. The quantile q of N |data points is the point whose (zero-based) index in the sorted |data set is closest to q(N-1).

quantileAsc :: (Fractional b, Ord b) => Double -> [b] -> bSource

As quantile specialized for sorted data

skew :: Floating b => [b] -> bSource

Calculate skew

pearsonSkew1 :: (Ord a, Floating a) => [a] -> aSource

Calculates pearson skew

pearsonSkew2 :: (Ord a, Floating a) => [a] -> aSource

covar :: Floating a => [a] -> [a] -> aSource

Sample Covariance

covMatrix :: Floating a => [[a]] -> [[a]]Source

Covariance matrix

pearson :: Floating a => [a] -> [a] -> aSource

Pearson's product-moment correlation coefficient

correl :: Floating a => [a] -> [a] -> aSource

Same as pearson

linreg :: Floating b => [(b, b)] -> (b, b, b)Source

Least-squares linear regression of y against x for a |collection of (x, y) data, in the form of (b0, b1, r) |where the regression is y = b0 + b1 * x with Pearson |coefficient r

devsq :: Floating a => [a] -> aSource

Returns the sum of square deviations from their sample mean.