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. More... | |
double | density (double x) |
double | cdf (double x) |
Returns the distribution function \(F(x)\). More... | |
double | barF (double x) |
Returns \(\bar{F}(x) = 1 - F(x)\). More... | |
double | inverseF (double u) |
Returns the inverse distribution function \(F^{-1}(u)\), defined in ( inverseF ). More... | |
double [] | getParams () |
Returns the three parameters of this hypoexponential distribution as array \((n, k, h)\). More... | |
void | setParams (int n, int k, double h) |
String | toString () |
![]() | |
HypoExponentialDist (double[] lambda) | |
Constructs a HypoExponentialDist object, with rates \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
double | density (double x) |
double | cdf (double x) |
Returns the distribution function \(F(x)\). More... | |
double | barF (double x) |
Returns \(\bar{F}(x) = 1 - F(x)\). More... | |
double | inverseF (double u) |
Returns the inverse distribution function \(F^{-1}(u)\), defined in ( inverseF ). More... | |
double | getMean () |
Returns the mean of the distribution function. | |
double | getVariance () |
Returns the variance of the distribution function. | |
double | getStandardDeviation () |
Returns the standard deviation of the distribution function. | |
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. | |
double [] | getParams () |
Same as getLambda. | |
String | toString () |
Returns a String containing information about the current distribution. | |
![]() | |
abstract double | density (double x) |
Returns \(f(x)\), the density evaluated at \(x\). More... | |
double | barF (double x) |
Returns the complementary distribution function. More... | |
double | inverseBrent (double a, double b, double u, double tol) |
Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method. More... | |
double | inverseBisection (double u) |
Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection. More... | |
double | inverseF (double u) |
Returns the inverse distribution function \(x = F^{-1}(u)\). More... | |
double | getMean () |
Returns the mean. More... | |
double | getVariance () |
Returns the variance. More... | |
double | getStandardDeviation () |
Returns the standard deviation. More... | |
double | getXinf () |
Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). More... | |
double | getXsup () |
Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\). More... | |
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]\). More... | |
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]\). More... | |
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. More... | |
static double | cdf (int n, int k, double h, double x) |
Computes the distribution function \(F(x)\), with arguments as in the constructor. More... | |
static double | barF (int n, int k, double h, double x) |
Computes the complementary distribution \(\bar{F}(x)\), as in formula ( conv-hypo-equal ). More... | |
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. More... | |
![]() | |
static double | density (double[] lambda, double x) |
Computes the density function \(f(x)\), with \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
static double | cdf (double[] lambda, double x) |
Computes the distribution function \(F(x)\), with \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
static double | cdf2 (double[] lambda, double x) |
Computes the distribution function \(F(x)\), with \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
static double | barF (double[] lambda, double x) |
Computes the complementary distribution \(\bar{F}(x)\), with \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
static double | inverseF (double[] lambda, double u) |
Computes the inverse distribution function \(F^{-1}(u)\), with \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
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\). More... | |
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 \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
static double | getStandardDeviation (double[] lambda) |
Returns the standard deviation of the hypoexponential distribution with rates \(\lambda_i = \) lambda[ \(i-1\)] , \(i = 1,…,k\). More... | |
Additional Inherited Members | |
![]() | |
int | decPrec = 15 |
![]() | |
static void | testLambda (double[] lambda) |
![]() | |
double [] | m_lambda |
![]() | |
double | supportA = Double.NEGATIVE_INFINITY |
double | supportB = Double.POSITIVE_INFINITY |
![]() | |
static final double | XBIG = 100.0 |
static final double | XBIGM = 1000.0 |
static final double [] | EPSARRAY |
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} \]
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 |
double barF | ( | double | x | ) |
Returns \(\bar{F}(x) = 1 - F(x)\).
x | value at which the complementary distribution function is evaluated |
x
Implements Distribution.
|
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 |
double cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
x | value at which the distribution function is evaluated |
x
Implements Distribution.
|
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 |
|
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 |
double [] getParams | ( | ) |
Returns the three parameters of this hypoexponential distribution as array \((n, k, h)\).
Implements Distribution.
double inverseF | ( | double | u | ) |
Returns the inverse distribution function \(F^{-1}(u)\), defined in ( inverseF ).
u | value in the interval \((0,1)\) for which the inverse distribution function is evaluated |
u
Implements Distribution.
|
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 |