JMSLTM Numerical Library 7.2.0
com.imsl.stat

## Class PoissonDistribution

• All Implemented Interfaces:
Distribution, ProbabilityDistribution, Serializable

```public class PoissonDistribution
extends Object
implements ProbabilityDistribution, Serializable```
Evaluates a Poisson probability density of a given set of data.

The `poissonDistribution` evaluates the Poisson probability density of a given set of data, `xData`. If parameters are not supplied, the `eval` method fits the Poisson probability density function by first calculating theta, . The Poisson probability density function is defined as:

The `DataMining` package class `NaiveBayesClassifier` uses `PoissonDistribution` as a method to train continuous data.

Example, Serialized Form
• ### Constructor Summary

Constructors
Constructor and Description
`PoissonDistribution()`
• ### Method Summary

Methods
Modifier and Type Method and Description
`double[]` `eval(double[] xData)`
Fits a Poisson probability distribution to `xData` and returns the probability density at each value.
`double[]` ```eval(double[] xData, Object[] parameters)```
Evaluates a Poisson probability distribution with a given set of parameters at each point in `xData` and returns the probability density at each value.
`double` ```eval(double xData, Object[] parameters)```
Evaluates a Poisson probability density function at a given point `xData`.
`Object[]` `getParameters()`
Returns the current parameters of the Poisson probability density function.
`double` `getTheta()`
Returns the mean number of successes in a given time period of the Poisson probability distribution.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

• #### PoissonDistribution

`public PoissonDistribution()`
• ### Method Detail

• #### eval

`public double[] eval(double[] xData)`
Fits a Poisson probability distribution to `xData` and returns the probability density at each value.
Specified by:
`eval` in interface `Distribution`
Parameters:
`xData` - a `double` array representing the points at which the Poisson probability distribution function is to be evaluated
Returns:
a `double` array representing the Poisson probability density at each value of `xData`
• #### eval

```public double[] eval(double[] xData,
Object[] parameters)```
Evaluates a Poisson probability distribution with a given set of parameters at each point in `xData` and returns the probability density at each value.
Specified by:
`eval` in interface `ProbabilityDistribution`
Parameters:
`xData` - a `double` array representing the points at which the Poisson probability distribution function is to be evaluated
`parameters` - an `Object` array representing the parameters used to evaluate the Poisson distribution, see method `getParameters`.
Returns:
a `double` array representing the Poisson probability density at each value of `xData`
• #### eval

```public double eval(double xData,
Object[] parameters)```
Evaluates a Poisson probability density function at a given point `xData`.
Specified by:
`eval` in interface `ProbabilityDistribution`
Parameters:
`xData` - a `double` representing the point at which the Poisson probability distribution function is to be evaluated
`parameters` - an `Object` array representing the parameters used to evaluate the Poisson distribution, see method `getParameters`
Returns:
a `double` representing the Poisson probability density at `xData`
• #### getParameters

`public Object[] getParameters()`
Returns the current parameters of the Poisson probability density function.
Specified by:
`getParameters` in interface `ProbabilityDistribution`
Returns:
an `Object` array containing the parameters resulting from the last invocation of the (`Distribution`) `eval` method with the following signature, `double[] eval(double[] xData)`. This `Object` array can be used as input to the `eval` methods that require an `Object` array of distribution parameters as input.
• #### getTheta

`public double getTheta()`
Returns the mean number of successes in a given time period of the Poisson probability distribution.
Returns:
a `double` representing the mean number of successes in a given time period of the Poisson probability distribution
JMSLTM Numerical Library 7.2.0