We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When (n+1)*p is integer, then there are two modes, see https://onlinelibrary.wiley.com/doi/10.1111/j.1467-9574.1980.tb00681.x. The documentation states
(n+1)*p
mode(d::UnivariateDistribution) Returns the first mode.
but the second is returned, e.g.
julia> [(i, (pdf(Binomial(5, 4/6), i))) for i in 0:5] 6-element Vector{Tuple{Int64, Float64}}: (0, 0.004115226337448564) (1, 0.04115226337448562) (2, 0.16460905349794255) (3, 0.329218106995885) (4, 0.3292181069958847) (5, 0.13168724279835395) julia> mode(Binomial(5, 4/6)) 4
The text was updated successfully, but these errors were encountered:
Also, modes(d) returns [4] in this case, when it should be [3, 4]
modes(d)
[4]
[3, 4]
Sorry, something went wrong.
Returns smallest mode in mode(Binomial), fix modes
mode
mode(Binomial)
modes
194adf9
Fix JuliaStats#1927
Successfully merging a pull request may close this issue.
When
(n+1)*p
is integer, then there are two modes, see https://onlinelibrary.wiley.com/doi/10.1111/j.1467-9574.1980.tb00681.x. The documentation statesbut the second is returned, e.g.
The text was updated successfully, but these errors were encountered: