draw.beta.alphabeta.less.than.one {UnivRNG} | R Documentation |
Generates variates from Beta distribution with max(\alpha,\beta)<1
Description
This function implements pseudo-random number generation for a Beta distribution for \max(\alpha,\beta)<1
with pdf
f(x|\alpha,\beta)=\frac{1}{B(\alpha,\beta)}x^{\alpha-1}(1-x)^{\beta-1}
for 0 \leq x \leq 1
, 0 < \alpha < 1
, and 0 < \beta < 1
where \alpha
and \beta
are the shape parameters and B(\alpha,\beta)
is the complete beta function.
Usage
draw.beta.alphabeta.less.than.one(nrep,alpha,beta)
Arguments
nrep |
Number of data points to generate. |
alpha |
First shape parameter. Must be less than 1. |
beta |
Second shape parameter. Must be less than 1. |
Value
A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.
References
Jhonk, M. D. (1964). Erzeugung von betaverteilter und gammaverteilter zufallszahlen. Metrika, 8, 5-15.
Examples
draw.beta.alphabeta.less.than.one(nrep=100000,alpha=0.7,beta=0.4)