factory-0.3.2.2: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell2010

Factory.Math.Statistics

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Miscellaneous statistics functions.
Synopsis

Functions

getMean :: (Foldable foldable, Fractional result, Real value) => foldable value -> result Source #

getRootMeanSquare :: (Foldable foldable, Floating result, Real value) => foldable value -> result Source #

Determines the root mean square of the specified numbers; https://en.wikipedia.org/wiki/Root_mean_square.

getWeightedMean Source #

Arguments

:: (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; https://en.wikipedia.org/wiki/Weighted_arithmetic_mean.
  • The specified value is only evaluated if the corresponding weight is non-zero.
  • CAVEAT: because the operand is more general than a list, no optimisation is performed when supplied a singleton.

getVariance :: (Foldable foldable, Fractional variance, Functor foldable, Real value) => foldable value -> variance Source #

getStandardDeviation :: (Foldable foldable, Floating result, Functor foldable, Real value) => foldable value -> result Source #

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

getAverageAbsoluteDeviation :: (Foldable foldable, Fractional result, Functor foldable, Real value) => foldable value -> result Source #

getCoefficientOfVariance :: (Foldable foldable, Eq result, Floating result, Functor foldable, Real value) => foldable value -> result Source #

Determines the coefficient-of-variance of the specified numbers; https://en.wikipedia.org/wiki/Coefficient_of_variation.

nCr Source #

Arguments

:: (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; https://en.wikipedia.org/wiki/Combination.

nPr Source #

Arguments

:: (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; https://en.wikipedia.org/wiki/Permutations.