Interface Distribution
-
- All Known Subinterfaces:
BetaDistribution
,BinomialDistribution
,CauchyDistribution
,ChiSquaredDistribution
,ContinuousDistribution
,DiscreteDistribution
,ExponentialDistribution
,FDistribution
,GammaDistribution
,HypergeometricDistribution
,IntegerDistribution
,NormalDistribution
,PascalDistribution
,PoissonDistribution
,TDistribution
,WeibullDistribution
,ZipfDistribution
- All Known Implementing Classes:
AbstractContinuousDistribution
,AbstractDistribution
,AbstractIntegerDistribution
,BetaDistributionImpl
,BinomialDistributionImpl
,CauchyDistributionImpl
,ChiSquaredDistributionImpl
,ExponentialDistributionImpl
,FDistributionImpl
,GammaDistributionImpl
,HypergeometricDistributionImpl
,NormalDistributionImpl
,PascalDistributionImpl
,PoissonDistributionImpl
,TDistributionImpl
,WeibullDistributionImpl
,ZipfDistributionImpl
public interface Distribution
Base interface for probability distributions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
cumulativeProbability(double x)
For a random variable X whose values are distributed according to this distribution, this method returns P(X ≤ x).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).
-
-
-
Method Detail
-
cumulativeProbability
double cumulativeProbability(double x) throws MathException
For a random variable X whose values are distributed according to this distribution, this method returns P(X ≤ x). In other words, this method represents the (cumulative) distribution function, or CDF, for this distribution.- Parameters:
x
- the value at which the distribution function is evaluated.- Returns:
- the probability that a random variable with this
distribution takes a value less than or equal to
x
- Throws:
MathException
- if the cumulative probability can not be computed due to convergence or other numerical errors.
-
cumulativeProbability
double cumulativeProbability(double x0, double x1) throws MathException
For a random variable X whose values are distributed according to this distribution, this method returns P(x0 ≤ X ≤ x1).- Parameters:
x0
- the (inclusive) lower boundx1
- the (inclusive) upper bound- Returns:
- the probability that a random variable with this distribution
will take a value between
x0
andx1
, including the endpoints - Throws:
MathException
- if the cumulative probability can not be computed due to convergence or other numerical errors.java.lang.IllegalArgumentException
- ifx0 > x1
-
-