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

Safe HaskellNone
LanguageHaskell2010

Data.TDigest.Tree.Postprocess

Contents

Description

TDigest postprocessing functions.

These are re-exported from Data.TDigest module.

Synopsis

Quantiles

median :: TDigest comp -> Maybe Double Source #

Median, i.e. quantile 0.5.

quantile :: 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 :: 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 :: TDigest comp -> Maybe Double Source #

Variance.

stddev :: TDigest comp -> Maybe Double Source #

Standard deviation, square root of variance.

CDF

cdf :: 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 :: Double -> TDigest comp -> Maybe Double Source #

An alias for quantile