|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math.distribution.AbstractDistribution
public abstract class AbstractDistribution
Base class for probability distributions.
| Constructor Summary | |
|---|---|
protected |
AbstractDistribution()
Default constructor. |
| Method Summary | |
|---|---|
protected abstract double |
calculateNumericalMean()
Use this method to actually calculate the mean for the specific distribution. |
protected abstract double |
calculateNumericalVariance()
Use this method to actually calculate the variance for the specific distribution. |
double |
cumulativeProbability(double x0,
double x1)
For a random variable X whose values are distributed according to this distribution, this method returns P(x0 ≤ X ≤ x1). |
double |
getNumericalMean()
Use this method to get the numerical value of the mean of this distribution. |
double |
getNumericalVariance()
Use this method to get the numerical value of the variance of this distribution. |
boolean |
isSupportConnected()
Use this method to get information about whether the support is connected, i.e. whether all values between the lower and upper bound of the support is included in the support. |
abstract boolean |
isSupportLowerBoundInclusive()
Use this method to get information about whether the lower bound of the support is inclusive or not. |
abstract boolean |
isSupportUpperBoundInclusive()
Use this method to get information about whether the upper bound of the support is inclusive or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.math.distribution.Distribution |
|---|
cumulativeProbability |
| Constructor Detail |
|---|
protected AbstractDistribution()
| Method Detail |
|---|
public double cumulativeProbability(double x0,
double x1)
The default implementation uses the identity
P(x0 ≤ X ≤ x1) = P(X ≤ x1) - P(X ≤ x0)
cumulativeProbability in interface Distributionx0 - the (inclusive) lower boundx1 - the (inclusive) upper bound
x0 and x1,
including the endpoints.
NumberIsTooLargeException - if x0 > x1protected abstract double calculateNumericalMean()
getNumericalMean()
(which implements caching) to actually get the mean.
public double getNumericalMean()
getNumericalMean in interface Distributionprotected abstract double calculateNumericalVariance()
getNumericalVariance()
(which implements caching) to actually get the variance.
public double getNumericalVariance()
getNumericalVariance in interface DistributionTDistributionImpl) or
Double.NaN if it's not definedpublic abstract boolean isSupportLowerBoundInclusive()
isSupportLowerBoundInclusive in interface Distributionpublic abstract boolean isSupportUpperBoundInclusive()
isSupportUpperBoundInclusive in interface Distributionpublic boolean isSupportConnected()
AbstractIntegerDistribution the support is discrete, so
if this is true, then the support is
{lower bound, lower bound + 1, ..., upper bound}.
For AbstractContinuousDistribution the support is continuous, so
if this is true, then the support is the interval
[lower bound, upper bound]
where the limits are inclusive or not according to
isSupportLowerBoundInclusive() and isSupportUpperBoundInclusive()
(in the example both are true). If both are false, then the support is the interval
(lower bound, upper bound)
isSupportConnected in interface Distribution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||