Skip to contents

Returns a BINOMIAL distribution object that produce random numbers from a binomial distribution using the rbinom function

Usage

new_BINOMIAL(p_size, p_prob, p_dimnames = "rvar")

Arguments

p_size

integer that represent the number of trials

p_prob

probability of success

p_dimnames

A character that represents the name of the dimension

Value

An object of class DISTRIBUTION, BINOMIAL

Author

John J. Aponte

Examples

myDistr <- new_BINOMIAL(1000,0.3)
myDistr$rfunc(10)
#>    rvar
#> 1   303
#> 2   294
#> 3   311
#> 4   273
#> 5   298
#> 6   283
#> 7   300
#> 8   288
#> 9   311
#> 10  299