Safe Haskell | None |
---|---|
Language | Haskell98 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Miscellaneous statistics functions.
- getMean :: (Foldable foldable, Fractional result, Real value) => foldable value -> result
- getWeightedMean :: (Foldable foldable, Fractional result, Real value, Real weight) => foldable (value, weight) -> result
- getVariance :: (Foldable foldable, Fractional variance, Functor foldable, Real value) => foldable value -> variance
- getStandardDeviation :: (Foldable foldable, Floating result, Functor foldable, Real value) => foldable value -> result
- getAverageAbsoluteDeviation :: (Foldable foldable, Fractional result, Functor foldable, Real value) => foldable value -> result
- getCoefficientOfVariance :: (Foldable foldable, Eq result, Floating result, Functor foldable, Real value) => foldable value -> result
- nCr :: (Algorithmic factorialAlgorithm, Integral i, Show i) => factorialAlgorithm -> i -> i -> i
- nPr :: (Integral i, Show i) => i -> i -> i
Functions
getMean :: (Foldable foldable, Fractional result, Real value) => foldable value -> result Source
- Determines the mean of the specified numbers; http://en.wikipedia.org/wiki/Mean.
- Should the caller define the result-type as
Rational
, then it will be free from rounding-errors.
:: (Foldable foldable, Fractional result, Real value, Real weight) | |
=> foldable (value, weight) | Each pair consists of a value & the corresponding weight. |
-> result |
- Determines the weighted mean of the specified numbers; http://en.wikipedia.org/wiki/Weighted_arithmetic_mean.
- The specified value is only evaluated if the corresponding weight is non-zero.
- Should the caller define the result-type as
Rational
, then it will be free from rounding-errors.
getVariance :: (Foldable foldable, Fractional variance, Functor foldable, Real value) => foldable value -> variance Source
- Determines the exact variance of the specified numbers; http://en.wikipedia.org/wiki/Variance.
- Should the caller define the result-type as
Rational
, then it will be free from rounding-errors.
getStandardDeviation :: (Foldable foldable, Floating result, Functor foldable, Real value) => foldable value -> result Source
Determines the standard-deviation of the specified numbers; http://en.wikipedia.org/wiki/Standard_deviation.
getAverageAbsoluteDeviation :: (Foldable foldable, Fractional result, Functor foldable, Real value) => foldable value -> result Source
- Determines the average absolute deviation of the specified numbers; http://en.wikipedia.org/wiki/Absolute_deviation#Average_absolute_deviation.
- Should the caller define the result-type as
Rational
, then it will be free from rounding-errors.
getCoefficientOfVariance :: (Foldable foldable, Eq result, Floating result, Functor foldable, Real value) => foldable value -> result Source
Determines the coefficient-of-variance of the specified numbers; http://en.wikipedia.org/wiki/Coefficient_of_variation.
:: (Algorithmic factorialAlgorithm, Integral i, Show i) | |
=> factorialAlgorithm | |
-> i | The total number of items from which to select. |
-> i | The number of items in a sample. |
-> i | The number of combinations. |
The number of unordered combinations of r objects taken from n; http://en.wikipedia.org/wiki/Combination.
:: (Integral i, Show i) | |
=> i | The total number of items from which to select. |
-> i | The number of items in a sample. |
-> i | The number of permutations. |
The number of permutations of r objects taken from n; http://en.wikipedia.org/wiki/Permutations.