tdigest-0.2.1: On-line accumulation of rank-based statistics

Safe HaskellNone
LanguageHaskell2010

Data.TDigest.Vector.Postprocess

Contents

Description

TDigest postprocessing functions.

These are re-exported from Data.TDigest module.

Synopsis

Quantiles

median :: KnownNat comp => TDigest comp -> Maybe Double Source #

Median, i.e. quantile 0.5.

quantile :: KnownNat comp => Double -> TDigest comp -> Maybe Double Source #

Calculate quantile of a specific value.

Mean & variance

As we have "full" histogram, we can calculate other statistical variables.

mean :: KnownNat comp => TDigest comp -> Maybe Double Source #

Mean.

>>> mean (tdigest [1..100] :: TDigest 10)
Just 50.5

Note: if you only need the mean, calculate it directly.

variance :: KnownNat comp => TDigest comp -> Maybe Double Source #

Variance.

stddev :: KnownNat comp => TDigest comp -> Maybe Double Source #

Standard deviation, square root of variance.

CDF

cdf :: KnownNat comp => Double -> TDigest comp -> Double Source #

Cumulative distribution function.

Note: if this is the only thing you need, it's more efficient to count this directly.

icdf :: KnownNat comp => Double -> TDigest comp -> Maybe Double Source #

An alias for quantile