Skip to content

Commit

Permalink
Update tests for mode(Binomial) and modes(Binomial)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusps authored Dec 17, 2024
1 parent 194adf9 commit ea39724
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/univariate/discrete/binomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,18 @@ end
@test median(Binomial(45,3//10)) == 13
@test median(Binomial(65,3//10)) == 19
@test median(Binomial(85,3//10)) == 25

# Test mode
@test Distributions.mode(Binomial(100, 0.4)) == 40
@test Distributions.mode(Binomial(1, 0.51)) == 1
@test Distributions.mode(Binomial(1, 0.49)) == 0
@test mode(Binomial(100, 0.4)) == 40
@test mode(Binomial(1, 0.51)) == 1
@test mode(Binomial(1, 0.49)) == 0
@test mode(Binomial(4, 2//3)) == 3
@test mode(Binomial(6, 2//7)) == 1
@test mode(Binomial(7, 1//8)) == 0

@test modes(Binomial(4, 2//3)) == [3, 4]
@test modes(Binomial(6, 2//7)) == [1, 2]
@test modes(Binomial(7, 1//8)) == [0, 1]

@test isplatykurtic(Bernoulli(0.5))
@test ismesokurtic(Normal(0.0, 1.0))
Expand Down

0 comments on commit ea39724

Please sign in to comment.