-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rational param breaks Binomial CDF #98
Comments
The cdf of the Binomial distribution is based on the incomplete Beta function which is very complicated function to implement reliably. However, I guess we could have a naive fallback that sums up the probabilities. |
Certainly! I’d be happy to get involved in implementing this. I’m relatively new to Julia though, as well as to statistics generally. I have a few questions:
|
Related: #33 |
The issue was fixed by #125. With StatsFuns 0.9.11: julia> using Distributions; ccdf(Binomial(7, 1//5), 1)
0.4232832000000002 |
StatsFuns.binomccdf()
maps to the eponymous R function, as shown below.StatsFuns.jl/src/distrs/binom.jl
Lines 3 to 13 in d99fdf4
However, when called on a binomial distribution with
𝑝::Rational
, an error occurs; currently, the only option is to convert the parameter usingfloat()
. Note that although the code below uses Distributions, I believe the error is on the part of StatsFuns: see this code in Distributions for the call to StatsFuns.Is this intended behavior? Such distributions work just fine with
StatsPlots.plot()
.The text was updated successfully, but these errors were encountered: