Closed dmitrykorolev-stripe closed 5 years ago
For values of a
which are somewhat larger than b
, the CDF will return a true zero and not something like 1.23e-17. This will abort the computation, returning the current guess, which is very far off the expected value.
Thanks @dmitrykorolev-stripe for fixing this!
ptal @clbustos
This fixes ruby implementation of
p_value
andquantile
for beta distribution which are broken for high values ofa
andb
.For example
quantile(0.86, 1076, 1)
returns0.5
while it should return a number close to 1,quantile(0.3, 10_000, 10_000)
returns0.25
while expected result is ~0.5.