Class AbstractDistribution
java.lang.Object
org.apache.commons.math.distribution.AbstractDistribution
- All Implemented Interfaces:
Serializable,Distribution
- Direct Known Subclasses:
AbstractContinuousDistribution,AbstractIntegerDistribution
Base class for probability distributions.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoublecumulativeProbability(double x0, double x1) For a random variable X whose values are distributed according to this distribution, this method returns P(x0 ≤ X ≤ x1).Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.math.distribution.Distribution
cumulativeProbability
-
Method Details
-
cumulativeProbability
For a random variable X whose values are distributed according to this distribution, this method returns P(x0 ≤ X ≤ x1).The default implementation uses the identity
P(x0 ≤ X ≤ x1) = P(X ≤ x1) - P(X ≤ x0)
- Specified by:
cumulativeProbabilityin interfaceDistribution- 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
x0andx1, including the endpoints. - Throws:
MathException- if the cumulative probability can not be computed due to convergence or other numerical errors.IllegalArgumentException- ifx0 > x1
-