SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdist.HypoExponentialDistEqual Class Reference

This class implements the hypoexponential distribution for the case of equidistant \(\lambda_i = (n+1-i)h\). More...

Inheritance diagram for umontreal.ssj.probdist.HypoExponentialDistEqual:
umontreal.ssj.probdist.HypoExponentialDist umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 HypoExponentialDistEqual (int n, int k, double h)
 Constructor for equidistant rates.
double density (double x)
 Returns \(f(x)\), the density evaluated at \(x\).
double cdf (double x)
 Returns the distribution function \(F(x)\).
double barF (double x)
 Returns the complementary distribution function.
double inverseF (double u)
 Returns the inverse distribution function \(x = F^{-1}(u)\).
double[] getParams ()
 Returns the three parameters of this hypoexponential distribution as array \((n, k, h)\).
String toString ()
 Returns a String containing information about the current distribution.
Public Member Functions inherited from umontreal.ssj.probdist.HypoExponentialDist
 HypoExponentialDist (double[] lambda)
 Constructs a HypoExponentialDist object, with rates \(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\).
double getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
double[] getLambda ()
 Returns the values \(\lambda_i\) for this object.
void setLambda (double[] lambda)
 Sets the values \(\lambda_i = \)lambda[ \(i-1\)], \(i = 1,…,k\) for this object.
Public Member Functions inherited from umontreal.ssj.probdist.ContinuousDistribution
double inverseBrent (double a, double b, double u, double tol)
 Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method.
double inverseBisection (double u)
 Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection.
double getXinf ()
 Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
double getXsup ()
 Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXinf (double xa)
 Sets the value \(x_a=\) xa, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXsup (double xb)
 Sets the value \(x_b=\) xb, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).

Static Public Member Functions

static double density (int n, int k, double h, double x)
 Computes the density function \(f(x)\), with the same arguments as in the constructor.
static double cdf (int n, int k, double h, double x)
 Computes the distribution function \(F(x)\), with arguments as in the constructor.
static double barF (int n, int k, double h, double x)
 Computes the complementary distribution \(\bar{F}(x)\), as in formula ( conv-hypo-equal ).
static double inverseF (int n, int k, double h, double u)
 Computes the inverse distribution \(x=F^{-1}(u)\), with arguments as in the constructor.
Static Public Member Functions inherited from umontreal.ssj.probdist.HypoExponentialDist
static double density (double[] lambda, double x)
 Computes the density function \(f(x)\), with \(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\).
static double cdf (double[] lambda, double x)
 Computes the distribution function \(F(x)\), with \(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\).
static double cdf2 (double[] lambda, double x)
 Computes the distribution function \(F(x)\), with \(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\).
static double barF (double[] lambda, double x)
 Computes the complementary distribution \(\bar{F}(x)\), with.
static double inverseF (double[] lambda, double u)
 Computes the inverse distribution function \(F^{-1}(u)\), with.
static double getMean (double[] lambda)
 Returns the mean, \(E[X] = \sum_{i=1}^k 1/\lambda_i\), of the hypoexponential distribution with rates \(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\).
static double getVariance (double[] lambda)
 Returns the variance, \(\mbox{Var}[X] = \sum_{i=1}^k 1/\lambda_i^2\), of the hypoexponential distribution with rates.
static double getStandardDeviation (double[] lambda)
 Returns the standard deviation of the hypoexponential distribution with rates \(\lambda_i = \) lambda[ \(i-1\)],.

Detailed Description

This class implements the hypoexponential distribution for the case of equidistant \(\lambda_i = (n+1-i)h\).

We have \(\lambda_{i+1} - \lambda_i = h\), with \(h\) a constant, and \(n \ge k\) are integers.

The formula ( convolution-hypo ) becomes

\[ \bar{F}(x) = \mathbb P\left[X_1 + \cdots+ X_k > x \right] = \sum_{i=1}^k e^{-(n+1-i)h x} \prod_{\substack {j=1\\j\not i}}^k \frac{n+1-j}{i - j}. \tag{conv-hypo-equal} \]

The formula ( fhypoexp2 ) for the density becomes

\[ f(x) = \sum_{i=1}^k (n+1-i)h e^{-(n+1-i)h x} \prod_{\substack {j=1\\j\not i}}^k \frac{n+1-j}{i - j}. \tag{fhypoexp3} \]

