Description Usage Arguments Value Author(s) Examples
This function transforms the mean value and the standart deviation of a univariate normal distribution into two values alpha and beta, which can be used for a similar shaped distribution function, that is defined on a bounded domain like the Beta distribution.
1 |
mean |
Double - A value in the interval [0,1]. |
sigmaRel |
Double - A value describing the width of the resulting maximum value. |
A vector with two components of type double - The parameters alpha and beta.
J.C. Lemm, P.v.W. Crommelin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | mean = 0.5
sigmaRel = 0.1
x = seq(from = -10,
to = 10,
by = 0.01)
plot(x = x,
y = dnorm(x = x,
mean = mean,
sd = sigmaRel),
xlim = c(-0.1,1.1),
ylim = c(0,10),
type = "l")
x2 = seq(from = 0,
to = 1,
by = 0.001)
params = CeBePa(mean = mean,
sigmaRel = sigmaRel)
lines(x = x2,
y = dbeta(x = x2,
shape1 = params[1],
shape2 = params[2]),
col = "red",
lwd = 3)
legend("topright",
leg = c("Normal distribution","Beta distribution"),
col = c("black","red"),
lwd = c(1,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.