edu.uah.math.distributions
Class PoissonDistribution

java.lang.Object
  extended by edu.uah.math.distributions.Distribution
      extended by edu.uah.math.distributions.PoissonDistribution
All Implemented Interfaces:
java.io.Serializable

public class PoissonDistribution
extends Distribution
implements java.io.Serializable

The class models the Poisson distribution with a specified rate parameter.

Version:
August, 2003
Author:
Kyle Siegrist, Dawn Duehring
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.uah.math.distributions.Distribution
CONTINUOUS, DISCRETE, MIXED
 
Constructor Summary
PoissonDistribution()
          This default constructor creates a new Poisson distribtiton with parameter 1.
PoissonDistribution(double r)
          This default constructor creates a new Poisson distribution with a given parameter value.
 
Method Summary
 double getCDF(double x)
          This method computes the cumulative distribution function in terms of the gamma cumulative distribution function.
 double getDensity(double x)
          This method computes the probability density function.
 double getFactorialMoment(int n)
          This method returns the factorial moment of a specified order.
 double getMaxDensity()
          This method returns the maximum value of the density function.
 double getMean()
          This method returns the mean of the distribution.
 double getMGF(double t)
          This method returns the moment generating function.
 double getParameter()
          This method sets the rate parameter.
 double getPGF(double t)
          This method returns the probability generating function.
 double getVariance()
          This method returns the variance of the distribution.
 void setParameter(double r)
          This method sets the parameter and creates the domain of the distribution.
 double simulate()
          This method simulates a value from the distribution, by simulating the number of arrivals in an interval of parameter length in a Poisson process with rate 1.
 java.lang.String toString()
          This method returns a string that gives the name of the distribution and the values of the parameters.
 
Methods inherited from class edu.uah.math.distributions.Distribution
getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoissonDistribution

public PoissonDistribution(double r)
This default constructor creates a new Poisson distribution with a given parameter value.

Parameters:
r - the rate parameter

PoissonDistribution

public PoissonDistribution()
This default constructor creates a new Poisson distribtiton with parameter 1.

Method Detail

setParameter

public void setParameter(double r)
This method sets the parameter and creates the domain of the distribution.

Parameters:
r - the rate parameter

getParameter

public double getParameter()
This method sets the rate parameter.

Returns:
the rate parameter

getDensity

public double getDensity(double x)
This method computes the probability density function.

Specified by:
getDensity in class Distribution
Parameters:
x - a number in the domain of the distribution
Returns:
the probability density at x

getMaxDensity

public double getMaxDensity()
This method returns the maximum value of the density function.

Overrides:
getMaxDensity in class Distribution
Returns:
the maximum value of the probability density function

getCDF

public double getCDF(double x)
This method computes the cumulative distribution function in terms of the gamma cumulative distribution function.

Overrides:
getCDF in class Distribution
Parameters:
x - a number in the domain of the distribution
Returns:
the cumulative probability at x

getMean

public double getMean()
This method returns the mean of the distribution.

Overrides:
getMean in class Distribution
Returns:
the mean

getVariance

public double getVariance()
This method returns the variance of the distribution.

Overrides:
getVariance in class Distribution
Returns:
the variance

getFactorialMoment

public double getFactorialMoment(int n)
This method returns the factorial moment of a specified order.

Parameters:
n - the order
Returns:
the facotrial moment

getPGF

public double getPGF(double t)
This method returns the probability generating function.

Overrides:
getPGF in class Distribution
Parameters:
t - a real number
Returns:
the probability generating function at t

getMGF

public double getMGF(double t)
This method returns the moment generating function.

Overrides:
getMGF in class Distribution
Parameters:
t - a real number
Returns:
the moment generating function at t

simulate

public double simulate()
This method simulates a value from the distribution, by simulating the number of arrivals in an interval of parameter length in a Poisson process with rate 1.

Overrides:
simulate in class Distribution
Returns:
a simulated value form the distribution

toString

public java.lang.String toString()
This method returns a string that gives the name of the distribution and the values of the parameters.

Overrides:
toString in class Distribution
Returns:
a string giving the name of the distribution and the values of the parameters