drasys.or.prob
Class PoissonDistribution

java.lang.Object
  |
  +--drasys.or.prob.Distribution
        |
        +--drasys.or.prob.DiscreteDistribution
              |
              +--drasys.or.prob.PoissonDistributionBase
                    |
                    +--drasys.or.prob.PoissonDistribution

public class PoissonDistribution
extends PoissonDistributionBase
implements DiscreteDistributionI

An implementation of the Poisson probability distribution. The Poisson probability distribution models the number of events that occur in a fixed interval. The interval can be measured by time, space, volume, etc. The single parameter is the mean rate that the events happen.

For example, if a street intersection averages two accidents per week, a Poisson distribution to model the intersection would have a mean of 2. The probability distribution function 'pdf(x)' gives the probability that there will be exactly x accidents in one week. The cumulative distribution function 'cdf(x)' gives the probability that there will x or fewer accidents in one week. The method 'getRandomScaler' will return the number of accidents for a random week at the intersection and their average will be 2.

References:

The Art of Computer Programming: Seminumerical Algorithms (Vol 2, 3rd Ed)
    Donald Ervin Knuth; Hardcover
Numerical Recipes in C : The Art of Scientific Computing
    William H. Press, et al / Hardcover / Published 1993
Probability and Statistics
    Morris H. Degroot / Hardcover / Published 1986
Mathematical Statistics With Applications
    Dennis D. Wackerly, et al / Hardcover / Published 1996

See Also:
Serialized Form

Constructor Summary
PoissonDistribution(double mean)
           
PoissonDistribution(double mean, FunctionsI functions)
          The functions objects will be used for the 'lnGamma' and 'lnFactorial' methods.
PoissonDistribution(double mean, long seed)
           
 
Method Summary
 double cdf(int x)
          Returns the value of the cumulative distribution function at x; The standard edition iterates the pdf (x+1) times.
 double probability(int x1, int x2)
          Returns the probability that x >= x1 and x <= x2.
 
Methods inherited from class drasys.or.prob.PoissonDistributionBase
equals, getRandomInteger, mean, pdf, setParameters, std, toString, variance
 
Methods inherited from class drasys.or.prob.DiscreteDistribution
cdf, getRandomArray, getRandomArray, getRandomScaler, pdf, probability, probability
 
Methods inherited from class drasys.or.prob.Distribution
getRandomMatrix, getRandomNumberGenerator, getRandomVector, setElements, setElements, setRandomNumberGenerator, setSeed
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoissonDistribution

public PoissonDistribution(double mean)

PoissonDistribution

public PoissonDistribution(double mean,
                           long seed)

PoissonDistribution

public PoissonDistribution(double mean,
                           FunctionsI functions)
The functions objects will be used for the 'lnGamma' and 'lnFactorial' methods.
Method Detail

cdf

public double cdf(int x)
Returns the value of the cumulative distribution function at x; The standard edition iterates the pdf (x+1) times. The professional edition uses the incomplete gamma function.
Specified by:
cdf in interface DiscreteDistributionI
Overrides:
cdf in class PoissonDistributionBase
Throws:
InvalidArgumentError - if x < 0;

probability

public double probability(int x1,
                          int x2)
Returns the probability that x >= x1 and x <= x2. The standard edition iterates the pdf (x2-x1+1) times. The professional edition uses the incomplete gamma function.
Specified by:
probability in interface DiscreteDistributionI
Overrides:
probability in class PoissonDistributionBase
Throws:
InvalidArgumentError - if x2 < x1 or x1 < 0;


Copyright(C)1997-2000 by DRA Systems all rights reserved. OpsResearch.com