aherbert opened a new pull request #28: URL: https://github.com/apache/commons-statistics/pull/28
While a naive implementation would simply be `1-cumulativeProbability`, that would result in loss of precision. For many of the current discrete distributions a higher precision survival probability is calculated. For others, it is simply `1-cumulativeProbability`. Many tests were added to verify the following: - the precision of cumulativeProbability - the precision of survivalProbability - That survivalProbabiliy is near 1-cumulative - That survival and cumulative probabilities are complementary Through this development, certain distributions were found lacking precision for their cumulativeProbabilities and were improved. These were: - BinomialDistribution Expanding the tests for the Pascal distribution for the degenerate cases found a bug in the p=1 degenerate case when x=0. The NaN return value has been corrected to either 0 (x=0) or -infinity (x!=0). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org