Closed rpglover64 closed 8 years ago
Thanks for pointing this out. R has
> sum(dbinom(1:151,5000,1/52))
[1] 0.9999999
> sum(dbinom(1:152,5000,1/52))
[1] 1
I think the solution is to use
*Main> Data.List.sum $ map exp $ map (integralBinomialLogPdf 5000 (1/52)) (map fromIntegral [0..170])
0.9999999999978313
*Main> Data.List.sum $ map exp $ map (integralBinomialLogPdf 5000 (1/52)) (map fromIntegral [0..200])
0.9999999999999999
Any views?
I should add that this uses the method given in Catherine Loader's paper, the only reference for which seems to be in here:
I just made the change.
integralBinomialCDF 5000 (1/52) 170
computes toInfinity
,integralBinomialCDF 5000 (1/52) 200
computes toNaN
.