Class AbstractDistribution
- java.lang.Object
-
- org.apache.commons.math.distribution.AbstractDistribution
-
- All Implemented Interfaces:
java.io.Serializable
,Distribution
- Direct Known Subclasses:
AbstractContinuousDistribution
,AbstractIntegerDistribution
public abstract class AbstractDistribution extends java.lang.Object implements Distribution, java.io.Serializable
Base class for probability distributions.- Version:
- $Revision: 1054524 $ $Date: 2011-01-03 05:59:18 +0100 (lun. 03 janv. 2011) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDistribution()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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).-
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
-
-
-
-
Method Detail
-
cumulativeProbability
public 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).The default implementation uses the identity
P(x0 ≤ X ≤ x1) = P(X ≤ x1) - P(X ≤ x0)
- Specified by:
cumulativeProbability
in 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
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
-
-