staf-1.0.0: Numerical statistics for Foldable containers

Copyright(c) Daniel Lovasko 2016
LicenseOtherLicense
MaintainerDaniel Lovasko <daniel.lovasko@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Stats.Foldable

Description

Stats.Foldable is a pure Haskell module that implements a safe interface to a set of basic numerical statistics that only assume the Foldable typeclass for the underlying container.

Synopsis

Documentation

amean Source #

Arguments

:: (Foldable f, Floating a) 
=> f a

population

-> Maybe a

arithmetic mean

Compute the arithmetic mean of a population.

min Source #

Arguments

:: (Foldable f, Ord a) 
=> f a

population

-> Maybe a

minimal value

Find the minimal value of a series.

max Source #

Arguments

:: (Foldable f, Ord a) 
=> f a

population

-> Maybe a

maximal value

Find the maximal value of a population.

var Source #

Arguments

:: (Foldable f, Floating a) 
=> f a

population

-> Maybe a

variance

Compute the variance of a population.

stddev Source #

Arguments

:: (Foldable f, Floating a) 
=> f a

population

-> Maybe a

standard deviation

Compute the standard deviation of a population.

covar Source #

Arguments

:: (Foldable f, Floating a) 
=> f a

first population

-> f a

second population

-> Maybe a

covariance

Compute the covariance of two populations.

correl Source #

Arguments

:: (Foldable f, Floating a) 
=> f a

first population

-> f a

second population

-> Maybe a

correlation

Compute the correlation of two populations.