Description Usage Arguments Value Note Author(s) Examples
Returns an DISCRETE distribution object that sample from the vector p_supp
of
options with probability the vector of probabilities p_prob
.
1 | new_DISCRETE(p_supp, p_prob, p_dimnames = "rvar")
|
p_supp |
A numeric vector of options |
p_prob |
A numeric vector of probabilities. |
p_dimnames |
A character that represents the name of the dimension |
An object of class DISTRIBUTION
, DISCRETE
If the second argument is missing, all options will be sample with equal probability. If provided, the second argument would add to 1 and must be the same length that the first argument
John J. Aponte
1 2 | myDistr <- new_DISCRETE(p_supp=c(1,2,3,4), p_prob=c(0.40,0.30,0.20,0.10))
myDistr$rfunc(10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.