public class PoissonDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain
public PoissonDistribution(double r)
r
- the rate parameterpublic PoissonDistribution()
public void setParameter(double r)
r
- the rate parameterpublic double getParameter()
public double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distributionpublic double getMaxDensity()
getMaxDensity
in class Distribution
public double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distributionpublic double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getFactorialMoment(int n)
n
- the orderpublic double getPGF(double t)
getPGF
in class Distribution
t
- a real numberpublic double getMGF(double t)
getMGF
in class Distribution
t
- a real numberpublic double simulate()
simulate
in class Distribution
public java.lang.String toString()
toString
in class Distribution