getParamsBetaDist | R Documentation |
Return the value of both parameters for the Beta distribution given its mean and variance.
getParamsBetaDist(m, v)
m |
mean of the Beta distribution |
v |
variance of the Beta distribution |
vector
Timothee Flutre
## Not run: set.seed(1859)
(beta.params <- getParamsBetaDist(m=0.5, v=0.1))
x <- rbeta(n=10^3, shape1=beta.params[1], shape2=beta.params[2])
mean(x)
var(x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.