Safe Haskell | None |
---|---|
Language | Haskell2010 |
TDigest
postprocessing functions.
These are re-exported from Data.TDigest module.
Synopsis
- median :: KnownNat comp => TDigest comp -> Maybe Double
- quantile :: KnownNat comp => Double -> TDigest comp -> Maybe Double
- mean :: KnownNat comp => TDigest comp -> Maybe Double
- variance :: KnownNat comp => TDigest comp -> Maybe Double
- stddev :: KnownNat comp => TDigest comp -> Maybe Double
- cdf :: KnownNat comp => Double -> TDigest comp -> Double
- icdf :: KnownNat comp => Double -> TDigest comp -> Maybe Double
Quantiles
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.
stddev :: KnownNat comp => TDigest comp -> Maybe Double Source #
Standard deviation, square root of variance.