udbeta function

UNU.RAN object for Beta distribution

UNU.RAN object for Beta distribution

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

[Distribution] -- Beta.

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= a and shape2 =b= b has density

f(x)=Γ(a+b)Γ(a)Γ(b)xa(1x)bf(x)=Gamma(a+b)/(Gamma(a)Gamma(b))x(a1)(1x)(b1) f(x) =\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}{x}^{a} {(1-x)}^{b}f(x) = Gamma(a+b)/(Gamma(a)Gamma(b))x^(a-1)(1-x)^(b-1)

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

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

Returns

An object of class "unuran.cont".

See Also

unuran.cont.

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.

Author(s)

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

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)
  • Maintainer: Josef Leydold
  • License: GPL (>= 2)
  • Last published: 2025-04-07