Safe Haskell | None |
---|

`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Miscellaneous statistics functions.

- getMean :: (Foldable f, Real r, Fractional result) => f r -> result
- getVariance :: (Foldable f, Fractional variance, Functor f, Real r) => f r -> variance
- getStandardDeviation :: (Foldable f, Floating result, Functor f, Real r) => f r -> result
- getAverageAbsoluteDeviation :: (Foldable f, Fractional result, Functor f, Real r) => f r -> result
- getCoefficientOfVariance :: (Foldable f, Eq result, Floating result, Functor f, Real r) => f r -> result
- nCr :: (Algorithmic factorialAlgorithm, Integral i, Show i) => factorialAlgorithm -> i -> i -> i
- nPr :: (Integral i, Show i) => i -> i -> i

# Functions

getMean :: (Foldable f, Real r, Fractional result) => f r -> resultSource

- 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.

getVariance :: (Foldable f, Fractional variance, Functor f, Real r) => f r -> varianceSource

- 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 f, Floating result, Functor f, Real r) => f r -> resultSource

Determines the *standard-deviation* of the specified numbers; http://en.wikipedia.org/wiki/Standard_deviation.

getAverageAbsoluteDeviation :: (Foldable f, Fractional result, Functor f, Real r) => f r -> resultSource

- 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 f, Eq result, Floating result, Functor f, Real r) => f r -> resultSource

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.