Extends the class ContinuousDistribution for the exponential distribution [95] (page 494) with mean \(1/\lambda\) where \(\lambda> 0\) is the rate parameter. More...
Public Member Functions | |
| ExponentialDist () | |
| Constructs an ExponentialDist object with rate parameter \(\lambda\) = 1. | |
| ExponentialDist (double lambda) | |
| Constructs an ExponentialDist object with rate parameter \(\lambda\) = lambda. | |
| 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 | getMean () |
| Returns the mean. | |
| double | getVariance () |
| Returns the variance. | |
| double | getStandardDeviation () |
| Returns the standard deviation. | |
| double | getLambda () |
| Returns the value of \(\lambda\) for this object. | |
| void | setLambda (double lambda) |
| Sets the value of \(\lambda\) for this object. | |
| double[] | getParams () |
| Return a table containing the parameters of the current distribution. | |
| String | toString () |
| Returns a String containing information about the current distribution. | |
| 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 (double lambda, double x) |
| Computes the density function. | |
| static double | cdf (double lambda, double x) |
| Computes the distribution function. | |
| static double | barF (double lambda, double x) |
| Computes the complementary distribution function. | |
| static double | inverseF (double lambda, double u) |
| Computes the inverse distribution function. | |
| static double[] | getMLE (double[] x, int n) |
| Estimates the rate parameter \(\lambda\) of the exponential distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\). | |
| static ExponentialDist | getInstanceFromMLE (double[] x, int n) |
| Creates a new instance of an exponential distribution with rate parameter. | |
| static double | getMean (double lambda) |
| Computes and returns the mean, \(E[X] = 1/\lambda\), of the exponential distribution with rate parameter \(\lambda\). | |
| static double | getVariance (double lambda) |
| Computes and returns the variance, \(\mbox{Var}[X] = 1/\lambda^2\), of the exponential distribution with rate parameter. | |
| static double | getStandardDeviation (double lambda) |
| Computes and returns the standard deviation of the exponential distribution with rate parameter \(\lambda\). | |
Extends the class ContinuousDistribution for the exponential distribution [95] (page 494) with mean \(1/\lambda\) where \(\lambda> 0\) is the rate parameter.
Its density is
\[ f(x) = \lambda e^{-\lambda x} \qquad\mbox{for }x\ge0, \tag{fexpon} \]
\[ F(x) = 1 - e^{-\lambda x},\qquad\mbox{for }x \ge0, \tag{Fexpon} \]
and its inverse distribution function is
\[ F^{-1}(u) = -\ln(1-u)/\lambda, \qquad\mbox{for } 0 < u < 1. \]
Definition at line 44 of file ExponentialDist.java.
| umontreal.ssj.probdist.ExponentialDist.ExponentialDist | ( | ) |
Constructs an ExponentialDist object with rate parameter \(\lambda\) = 1.
Definition at line 50 of file ExponentialDist.java.
| umontreal.ssj.probdist.ExponentialDist.ExponentialDist | ( | double | lambda | ) |
Constructs an ExponentialDist object with rate parameter \(\lambda\) = lambda.
Definition at line 58 of file ExponentialDist.java.
|
static |
Computes the complementary distribution function.
Definition at line 116 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.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.ContinuousDistribution.
Definition at line 70 of file ExponentialDist.java.
|
static |
Computes the distribution function.
Definition at line 102 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.cdf | ( | double | x | ) |
Returns the distribution function \(F(x)\).
| x | value at which the distribution function is evaluated |
Implements umontreal.ssj.probdist.Distribution.
Definition at line 66 of file ExponentialDist.java.
|
static |
Computes the density function.
Definition at line 93 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.density | ( | double | x | ) |
Returns \(f(x)\), the density evaluated at \(x\).
| x | value at which the density is evaluated |
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 62 of file ExponentialDist.java.
|
static |
Creates a new instance of an exponential distribution with rate parameter.
\(\lambda\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
| x | the list of observations to use to evaluate parameters |
| n | the number of observations to use to evaluate parameters |
Definition at line 176 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.getLambda | ( | ) |
Returns the value of \(\lambda\) for this object.
Definition at line 224 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.getMean | ( | ) |
Returns the mean.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 78 of file ExponentialDist.java.
|
static |
Computes and returns the mean, \(E[X] = 1/\lambda\), of the exponential distribution with rate parameter \(\lambda\).
Definition at line 187 of file ExponentialDist.java.
|
static |
Estimates the rate parameter \(\lambda\) of the exponential distribution using the maximum likelihood method, from the \(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\).
The estimate is returned in a one-element array, as element 0. The equation of the maximum likelihood is defined as \(\hat{\lambda} = 1/\bar{x}_n\), where \(\bar{x}_n\) is the average of \(x[0],…,x[n-1]\) (see
[95] (page 506)).
| x | the list of observations used to evaluate parameters |
| n | the number of observations used to evaluate parameters |
Definition at line 154 of file ExponentialDist.java.
| double[] umontreal.ssj.probdist.ExponentialDist.getParams | ( | ) |
Return a table containing the parameters of the current distribution.
Implements umontreal.ssj.probdist.Distribution.
Definition at line 241 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.getStandardDeviation | ( | ) |
Returns the standard deviation.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 86 of file ExponentialDist.java.
|
static |
Computes and returns the standard deviation of the exponential distribution with rate parameter \(\lambda\).
Definition at line 214 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.getVariance | ( | ) |
Returns the variance.
Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.
Definition at line 82 of file ExponentialDist.java.
|
static |
Computes and returns the variance, \(\mbox{Var}[X] = 1/\lambda^2\), of the exponential distribution with rate parameter.
\(\lambda\).
Definition at line 201 of file ExponentialDist.java.
|
static |
Computes the inverse distribution function.
Definition at line 129 of file ExponentialDist.java.
| double umontreal.ssj.probdist.ExponentialDist.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.ContinuousDistribution.
Definition at line 74 of file ExponentialDist.java.
| void umontreal.ssj.probdist.ExponentialDist.setLambda | ( | double | lambda | ) |
Sets the value of \(\lambda\) for this object.
Definition at line 231 of file ExponentialDist.java.
| String umontreal.ssj.probdist.ExponentialDist.toString | ( | ) |
Returns a String containing information about the current distribution.
Definition at line 249 of file ExponentialDist.java.