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   300
#> 2   313
#> 3   305
#> 4   303
#> 5   294
#> 6   311
#> 7   273
#> 8   298
#> 9   283
#> 10  300