udbeta {Runuran}R Documentation

UNU.RAN object for Beta distribution

Description

Create UNU.RAN object for a Beta distribution with with parameters shape1 and shape2.

[Distribution] – Beta.

Usage

udbeta(shape1, shape2, lb=0, ub=1)

Arguments

shape1, shape2

positive shape parameters of the Beta distribution.

lb

lower bound of (truncated) distribution.

ub

upper bound of (truncated) distribution.

Details

The Beta distribution with parameters shape1 = a and shape2 = b has density

f(x) = \frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}{x}^{a} {(1-x)}^{b}

for a > 0, b > 0 and 0 \le x \le 1.

The domain of the distribution can be truncated to the interval (lb,ub).

Value

An object of class "unuran.cont".

Author(s)

Josef Leydold and Wolfgang H\"ormann unuran@statmath.wu.ac.at.

References

N.L. Johnson, S. Kotz, and N. Balakrishnan (1995): Continuous Univariate Distributions, Volume 2. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 25, p. 210.

See Also

unuran.cont.

Examples

## Create distribution object for beta distribution
distr <- udbeta(shape1=3,shape2=7)
## Generate generator object; use method PINV (inversion)
gen <- pinvd.new(distr)
## Draw a sample of size 100
x <- ur(gen,100)


[Package Runuran version 0.38 Index]