|
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.ContinuousDistribution umontreal.iro.lecuyer.probdist.GammaDist umontreal.iro.lecuyer.probdist.ErlangDist
public class ErlangDist
Extends the class GammaDist
for the special case
of the Erlang distribution with
shape parameter k > 0 and scale parameter
λ > 0.
This distribution is a special case of the gamma distribution
for which the shape parameter k = α is an integer.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
decPrec |
Constructor Summary | |
---|---|
ErlangDist(int k)
Constructs a ErlangDist object with parameters k = k and λ = 1. |
|
ErlangDist(int k,
double lambda)
Constructs a ErlangDist object with parameters k = k and λ = lambda. |
Method Summary | |
---|---|
static double |
barF(int k,
double lambda,
int d,
double x)
Computes the complementary distribution function. |
static double |
cdf(int k,
double lambda,
int d,
double x)
Computes the distribution function using the gamma distribution function. |
static double |
density(int k,
double lambda,
double x)
Computes the density function. |
static ErlangDist |
getInstanceFromMLE(double[] x,
int n)
Creates a new instance of an Erlang distribution with parameters k and λ estimated using the maximum likelihood method based on the n observations x[i], i = 0, 1,…, n - 1. |
int |
getK()
Returns the parameter k for this object. |
static double |
getMean(int k,
double lambda)
Computes and returns the mean, E[X] = k/λ, of the Erlang distribution with parameters k and λ. |
static double[] |
getMLE(double[] x,
int n)
Estimates the parameters (k, λ) of the Erlang distribution using the maximum likelihood method, from the n observations x[i], i = 0, 1,…, n - 1. |
double[] |
getParams()
Return a table containing parameters of the current distribution. |
static double |
getStandardDeviation(int k,
double lambda)
Computes and returns the standard deviation of the Erlang distribution with parameters k and λ. |
static double |
getVariance(int k,
double lambda)
Computes and returns the variance, Var[X] = k/λ2, of the Erlang distribution with parameters k and λ. |
static double |
inverseF(int k,
double lambda,
int d,
double u)
Returns the inverse distribution function. |
void |
setParams(int k,
double lambda,
int d)
Sets the parameters k and λ of the distribution for this object. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.probdist.GammaDist |
---|
barF, barF, barF, cdf, cdf, cdf, density, density, getAlpha, getLambda, getMean, getMean, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, inverseF, inverseF, setParams |
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ErlangDist(int k)
public ErlangDist(int k, double lambda)
Method Detail |
---|
public static double density(int k, double lambda, double x)
public static double cdf(int k, double lambda, int d, double x)
public static double barF(int k, double lambda, int d, double x)
public static double inverseF(int k, double lambda, int d, double u)
public static double[] getMLE(double[] x, int n)
x
- the list of observations used to evaluate parametersn
- the number of observations used to evaluate parameters
public static ErlangDist getInstanceFromMLE(double[] 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(int k, double lambda)
public static double getVariance(int k, double lambda)
public static double getStandardDeviation(int k, double lambda)
public int getK()
public void setParams(int k, double lambda, int d)
public double[] getParams()
getParams
in interface Distribution
getParams
in class GammaDist
public String toString()
toString
in class GammaDist
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |