getParamsBetaDist: Beta distribution

View source: R/stats.R

getParamsBetaDistR Documentation

Beta distribution

Description

Return the value of both parameters for the Beta distribution given its mean and variance.

Usage

getParamsBetaDist(m, v)

Arguments

m

mean of the Beta distribution

v

variance of the Beta distribution

Value

vector

Author(s)

Timothee Flutre

Examples

## 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)

timflutre/rutilstimflutre documentation built on Feb. 12, 2025, 11:35 p.m.