rodrigosetti/probdist

Binomial Distribution undefined

Opened this issue · 2 comments

Hi,

When doing a binomial estimate using a low chance and large number of trials, such as 3600 trials and a 0.08 probability, the result is undefined.

Any ideas as to if this can be patched?

Looks like "nfactorial" returns Infinity, which could be the issue. Might need to use an alternative method rather than factorials?

Factorial of 3600 is 2.54... × 10^11241, too big to represent in javascript integer. We could use BigInteger, but a better solution would be a different solution for the binomial probability