|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.distribution.AbstractRealDistribution
statalign.utils.BetaDistribution
public class BetaDistribution
Implements the Beta distribution. Adapted from Apache Commons Math v3.0,
but modified to use Utils.generator
as the random number source.
Field Summary | |
---|---|
static double |
DEFAULT_INVERSE_ABSOLUTE_ACCURACY
Default inverse cumulative probability accuracy. |
Fields inherited from class org.apache.commons.math3.distribution.AbstractRealDistribution |
---|
SOLVER_DEFAULT_ABSOLUTE_ACCURACY |
Constructor Summary | |
---|---|
BetaDistribution(double alpha,
double beta)
Build a new instance. |
|
BetaDistribution(double alpha,
double beta,
double inverseCumAccuracy)
Build a new instance. |
|
BetaDistribution(org.apache.commons.math3.random.RandomGenerator rng,
double alpha,
double beta,
double inverseCumAccuracy)
Creates a β distribution. |
Method Summary | |
---|---|
double |
cumulativeProbability(double x)
|
double |
density(double x)
|
double |
getAlpha()
Access the first shape parameter, alpha . |
double |
getBeta()
Access the second shape parameter, beta . |
double |
getNumericalMean()
For first shape parameter alpha and second shape parameter
beta , the mean is alpha / (alpha + beta) . |
double |
getNumericalVariance()
For first shape parameter alpha and second shape parameter
beta , the variance is
(alpha * beta) / [(alpha + beta)^2 * (alpha + beta + 1)] . |
double |
getSupportLowerBound()
The lower bound of the support is always 0 no matter the parameters. |
double |
getSupportUpperBound()
The upper bound of the support is always 1 no matter the parameters. |
boolean |
isSupportConnected()
The support of this distribution is connected. |
boolean |
isSupportLowerBoundInclusive()
|
boolean |
isSupportUpperBoundInclusive()
|
Methods inherited from class org.apache.commons.math3.distribution.AbstractRealDistribution |
---|
cumulativeProbability, inverseCumulativeProbability, probability, probability, reseedRandomGenerator, sample, sample |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY
Constructor Detail |
---|
public BetaDistribution(double alpha, double beta)
alpha
- First shape parameter (must be positive).beta
- Second shape parameter (must be positive).public BetaDistribution(double alpha, double beta, double inverseCumAccuracy)
alpha
- First shape parameter (must be positive).beta
- Second shape parameter (must be positive).inverseCumAccuracy
- Maximum absolute error in inverse
cumulative probability estimates (defaults to
DEFAULT_INVERSE_ABSOLUTE_ACCURACY
).public BetaDistribution(org.apache.commons.math3.random.RandomGenerator rng, double alpha, double beta, double inverseCumAccuracy)
rng
- Random number generator.alpha
- First shape parameter (must be positive).beta
- Second shape parameter (must be positive).inverseCumAccuracy
- Maximum absolute error in inverse
cumulative probability estimates (defaults to
DEFAULT_INVERSE_ABSOLUTE_ACCURACY
).Method Detail |
---|
public double getAlpha()
alpha
.
public double getBeta()
beta
.
public double density(double x)
public double cumulativeProbability(double x)
public double getNumericalMean()
alpha
and second shape parameter
beta
, the mean is alpha / (alpha + beta)
.
public double getNumericalVariance()
alpha
and second shape parameter
beta
, the variance is
(alpha * beta) / [(alpha + beta)^2 * (alpha + beta + 1)]
.
public double getSupportLowerBound()
public double getSupportUpperBound()
public boolean isSupportLowerBoundInclusive()
public boolean isSupportUpperBoundInclusive()
public boolean isSupportConnected()
true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |