| java.lang.Object org.apache.commons.math.distribution.AbstractDistribution org.apache.commons.math.distribution.AbstractIntegerDistribution
All known Subclasses: org.apache.commons.math.distribution.BinomialDistributionImpl, org.apache.commons.math.distribution.HypergeometricDistributionImpl, org.apache.commons.math.distribution.PoissonDistributionImpl,
AbstractIntegerDistribution | abstract public class AbstractIntegerDistribution extends AbstractDistribution implements IntegerDistribution,Serializable(Code) | | Base class for integer-valued discrete distributions. Default
implementations are provided for some of the methods that do not vary
from distribution to distribution.
version: $Revision: 348519 $ $Date: 2005-11-23 12:12:18 -0700 (Wed, 23 Nov 2005) $ |
Method Summary | |
public double | cumulativeProbability(double x) For a random variable X whose values are distributed according
to this distribution, this method returns P(X ≤ x). | abstract public double | cumulativeProbability(int x) For a random variable X whose values are distributed according
to this distribution, this method returns P(X ≤ x). | public double | cumulativeProbability(int x0, int x1) 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 bound Parameters: x1 - the inclusive, upper bound the cumulative probability. | abstract protected int | getDomainLowerBound(double p) Access the domain value lower bound, based on p , used to
bracket a PDF root. | abstract protected int | getDomainUpperBound(double p) Access the domain value upper bound, based on p , used to
bracket a PDF root. | public int | inverseCumulativeProbability(double p) For a random variable X whose values are distributed according
to this distribution, this method returns the largest x, such
that P(X ≤ x) ≤ p . | public double | probability(double x) For a random variable X whose values are distributed according
to this distribution, this method returns P(X = x). |
AbstractIntegerDistribution | protected AbstractIntegerDistribution()(Code) | | Default constructor.
|
cumulativeProbability | public double cumulativeProbability(double x) throws MathException(Code) | | 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.
If x does not represent an integer value, the CDF is
evaluated at the greatest integer less than x.
Parameters: x - the value at which the distribution function is evaluated. cumulative probability that a random variable with thisdistribution takes a value less than or equal to x throws: MathException - if the cumulative probability can not becomputed due to convergence or other numerical errors. |
cumulativeProbability | abstract public double cumulativeProbability(int x) throws MathException(Code) | | 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 probability distribution function, or PDF,
for this distribution.
Parameters: x - the value at which the PDF is evaluated. PDF for this distribution. throws: MathException - if the cumulative probability can not becomputed due to convergence or other numerical errors. |
cumulativeProbability | public double cumulativeProbability(int x0, int x1) throws MathException(Code) | | 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 bound Parameters: x1 - the inclusive, upper bound the cumulative probability. throws: MathException - if the cumulative probability can not becomputed due to convergence or other numerical errors. throws: IllegalArgumentException - if x0 > x1 |
getDomainLowerBound | abstract protected int getDomainLowerBound(double p)(Code) | | Access the domain value lower bound, based on p , used to
bracket a PDF root. This method is used by
AbstractIntegerDistribution.inverseCumulativeProbability(double) to find critical values.
Parameters: p - the desired probability for the critical value domain value lower bound, i.e.P(X < lower bound) < p |
getDomainUpperBound | abstract protected int getDomainUpperBound(double p)(Code) | | Access the domain value upper bound, based on p , used to
bracket a PDF root. This method is used by
AbstractIntegerDistribution.inverseCumulativeProbability(double) to find critical values.
Parameters: p - the desired probability for the critical value domain value upper bound, i.e.P(X < upper bound) > p |
inverseCumulativeProbability | public int inverseCumulativeProbability(double p) throws MathException(Code) | | For a random variable X whose values are distributed according
to this distribution, this method returns the largest x, such
that P(X ≤ x) ≤ p .
Parameters: p - the desired probability the largest x such that P(X ≤ x) <= p throws: MathException - if the inverse cumulative probability can not becomputed due to convergence or other numerical errors. throws: IllegalArgumentException - if p < 0 or p > 1 |
probability | public double probability(double x)(Code) | | 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 probability mass function, or PMF, for the distribution.
If x does not represent an integer value, 0 is returned.
Parameters: x - the value at which the probability density function is evaluated the value of the probability density function at x |
Methods inherited from org.apache.commons.math.distribution.AbstractDistribution | public double cumulativeProbability(double x0, double x1) throws MathException(Code)(Java Doc)
|
|
|