Definition at line 54 of file HypoExponentialDistEqual.java.

Constructor & Destructor Documentation

◆ HypoExponentialDistEqual()

umontreal.ssj.probdist.HypoExponentialDistEqual.HypoExponentialDistEqual ( int n,
int k,
double h )

Constructor for equidistant rates.

The rates are \(\lambda_i = (n+1-i)h\), for \(i = 1,…,k\).

Parameters
nlargest rate is \(nh\)
knumber of rates
hdifference between adjacent rates

Definition at line 67 of file HypoExponentialDistEqual.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.barF ( double x)

Returns the complementary distribution function.

The default implementation computes \(\bar{F}(x) = 1 - F(x)\).

Parameters
xvalue at which the complementary distribution function is evaluated
Returns
complementary distribution function evaluated at x

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 80 of file HypoExponentialDistEqual.java.

◆ barF() [2/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.barF ( int n,
int k,
double h,
double x )
static

Computes the complementary distribution \(\bar{F}(x)\), as in formula ( conv-hypo-equal ).

Parameters
nmax possible number of \(\lambda_i\)
keffective number of \(\lambda_i\)
hstep between two successive \(\lambda_i\)
xvalue at which the complementary distribution is evaluated
Returns
value of complementary distribution at \(x\)

Definition at line 135 of file HypoExponentialDistEqual.java.

◆ cdf() [1/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.cdf ( double x)

Returns the distribution function \(F(x)\).

Parameters
xvalue at which the distribution function is evaluated
Returns
distribution function evaluated at x

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 76 of file HypoExponentialDistEqual.java.

◆ cdf() [2/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.cdf ( int n,
int k,
double h,
double x )
static

Computes the distribution function \(F(x)\), with arguments as in the constructor.

Parameters
nmax possible number of \(\lambda_i\)
keffective number of \(\lambda_i\)
hstep between two successive \(\lambda_i\)
xvalue at which the distribution is evaluated
Returns
value of distribution at \(x\)

Definition at line 116 of file HypoExponentialDistEqual.java.

◆ density() [1/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.density ( double x)

Returns \(f(x)\), the density evaluated at \(x\).

Parameters
xvalue at which the density is evaluated
Returns
density function evaluated at x

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 72 of file HypoExponentialDistEqual.java.

◆ density() [2/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.density ( int n,
int k,
double h,
double x )
static

Computes the density function \(f(x)\), with the same arguments as in the constructor.

Parameters
nmax possible number of \(\lambda_i\)
keffective number of \(\lambda_i\)
hstep between two successive \(\lambda_i\)
xvalue at which the distribution is evaluated
Returns
density at \(x\)

Definition at line 98 of file HypoExponentialDistEqual.java.

◆ getParams()

double[] umontreal.ssj.probdist.HypoExponentialDistEqual.getParams ( )

Returns the three parameters of this hypoexponential distribution as array \((n, k, h)\).

Returns
parameters of the hypoexponential distribution

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 171 of file HypoExponentialDistEqual.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.inverseF ( double u)

Returns the inverse distribution function \(x = F^{-1}(u)\).

Restrictions: \(u \in[0,1]\).

Parameters
uvalue at which the inverse distribution function is evaluated
Returns
the inverse distribution function evaluated at u
Exceptions
IllegalArgumentExceptionif \(u\) is not in the interval \([0,1]\)

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 84 of file HypoExponentialDistEqual.java.

◆ inverseF() [2/2]

double umontreal.ssj.probdist.HypoExponentialDistEqual.inverseF ( int n,
int k,
double h,
double u )
static

Computes the inverse distribution \(x=F^{-1}(u)\), with arguments as in the constructor.

Parameters
nmax possible number of \(\lambda_i\)
keffective number of \(\lambda_i\)
hstep between two successive \(\lambda_i\)
uvalue at which the inverse distribution is evaluated
Returns
inverse distribution at \(u\)

Definition at line 153 of file HypoExponentialDistEqual.java.

◆ toString()

String umontreal.ssj.probdist.HypoExponentialDistEqual.toString ( )

Returns a String containing information about the current distribution.

Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.

Definition at line 186 of file HypoExponentialDistEqual.java.


The documentation for this class was generated from the following file: