Description Usage Arguments Value Examples
a function to generate a random sample of size n from the Beta(a,b) distribution by the acceptance-rejection method.
1 | betafunction(n, a, b)
|
n |
The number of random Numbers generated |
a |
Parameter of beta distribution |
b |
Parameter of beta distribution |
a random sample of size n
1 2 3 4 5 6 | ## Not run:
sample_beta <- betafunction(1e3,3,2)#record the sample
head(sample_beta,20)
hist(sample_beta)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.