[R] package implementing continuous binomial?

Stefan Evert stefanML at collocations.de
Fri May 8 12:48:26 CEST 2015

> I don't think Benjamin should use the zipfR package just for
> these functions  [and even the zipfR package help page on these
> can be read as saying so .. ]

Exactly.  They are simply there because it's much easier to write and read code with wrappers that parametrize the incomplete Beta and Gamma functions in the usual way, so the code looks more like the original equations it's based on.

> In the end I wonder if the "continuous Binomial" is not just a
> version of the good old Beta distribution... as indeed the
> Binomial and the Beta are related in the same way 
> that the Gamma and the Poisson are.

I thought so, too, at first and was about to suggest that.  But a closer look at the slides showed that the distribution function of the continuous binomial and Poisson showed that they keep the boundary of the integral fixed (it's one of the parameters of the distribution) and vary one or two of the other parameters of the function with x.  It took me a while to figure this out because the slides use an uncommon notation for incomplete Gamma and Beta functions.

In particular, qgamma() and qbeta() won't give quantiles for the new distributions and one may have to implement some kind of binary search based on the distribution functions of the continuous binomial and Poisson.

In the interest of self-promotion ;-), Evert (2004, Appendix A.4) spells out the connections between the incomplete Beta and Gamma function, the Beta and Gamma distributions, and the binomial and Poisson distributions in what I consider to be an accessible manner.  (PDF, now at last with bookmarks: http://purl.org/stefan.evert/PUB/Evert2004phd.pdf)


More information about the R-help mailing list