Skip to content

stat: Add binomial distribution to distuv

Sebastien Binet requested to merge deasmhumhna:add_binomial into master

Created by: deasmhumhna

I considered opening an issue first, but then I just went ahead and wrote the code. This code follows the outline in "NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING". The Poisson approximation for np < 1 was extended to rejection sampling due to failed tests for even moments (variance and ex-kurtosis). 2.6e-02 is a bit of a magic number; it's close to the (smooth) maximum of the difference in log-likelihood between the Poisson and binomial for n > 25.

Merge request reports