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