Description Usage Arguments Value
This is a function that peforms rejection sampling from a given pdf
1 | rejectionsample(n, pdf, a, b, C)
|
n |
The number of samples |
pdf |
A function that is the pdf of the random variable that you wish to sample from |
a |
a numeric that is the lower bound of the random variable you wish to sample from |
b |
a numeric that is the upper bound of the random variable you with to sample from |
C |
a numeric that is such that f(x) <= C for all values of x |
Samples of length n from the given pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.