Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
A very basic descriptive statistics. Functions use a tail recursion approach to compute the values and are strict by an accumulator.
Synopsis
- mean2 :: RealFrac a => [a] -> a -> a -> a -> a
- mean2F :: [Float] -> Float# -> Float# -> Float# -> Float
- meanWithDispersion :: (RealFrac a, Floating a) => [a] -> a -> a -> a -> a -> a -> (a, a)
- meanWithDispersionF :: [Float] -> Float# -> Float# -> Float# -> Float# -> Float# -> (Float, Float)
- mean :: RealFrac a => [a] -> a
- meanF :: [Float] -> Float
- meanWithDisp :: (RealFrac a, Floating a) => [a] -> (a, a)
- meanWithDispF :: [Float] -> (Float, Float)
Documentation
mean2 :: RealFrac a => [a] -> a -> a -> a -> a Source #
A tail-recursive realization for the statistic mean.
mean2F :: [Float] -> Float# -> Float# -> Float# -> Float Source #
Similar to mean2
, but uses GHC unlifted types from ghc-prim
package.
meanWithDispersion :: (RealFrac a, Floating a) => [a] -> a -> a -> a -> a -> a -> (a, a) Source #
One-pass and tail-recursive realization for the pair of the mean and dispersion. Is vulnerable to the floating-point cancellation errors.
meanWithDispersionF :: [Float] -> Float# -> Float# -> Float# -> Float# -> Float# -> (Float, Float) Source #
mean :: RealFrac a => [a] -> a Source #
A tail-recursive realization for the statistic mean. A variant of the mean2
function.
meanWithDisp :: (RealFrac a, Floating a) => [a] -> (a, a) Source #