rexp_truncated | R Documentation |
Generates translated and truncated exponential variables.
rexp_truncated(n, lo, hi)
n |
An integer, the number of samples to return. |
lo |
A double, the lower limit of the distribution, cannot be |
hi |
A double, the upper limit of the distribution. |
Returns n
random variables from the translated truncated exponential distribution with density \exp(-(x-lo))/(1-\exp(lo-hi))
on [lo,hi]
.
n
random variables from the translated truncated exponential distribution.
hist(rexp_truncated(1e4, 0, Inf), breaks=200)
hist(rexp_truncated(1e4, 10, 12), breaks=200)
hist(rexp_truncated(1e4, -2, 2), breaks=200)
hist(rexp_truncated(1e4, -10, 0), breaks=200)
hist(rexp_truncated(1e4, -100, Inf), breaks=200)
hist(rexp_truncated(1e4, -100, -95), breaks=200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.