statistics 0.3.5 → 0.3.6
raw patch · 2 files changed
+5/−3 lines, 2 files
Files
Statistics/Distribution/Binomial.hs view
@@ -25,6 +25,7 @@ import Control.Exception (assert) import Data.Array.Vector+import Data.Int (Int64) import Data.Typeable (Typeable) import qualified Statistics.Distribution as D import Statistics.Math (choose)@@ -57,8 +58,9 @@ sumU . mapU (density d . fromIntegral) . enumFromToU (0::Int) . floor quantile :: BinomialDistribution -> Double -> Double-quantile d@(BD n _p) p = D.findRoot d p (n'/2) 0 n'- where n' = fromIntegral n+quantile d@(BD n _p) p = fromIntegral . r64 $ D.findRoot d p (n'/2) 0 n'+ where n' = fromIntegral n+ r64 = round :: Double -> Int64 mean :: BinomialDistribution -> Double mean (BD n p) = fromIntegral n * p
statistics.cabal view
@@ -1,5 +1,5 @@ name: statistics-version: 0.3.5+version: 0.3.6 synopsis: A library of statistical types, data, and functions description: This library provides a number of common functions and types useful