Closed vvladislav closed 2 years ago
Hello, in Statistics.Distribution.Binomial.hs I found wrong behavior in check that p in [0,1]. I think you want to write:
binomialE n p | n < 0 = Nothing | p >= 0 && p <= 1 = Just (BD n p) | otherwise = Nothing
Because p >= 0 || p <= 1 is true for any p.
https://github.com/haskell/statistics/blob/c7a3d47eccd09e4f6a230cd27054d8ccb68f34b7/Statistics/Distribution/Binomial.hs#L168
Yes, you're right. Small nitpick expression evaluates to false for NaN. :)
Thank you for the report. 0.16.0.2 with fix is on hackage
I was glad to help)
Hello, in Statistics.Distribution.Binomial.hs I found wrong behavior in check that p in [0,1]. I think you want to write:
Because p >= 0 || p <= 1 is true for any p.
https://github.com/haskell/statistics/blob/c7a3d47eccd09e4f6a230cd27054d8ccb68f34b7/Statistics/Distribution/Binomial.hs#L168