|
|||||||||||
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
org.apache.commons.math.distribution.PoissonDistributionImpl
Implementation for the @link{PoissonDistribution}
Field Summary | |
(package private) static long |
serialVersionUID
Serializable version identifier |
Constructor Summary | |
PoissonDistributionImpl(double p)
Create a new Poisson distribution with the given the mean. |
Method Summary | |
double |
cumulativeProbability(int x)
The probability distribution function P(X <= x) for a Poisson distribution. |
protected int |
getDomainLowerBound(double p)
Access the domain value lower bound, based on p , used to
bracket a CDF root. |
protected int |
getDomainUpperBound(double p)
Access the domain value upper bound, based on p , used to
bracket a CDF root. |
double |
getMean()
Get the Poisson mean for the distribution. |
double |
normalApproximateProbability(int x)
Calculates the Poisson distribution function using a normal approximation. |
double |
probability(int x)
The probability mass function P(X = x) for a Poisson distribution. |
void |
setMean(double p)
Set the Poisson mean for the distribution. |
Methods inherited from class org.apache.commons.math.distribution.AbstractIntegerDistribution |
cumulativeProbability, cumulativeProbability, inverseCumulativeProbability, probability |
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 |
cumulativeProbability, inverseCumulativeProbability |
Methods inherited from interface org.apache.commons.math.distribution.DiscreteDistribution |
probability |
Methods inherited from interface org.apache.commons.math.distribution.Distribution |
cumulativeProbability, cumulativeProbability |
Field Detail |
static final long serialVersionUID
Constructor Detail |
public PoissonDistributionImpl(double p)
IllegalArgument
is thrown.
p
- the Poisson mean
IllegalArgumentException
- if p ≤ 0Method Detail |
public double getMean()
getMean
in interface PoissonDistribution
public void setMean(double p)
IllegalArgument
is thrown.
setMean
in interface PoissonDistribution
p
- the Poisson mean value
IllegalArgumentException
- if p ≤ 0public double probability(int x)
probability
in interface IntegerDistribution
x
- the value at which the probability density function is evaluated.
public double cumulativeProbability(int x) throws MathException
cumulativeProbability
in interface IntegerDistribution
cumulativeProbability
in class AbstractIntegerDistribution
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 normalApproximateProbability(int x) throws MathException
N(mean, sqrt(mean))
distribution is used to approximate the Poisson distribution.
The computation uses "half-correction" -- evaluating the normal
distribution function at x + 0.5
normalApproximateProbability
in interface PoissonDistribution
x
- the upper bound, inclusive
MathException
- if an error occurs computing the normal approximationprotected int getDomainLowerBound(double p)
p
, used to
bracket a CDF root. This method is used by
AbstractIntegerDistribution.inverseCumulativeProbability(double)
to find critical values.
getDomainLowerBound
in class AbstractIntegerDistribution
p
- the desired probability for the critical value
protected int getDomainUpperBound(double p)
p
, used to
bracket a CDF root. This method is used by
AbstractIntegerDistribution.inverseCumulativeProbability(double)
to find critical values.
getDomainUpperBound
in class AbstractIntegerDistribution
p
- the desired probability for the critical value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |