Open newptcai opened 5 years ago
Would be cool to have, though may not be that practical.
I just need this for relatively small $n$. I can do write a bit script to do compute the probabilities, but it feels cleaner to extend the pdf function.
I think the delegate_statsfuns is also an issue, we cannot enjoy generics with functions called from R. In the case of Binomial, it's a bit sad to have to call R, PR welcome
I'd be happy to work on this, but I'm mostly new contributing to open source. Why do you say delegate_statsfuns is "also" an issue? To me, it seems like it's the only place in binomial.jl where Rationals are unnecessarily converted into Floats. Wouldn't the solution be to implement the functionality of delegate_statsfuns for the binomial distribution directly in binomial.jl, indeed removing the dependence on R?
The solution to the R dependency is https://github.com/JuliaStats/StatsFuns.jl/pull/113.
If the parameters of binomial distribution are given in rational number, then perhaps the pdf function should also return rational number. But now it gives Float64, which can cause some unintended rounding problems.