BetaRV: Beta-distributed Random Variable

Description Usage Arguments Details Value See Also Examples

View source: R/betaRV.R

Description

Represents a random variable with a Beta distribution.

Usage

1
BetaRV(shape1, shape2)

Arguments

shape1, shape2

positive shape parameters of the Beta distribution

Details

The density of the Beta distribution with parameters shape1 = a and shape2 = b is given by

p(X = x) = \frac{Γ(a+b)}{Γ(a) Γ(b)} x^{a-1} (1-x)^{b-1}.

for 0 < x < 1, a > 0 and b > 0.

Value

The BetaRV constructor returns a BetaRV object, which is a subclass of RV.

See Also

Other random variables defined in this package include GammaRV, DirichletRV and ShiftedNegBinomRV.

Examples

1
2
3
# A uniform distribution on the unit interval
x <- BetaRV(1, 1)
mean(x)

cleanzr/dblinkR documentation built on June 13, 2021, 4:17 a.m.