public abstract class PoissonDistribution extends AbstractDiscreteDistribution
PoissonDistribution abstract class is used for
calculating Poisson distributions. Poisson distributions are
limits of Poisson processes, and are used to model rates of
occurrences of events within a fixed period (of time, space, etc.).
Poisson distributions are good models of lengths of texts or the
rate of occurrence of words in text, as well as many other natural
phenomena.
The Poisson distribution is a parametric discrete distribution
with a single parameter λ > 0 which is the
average rate of occurrence of events in a period. The resulting
distribution provides a likelihood for each non-negative number of
outcomes. Specifically, the Poisson distribution with rate
parameter λ is defined for k > 0 by:
Poissonλ(k)
= e-λ λk / k!
Note that this definition produces a properly normalized
probability distribution over natural numbers; if λ
> 0, then:
Σk >= 0
Poissonλ(k)
= 1.0
The expected value of a Poisson distribution is equal to the rate parameter:
E(Poissonλ) = λ
The variance is also equal to the rate parameter:
Var(Poissonλ)
=def
E([Poissonλ - E(Poissonλ)]2)
= λ
Concrete subclasses need only implement the abstract mean() method; the method log2Probability(long) computes the
log (base 2) of the Poisson probability estimate for a given number
of outcomes in terms of the value of the rate parameter
lambda(). Logarithms are used to prevent over- and
underflow in calculations.
For more information, see:
| Modifier | Constructor and Description |
|---|---|
protected |
PoissonDistribution()
Construct an abstract Poisson distribution.
|
| Modifier and Type | Method and Description |
|---|---|
double |
log2Probability(long outcome)
Returns the log (base 2) probability estimate in this Poisson
distribution for the specified outcome.
|
abstract double |
mean()
Returns the mean of this Poisson distribution, which is equal
to the rate parameter λ.
|
long |
minOutcome()
Returns the minimum outcome with non-zero probability,
0. |
double |
probability(long outcome)
Returns the probability estimate in this Poisson distribution
for the specified outcome.
|
double |
variance()
Returns the variance of this Poisson distribution, which is
equal to the mean.
|
cumulativeProbability, cumulativeProbabilityGreater, cumulativeProbabilityLess, entropy, maxOutcomeprotected PoissonDistribution()
public abstract double mean()
mean in interface DiscreteDistributionmean in class AbstractDiscreteDistributionpublic double variance()
variance in interface DiscreteDistributionvariance in class AbstractDiscreteDistributionpublic long minOutcome()
0.minOutcome in interface DiscreteDistributionminOutcome in class AbstractDiscreteDistributionpublic final double log2Probability(long outcome)
log2Probability in interface DiscreteDistributionlog2Probability in class AbstractDiscreteDistributionoutcome - The outcome being estimated.IllegalStateException - if the mean is not a positive
finite value.public final double probability(long outcome)
probability in interface DiscreteDistributionprobability in class AbstractDiscreteDistributionoutcome - The outcome whose probability is returned.IllegalStateException - If the mean is not a positive
finite value.Copyright © 2016 Alias-i, Inc.. All rights reserved.