| dbeta_box | R Documentation |
Density of a Beta distribution on a bounded interval
dbeta_box(x, shape1, shape2, a, b, log = FALSE)
x |
A numeric vector of quantiles. |
shape1, shape2 |
non-negative parameters of the Beta distribution. |
a |
The lower bound of the interval. |
b |
The upper bound of the interval. |
log |
Logical; if TRUE, probabilities p are given as log(p). |
A numeric vector of density values.
# Beta(2,5) on (0,100)
x <- seq(0, 100, length.out = 100)
y <- dbeta_box(x, shape1 = 2, shape2 = 5, a = 0, b = 100)
plot(x, y, type = "l", main = "Beta(2,5) on (0,100)")
# Beta(1,1) i.e. uniform on (-1, 1)
x <- seq(-1, 1, length.out = 100)
y <- dbeta_box(x, shape1 = 1, shape2 = 1, a = -1, b = 1)
plot(x, y, type = "l", main = "Beta(1,1) on (-1,1)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.