This class implements the hypoexponential distribution for the case of equidistant \(\lambda_i = (n+1-i)h\). More...
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\)],. | |
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.
| 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\).
| n | largest rate is \(nh\) |
| k | number of rates |
| h | difference between adjacent rates |
Definition at line 67 of file HypoExponentialDistEqual.java.
| double umontreal.ssj.probdist.HypoExponentialDistEqual.barF | ( | double | x | ) |
Returns the complementary distribution function.
The default implementation computes \(\bar{F}(x) = 1 - F(x)\).
| x | value at which the complementary distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.
Definition at line 80 of file HypoExponentialDistEqual.java.
|
static |
Computes the complementary distribution \(\bar{F}(x)\), as in formula ( conv-hypo-equal ).
| n | max possible number of \(\lambda_i\) |
| k | effective number of \(\lambda_i\) |
| h | step between two successive \(\lambda_i\) |
| x | value at which the complementary distribution is evaluated |
Definition at line 135 of file HypoExponentialDistEqual.java.
| double umontreal.ssj.probdist.HypoExponentialDistEqual.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.
Definition at line 76 of file HypoExponentialDistEqual.java.
|
static |
Computes the distribution function \(F(x)\), with arguments as in the constructor.
| n | max possible number of \(\lambda_i\) |
| k | effective number of \(\lambda_i\) |
| h | step between two successive \(\lambda_i\) |
| x | value at which the distribution is evaluated |
Definition at line 116 of file HypoExponentialDistEqual.java.
| double umontreal.ssj.probdist.HypoExponentialDistEqual.density | ( | double | x | ) |
Returns \(f(x)\), the density evaluated at \(x\).
| x | value at which the density is evaluated |
Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.
Definition at line 72 of file HypoExponentialDistEqual.java.
|
static |
Computes the density function \(f(x)\), with the same arguments as in the constructor.
| n | max possible number of \(\lambda_i\) |
| k | effective number of \(\lambda_i\) |
| h | step between two successive \(\lambda_i\) |
| x | value at which the distribution is evaluated |
Definition at line 98 of file HypoExponentialDistEqual.java.
| double[] umontreal.ssj.probdist.HypoExponentialDistEqual.getParams | ( | ) |
Returns the three parameters of this hypoexponential distribution as array \((n, k, h)\).
Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.
Definition at line 171 of file HypoExponentialDistEqual.java.
| double umontreal.ssj.probdist.HypoExponentialDistEqual.inverseF | ( | double | u | ) |
Returns the inverse distribution function \(x = F^{-1}(u)\).
Restrictions: \(u \in[0,1]\).
| u | value at which the inverse distribution function is evaluated |
| IllegalArgumentException | if \(u\) is not in the interval \([0,1]\) |
Reimplemented from umontreal.ssj.probdist.HypoExponentialDist.
Definition at line 84 of file HypoExponentialDistEqual.java.
|
static |
Computes the inverse distribution \(x=F^{-1}(u)\), with arguments as in the constructor.
| n | max possible number of \(\lambda_i\) |
| k | effective number of \(\lambda_i\) |
| h | step between two successive \(\lambda_i\) |
| u | value at which the inverse distribution is evaluated |
Definition at line 153 of file HypoExponentialDistEqual.java.
| 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.