|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.probdist.DiscreteDistributionInt umontreal.iro.lecuyer.probdist.PoissonDist
public class PoissonDist
Extends the class DiscreteDistributionInt
for the
Poisson distribution with mean
λ >= 0.
The mass function is
For the static methods that compute F(x) and bar(F)(x), we exploit the relationship F(x) = 1 - Gx+1(λ), where Gx+1 is the gamma distribution function with parameters (α, λ) = (x + 1, 1).
Field Summary | |
---|---|
static double |
MAXLAMBDA
|
Fields inherited from class umontreal.iro.lecuyer.probdist.DiscreteDistributionInt |
---|
EPSILON |
Constructor Summary | |
---|---|
PoissonDist(double lambda)
Creates an object that contains the probability and distribution functions, for the Poisson distribution with parameter lambda, which are computed and stored in dynamic arrays inside that object. |
Method Summary | |
---|---|
static double |
barF(double lambda,
int x)
Computes and returns the value of the complementary Poisson distribution function, for λ = lambda. |
double |
barF(int x)
Returns bar(F)(x), the complementary distribution function. |
static double |
cdf(double lambda,
int x)
Computes and returns the value of the Poisson distribution function F(x) for λ = lambda. |
double |
cdf(int x)
Returns the distribution function F evaluated at x (see). |
static PoissonDist |
getInstanceFromMLE(int[] x,
int n)
Creates a new instance of a Poisson distribution with parameter λ estimated using the maximum likelihood method based on the n observations x[i], i = 0, 1,…, n - 1. |
double |
getLambda()
Returns the λ associated with this object. |
double |
getMean()
Returns the mean of the distribution function. |
static double |
getMean(double lambda)
Computes and returns the mean E[X] = λ of the Poisson distribution with parameter λ. |
static double[] |
getMLE(int[] x,
int n)
Estimates the parameter λ of the Poisson distribution using the maximum likelihood method, from the n observations x[i], i = 0, 1,…, n - 1. |
double[] |
getParams()
Return a table containing the parameter of the current distribution. |
double |
getStandardDeviation()
Returns the standard deviation of the distribution function. |
static double |
getStandardDeviation(double lambda)
Computes and returns the standard deviation of the Poisson distribution with parameter λ. |
double |
getVariance()
Returns the variance of the distribution function. |
static double |
getVariance(double lambda)
Computes and returns the variance = λ of the Poisson distribution with parameter λ. |
static int |
inverseF(double lambda,
double u)
Performs a linear search to get the inverse function without precomputed tables. |
int |
inverseFInt(double u)
Returns the inverse distribution function F-1(u), where 0 <= u <= 1. |
static double |
prob(double lambda,
int x)
Computes and returns the Poisson probability p(x) for λ = lambda.. |
double |
prob(int x)
Returns p(x), the probability of x. |
void |
setLambda(double lambda)
Sets the λ associated with this object. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.probdist.DiscreteDistributionInt |
---|
barF, cdf, getXinf, getXsup, inverseF |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double MAXLAMBDA
Constructor Detail |
---|
public PoissonDist(double lambda)
Method Detail |
---|
public double prob(int x)
DiscreteDistributionInt
prob
in class DiscreteDistributionInt
x
- value at which the mass function must be evaluated
public double cdf(int x)
DiscreteDistributionInt
cdf
in class DiscreteDistributionInt
x
- value at which the distribution function must be evaluated
public double barF(int x)
DiscreteDistributionInt
barF
in class DiscreteDistributionInt
x
- value at which the complementary distribution function
must be evaluated
public int inverseFInt(double u)
DiscreteDistributionInt
inverseFInt
in class DiscreteDistributionInt
u
- value in the interval (0, 1) for which
the inverse distribution function is evaluated
public double getMean()
Distribution
public double getVariance()
Distribution
public double getStandardDeviation()
Distribution
public static double prob(double lambda, int x)
public static double cdf(double lambda, int x)
public static double barF(double lambda, int x)
public static int inverseF(double lambda, double u)
public static double[] getMLE(int[] x, int n)
x
- the list of observations used to evaluate parametersn
- the number of observations used to evaluate parameters
public static PoissonDist getInstanceFromMLE(int[] x, int n)
x
- the list of observations to use to evaluate parametersn
- the number of observations to use to evaluate parameterspublic static double getMean(double lambda)
public static double getVariance(double lambda)
public static double getStandardDeviation(double lambda)
public double getLambda()
public void setLambda(double lambda)
public double[] getParams()
public String toString()
toString
in class Object
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |