|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.distribution.AbstractDistribution
org.apache.commons.math.distribution.AbstractIntegerDistribution
Base class for integer-valued discrete distributions. Default implementations are provided for some of the methods that do not vary from distribution to distribution.
Field Summary | |
(package private) static long |
serialVersionUID
Serializable version identifier |
Constructor Summary | |
protected |
AbstractIntegerDistribution()
Default constructor. |
Method Summary | |
double |
cumulativeProbability(double x)
For a random variable X whose values are distributed according to this distribution, this method returns P(X ≤ x). |
abstract double |
cumulativeProbability(int x)
For a random variable X whose values are distributed according to this distribution, this method returns P(X ≤ x). |
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). |
protected abstract int |
getDomainLowerBound(double p)
Access the domain value lower bound, based on p , used to
bracket a PDF root. |
protected abstract int |
getDomainUpperBound(double p)
Access the domain value upper bound, based on p , used to
bracket a PDF root. |
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 . |
double |
probability(double x)
For a random variable X whose values are distributed according to this distribution, this method returns P(X = x). |
Methods inherited from class org.apache.commons.math.distribution.AbstractDistribution |
cumulativeProbability |
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.IntegerDistribution |
probability |
Methods inherited from interface org.apache.commons.math.distribution.Distribution |
cumulativeProbability |
Field Detail |
static final long serialVersionUID
Constructor Detail |
protected AbstractIntegerDistribution()
Method Detail |
public double cumulativeProbability(double x) throws MathException
If x
does not represent an integer value, the CDF is
evaluated at the greatest integer less than x.
cumulativeProbability
in interface Distribution
x
- the value at which the distribution function is evaluated.
x
MathException
- if the cumulative probability can not be
computed due to convergence or other numerical errors.public abstract double cumulativeProbability(int x) throws MathException
cumulativeProbability
in interface IntegerDistribution
x
- the value at which the PDF is evaluated.
MathException
- if the cumulative probability can not be
computed due to convergence or other numerical errors.public double probability(double x)
If x
does not represent an integer value, 0 is returned.
probability
in interface DiscreteDistribution
x
- the value at which the probability density function is evaluated
public double cumulativeProbability(int x0, int x1) throws MathException
cumulativeProbability
in interface IntegerDistribution
x0
- the inclusive, lower boundx1
- the inclusive, upper bound
MathException
- if the cumulative probability can not be
computed due to convergence or other numerical errors.
IllegalArgumentException
- if x0 > x1public int inverseCumulativeProbability(double p) throws MathException
p
.
inverseCumulativeProbability
in interface IntegerDistribution
p
- the desired probability
MathException
- if the inverse cumulative probability can not be
computed due to convergence or other numerical errors.
IllegalArgumentException
- if p < 0 or p > 1protected abstract int getDomainLowerBound(double p)
p
, used to
bracket a PDF root. This method is used by
inverseCumulativeProbability(double)
to find critical values.
p
- the desired probability for the critical value
p
protected abstract int getDomainUpperBound(double p)
p
, used to
bracket a PDF root. This method is used by
inverseCumulativeProbability(double)
to find critical values.
p
- the desired probability for the critical value
p
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |