ikr.simlib.distributions.continuous

• All Implemented Interfaces:
ReflectionConstructable, ReflectionConstructable3<SimNode,Parameters,RandomNumberGenerator>

public class BetaDistribution
extends ContinuousDistribution
Beta Distribution
Meaning: Distribution of a random variable $$T= \frac{Z_1}{Z_1+Z_2}$$, if $$Z_1$$ and $$Z_2$$ are gamma distributed with the parameters $$\alpha_1$$ and $$\beta$$ as well as $$\alpha_2$$ and $$\beta$$. suitable for the distribution of random shares (values between 0 and 1) Special cases contained are the uniform distribution between 0 and 1 as well as several triangular distributions shape parameter $$\alpha_1 > 0$$ shape parameter $$\alpha_2 > 0$$ The distribution can also be described with parameters for the mean value (in the range between 0 and 1) and coefficient of variation: $$\alpha_1 = \frac{1-E[T] \cdot (1+c_T^2)}{c_T^2}$$ $$\alpha_2 = \alpha_1 \cdot (\frac{1}{E[T]} -1)$$ $$P(T=t) = f(t) = \frac{t^{\alpha_1 -1} \cdot (1-t)^{\alpha_2 -1}}{B(\alpha_1 , \alpha_2)} \mbox{ for } 0 < x < 1$$, whereby $$B(x,y)$$ is the Beta function No closed form of the distribution function (except for special cases) $$E[T]= \frac{\alpha_1}{\alpha_1 + \alpha_2}$$ $$VAR[T]= \frac{\alpha_1 \cdot \alpha_2}{(\alpha_1 + \alpha_2)^2 \cdot (\alpha_1 + \alpha_2 +1)}$$ $$c_T= \sqrt{\frac{\alpha_1}{\alpha_2 \cdot (\alpha_1 + \alpha_2 +1)}}$$  [...].Distribution = Beta [...].Distribution.Alpha1 = 1.5 [...].Distribution.Alpha2 = 3.0  or with the mean value and variation coefficient:  [...].Distribution.Mean = 0.33 [...].Distribution.CoefficientOfVariation = 0.60 
• Field Summary

Fields
Modifier and Type Field and Description
GammaDistribution gamma1
GammaDistribution gamma2
• Fields inherited from class ikr.simlib.distributions.Distribution

rng
• Fields inherited from interface ikr.simlib.parameters.reflection.ReflectionConstructable

CREATE_INSTANCE_METHOD_NAME
• Constructor Summary

Constructors
Constructor and Description
BetaDistribution(double alpha1, double alpha2)
BetaDistribution(double alpha1, double alpha2, RandomNumberGenerator rng)
• Method Summary

Methods
Modifier and Type Method and Description
static BetaDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
double next()
Create random numbers
• Methods inherited from class ikr.simlib.distributions.Distribution

getDefaultRNG, getRandomNumberGenerator, reset
• Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• Field Detail

• gamma1

public final GammaDistribution gamma1
• gamma2

public final GammaDistribution gamma2
• Constructor Detail

public BetaDistribution(double alpha1,
double alpha2,
RandomNumberGenerator rng)

public BetaDistribution(double alpha1,
double alpha2)
• Method Detail

• createInstance

public static BetaDistribution createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
• next

public double next()
Description copied from class: ContinuousDistribution
Create random numbers
Specified by:
next in class ContinuousDistribution